CDN

Layer0 vs CDN: A Definitive Side-by-Side Comparison

Rather than only hosting your static content like a traditional CDN, Layer0 lets you maximize your cache hit ratios for dynamic content and provides other technologies which further improve the performance of your website.

Layer0 is a serverless platform which combines an application-aware CDN with various speed-oriented web technologies. The acronym stands for "eXperience Delivery Network" and. Rather than only hosting your static content like a traditional CDN, the infrastructure lets you maximize your cache hit ratios for dynamic content at the edge. Layer0 also provides a few other technologies which further improve the performance of your website, and simplify the entire process of developing, deploying, monitoring, experimenting on and defending large-scale dynamic websites. Let’s now have a look at how Layer0 compares against a traditional CDN.

What is a Content Delivery Network (CDN)?

For years, CDNs have been the invisible tech helping to deliver images, videos, and JavaScript (i.e. static assets), as well as CSS code and other pieces of your website to internet users around the world.

The importance of content delivery networks cannot be overestimated—without them, websites would be dramatically slow as each user’s browser would inefficiently download content from a server all the way across the globe. This is why today’s internet uses distributed CDNs as the backbone for a better, faster browsing experience. Some CDNs can also route traffic, mitigate DDoS attacks, and consistently ensure website uptime.

Points of presence (PoPs) with edge servers are the key components of the CDN architecture which significantly reduce the distance information needs to travel to the user and thus significantly cutting load times. A point of presence is a single geographical location where a group of CDN edge servers reside. The total number of PoPs that make up a CDN’s network as well as each independent location has influence on the coverage of the CDN.

Some people may regularly use a CDN but not even know it. Most of today’s Web is served through points of presence, including traffic from major sites like Amazon, Facebook and Netflix.

The problem with traditional CDNs

CDNs provide high availability and performance by distributing the service spatially relative to end users. However, the problem with traditional CDNs is that they were originally designed with static websites in mind. They were intended to serve assets that rarely change, such as images and text. But the internet has changed and modern websites—especially eCommerce stores—are now more interactive, dynamic and database-driven. In fact, they now share more affinity with applications than HTML-based websites of yesterday.

Customers visiting eCommerce sites are waiting for the JSON data which makes up the specific size, color, and price of the product they are interested in—but, quite ironically, this data isn’t cached by traditional CDNs, as they are not geared toward dealing with dynamic data.

The easiest way to improve an eCommerce website’s experience is to increase the speed in which product details are delivered.

CDNs and eCommerce

A traditional CDN on its own won’t make an eCommerce website sub-second. Especially not a modern, database-driven, dynamic one that consists of thousands of pages and has dozens of tags, customization, real-time inventory lookups and more.

Mobile networks are getting faster and faster, but yet mobile website speeds haven’t gotten any better. This happens even though almost every major eCommerce site today is using a CDN. Traditional CDNs are only good at caching static files, not JSON data. eCommerce websites with traditional CDNs still make their customers wait for product data that needs to be pulled from a remote database before the browser can render the page on the screen.

Schedule 1-on-1 Demo

Schedule a consultative conversation now to learn how Layer0 can help you achieve sub-second page loads.

Click here!

Layer0 and eCommerce

Layer0 was built for large scale dynamic websites, such as eCommerce and Travel sites. Layer0 is much more than a modern application-aware CDN. It includes a CDN, but also comes with a combination of other advanced web technologies that get websites down to sub-second speeds.

  • CDN-as-JavaScript with a 95%+ cache hit ratio for dynamic content at the edge, nearly 100 global PoPs and 9 “Super PoPs.” CDN-as-JavaScript can augment or replace your existing CDN. This modern CDN comes with everything you need to defend your site, including WAF, DDoS protection and bot mitigation. CDN-as-JavaScript gives developers programmatic control over caching at the edge, so that browsers can get the data they need to render the next page instantly.
  • Serverless JavaScript backend for frontends which orchestrates and optimizes your APIs. It’s also the perfect place for server-side rendering and helps you speed up your site further by keeping execution times low and performance high.
  • Edge traffic router enables traffic splitting at the edge and A/B tests that do not slow down the site. The module also enables iterative migration, canary deploys and feature flags.
  • Branch previews boost developmental velocity by automatically creating full-stack preview URLs for every branch of your code. 1-click rollbacks, custom domains, and live logs are also supported.
  • Performance monitor provides you with actionable insight into your cache hit rates and RUM speeds by route, along with conversion rate and smoke test alerts.
With Layer0, dynamic data is typically cached at the edge with 95%+ hit rates.

Layer0 already powers some of the fastest online stores out there: 1-800-Flowers, Shoe Carnival and AKIRA are just a few examples. In fact, 1 out of 3 US shoppers visits a site on Layer0 every month.  

Websites on Layer0 are blazingly fast because they use advanced predictive prefetching along with Layer0 CDN-as-JavaScript, which allows them to stay 5 seconds ahead of shoppers’ taps. This is done by streaming cached dynamic data from the CDN edge to the users’ browsers before they click anything, based on what they are expected to click on next. In other words, your store can serve JSON data for the different products you are offering, their prices and information, in a fraction of the time.

What is Layer0 CDN-as-JavaScript?

The CDN-as-JavaScript is an application-aware CDN that lets you maximize your cache simply. CDN-as-JavaScript surfaces actionable insights about your caching by route and page type, as well as enables complete control over caching and traffic routing at the edge.

The CDN-as-JavaScript has a network of nearly 100 global PoPs and comes with advanced predictive prefetching capabilities so that the most likely product information is streamed from the edge to the customers browser before they requested it. As a result, websites on Layer0 see an average cache hit ratio of 95%+ for dynamic content, as opposed to the low rates common to eCommerce, most in the 10%-15% range.

The CDN-as-JavaScript is only one component of Layer0 and it alone cannot guarantee sub-second speeds for large eCommerce sites, for that you need the full Layer0 package.

Dump your existing CDN—or not!

Don’t optimize for fast when you can go instant! Layer0 CDN-as-JavaScript can fully replace your current CDN. It has all the web security features you need at the edge: Web Application Firewall (WAF), Distributed Denial of Service (DDoS) protection, bot mitigation, origin shielding, and edge based filtering.

CDN-as-JavaScript has nearly 100 global PoPs and 9 “Super PoPs” which ensures your content and data caches close to your shoppers. It also offers an image optimization service.

However, if you want to keep your existing CDN, Layer0 CDN-as-JavaScript can augment it —sit behind or alongside it—and won’t slow down your website.

Schedule a consultative conversation now to learn how the Layer0 can help you achieve sub-second page loads.

Schedule 1-on-1 Demo

Schedule a consultative conversation now to learn how Layer0 can help you achieve sub-second page loads.

Click here!

The other benefits of the Layer0

Regardless if the CDN-as-JavaScript can replace your CDN or works alongside it, there are a few other benefits that come with Layer0 that enable large websites to consistently deliver sub-second page loads.

1. Serverless JS

  • Just-in-time server-side rendering (SSR) Pre-rendering won’t cut it for dynamic eCommerce websites with 1000s of SKUs, A/B tests, dynamic pricing, real-time inventory lookups, and promotions. The Layer0 offers in-line on-the-fly server-side rendered content that is then cached at the edge with our CDN-as-JavaScript.
  • Serverless Node.js Don’t manage servers, handle huge traffic spikes with no effort with a serverless platform.
  • API Aggregation and Orchestration Enjoy all of the usual benefits of a serverless JavaScript backend for frontend, including the ability to orchestrate and aggregate APIs to minimize the payload delivered to the browser.
  • Synthetic API technology Sometimes your eCommerce platform or custom system may not have full API coverage. Why wait months to offer your shoppers an instant experience? With Layer0, you can easily create synthetic APIs off of HTML.

Layer0 Serverless JavaScript offers a patented Synthetic API technology which converts your HTML into JSON data on-the-fly. Synthetic API endpoints preserve cookies and redirects and support iFrames and Ajax on web pages. Use them to power your whole website, parts of your website, or alongside native APIs to augment functionality on a given page template. Synthetic APIs execute quickly and will not compromise the speed of your sub-second website.

2. Edge experiments

Layer0 gives you full control over your traffic routing, conclusive tests, and sub-second stats.

  • Route traffic to any live branch Every branch of code you create is equal on Layer0, and can receive some or all of the traffic for a given domain. The Layer0 Console makes it easy to adjust routing rules, deploy changes, and roll back if there is a problem.
  • Route traffic based on any header value, or by probabilities Traffic can be routed by probabilities (e.g., a simple 50/50 split) or based on sophisticated rules based on any header or cookie value (e.g., showing first-time visitors a different experience than repeat visitors).
Layer0 lets route live traffic to any deployed branch at the edge of the network.
  • Run real A/B tests Layer0 lets you implement real A/B tests which do not impact your website speeds. Most A/B testing tools slow down your website and skew your results. This problem is reminiscent of Heisenberg's uncertainty principle, which says the more precisely the position of a particle is determined, the less precisely its momentum can be predicted from initial conditions, and vice versa. By analogy, when testing your site, you may never be sure if testing failed—or actually succeeded, but your customers were frustrated by the slower page loads caused by your tests, which you had no control over.With the Layer0 you can avoid such dilemmas. Your testing will not involve compromising on page speed as all new experiences are delivered at the edge at identical speeds as the original experience. This allows you to run numerous A/B tests, feature flags, canary deploys and other variations of the site without slightest concerns about negatively impacting your site’s speed.
  • Iterative migration Layer0 lets you iteratively migrate one section of the app at a time following Martin Fowler’s strangler pattern, i.e. incrementally “strangling” specific functionalities and replacing them with new applications and services. The Layer0 CDN-as-JavaScript constitutes a kind of layer which intercepts requests. It will route requests either to the existing site or the new one on Layer0, or a combination of the two, based on the type of page. This way, parts of the website are migrated gradually, and consumers can continue using the same interface, unaware that any migration is taking place. We recommend focusing on revenue generating pages first, your PLPs and PDPs, and then migrate the other pages at your own convenience.  
CDN-as-JavaScript intercepts requests and routes them either to the existing site, the new one on the Layer0, or a combination of the two, based on the type of page.

3. Branch preview

Layer0 enables unlimited, automated, fullstack pre-production environments for your app. Every feature branch automatically generates a complete environment: edge, server, and browser.

  • Automatic preview URLs for every feature branch Every feature branch automatically generates a URL where product/project managers, QA, and others can provide feedback in real-time, cutting feedback loops to a minimum and avoiding wasted work.
  • World's only automatic fullstack pre-production environments Your browser code, edge code and server code are deployed to an environment identical to your production stack. You will never have to call your CDN support team to debug your site when it’s down again.
  • CI and CD on steroids Layer0 Branch Preview includes a builder that is triggered when you push to a feature branch. The builder deploys to a full stack environment, updates GitHub status checks, and posts a preview URL in your pull request.

The key benefits of Branch Preview:

  • Developers can share live code on latest branch for testing before it is merged in
  • Business owners can see changes in real time
  • Code reviews and feedback cycles are faster
  • QA and testing processes are simplified

Schedule 1-on-1 Demo

Schedule a consultative conversation now to learn how Layer0 can help you achieve sub-second page loads.

Click here!

Summary

Designed with static websites in mind, traditional CDNs don’t cut the mustard for modern, dynamic and image-rich eCommerce websites. Layer0 is a full package deal, a complete infrastructure for running sub-second dynamic websites. It comes with a CDN, but also offers much more. It is your all-in-one solution to develop, deploy, preview, run, monitor, experiment on, and defend your headless frontend. And it will make sure you squeeze every millisecond out of every optimization effort. In fact, we guarantee sub-500ms median page loads for large, dynamic websites running on Layer0.

Want to take your site to the next level?
Join the Layer0 Community for the latest updates on performance.
Thank you for subscribing!
Oops! Something went wrong.
Thanks for registering, you're being redirected!
Oops! Something went wrong.

Don't wait another second. Go instant.

Get started in seconds