Unfortunately, traditional CDNs can only speed up static websites, such as news sites and only have a slight impact on database-driven websites, such as eCommerce and Travel websites.
In this post, we will look at the similarities and differences between the leading CDNs Cloudflare vs. Akamai and see how each compares to Layer0 (Edgio).
What is a CDN?
In a nutshell, CDNs are infrastructure that reduces the physical distance between the content of a website and the audience requesting it. The premise is simple: the closer the content is geographically to the end user, the quicker it will load. Add a fast connection on top of that and the overall user experience improves (well, at least in theory).
CDNs use a distributed network of physical locations and servers known as the CDN edge. Every physical location, called a point of presence (PoP), has edge servers in its vicinity. Today, many popular sites like Amazon, Facebook and Netflix serve their content through points of presence, unbeknown to the users of these services.
Shopping for a CDN is a daunting ordeal, as choosing the right one requires a solid grasp of the technology and an in-depth understanding of the actual needs of your business. Bad technology fit may be costly and offer minimal to no improvement in return.
Do I need a CDN?
If your users wait for more than a couple of seconds for content to load, you probably do. Long load times cause cognitive and emotional responses comparable to the stress of watching a horror movie alone. We also know that Google ranks sites on many things, but speed will be critical from 2021 onwards. Lastly, based on Google research, a mere 100ms improvement to mobile page loads lifts eCommerce website conversion rate by 8.4%, so milliseconds could mean millions for large revenue-generating websites. There is simply no excuse for providing a slow website.
A fast website is a foundation of competing in Google search results and doing business in general. It also provides a superior experience that fosters engagement and customer loyalty. A CDN can help you get there.
Let’s have a look at the most interesting CDN technologies out there.
The role of CDNs
Distributed CDNs are the cornerstone of today’s internet. They enable better, faster browsing experiences and serve a range of additional features on top of supporting content distribution: traffic routing, mitigation of DDoS attacks and ensuring website uptime. However, as CDNs become increasingly advanced and packed with features, it is more difficult to compare them side-by-side and determine a definitive winner.
The primary role of CDNs has always been to help content-heavy websites keep up with users’ expectations. But the Web and the methods to make websites faster have changed a lot since the first CDN emerged. New players and solutions have emerged, driving the website acceleration market (a subset of the CDN market) to balloon to its current $2B valuation.
Running a slow website spells bad news, especially if you’re in eCommerce. A good CDN, beyond speed improvement, should also future-proof your online presence by providing support for emerging protocols and formats and helping mitigate attacks of increasing scale and complexity. Let’s look at how Akamai, Cloudflare and Layer0 stack up in doing just that.
Akamai is one of the pioneering providers of CDN technology with a really impressive global presence.
Akamai has always been geared towards enterprise companies. The minimum contract is 12 months, which can be quite a commitment for a startup. The company is a little secretive about its pricing; to get a quote, you’ll have to talk to its Sales team. Little is known about the platform’s pricing indicates that it is more expensive, with some quoting $350 for 1TB of bandwidth/month.
Cloudflare is a lower-cost alternative to Akamai. It provides a global CDN with unique performance capabilities and a strong focus on security. The company claims they have a global infrastructure built from the ground up using only next-generation, high-performance equipment with no legacy software or hardware.
Their CDN is relatively easy to set up, affordable, and built to integrate emerging technologies to meet the future needs of the businesses using it.
Akamai vs. Cloudflare vs. Layer0 (Edgio)
Next, let’s take a detailed look at each platform’s pricing, capabilities and differences:
Akamai’s pricing model is scalable, customers are billed on a pay-as-you-grow basis and the CDN doesn’t differentiate between small startups and larger customers. The platform is presumably on the expensive side—no pricing is provided on their site, but it is said they go as high as $3,500 for 10TB.
Akamai does not offer a free plan. However, there is a free trial for prospects who want to test the CDN for 30 days.
Cloudflare offers four plans: Free, Pro, and Business, priced at $0, $20 and $200 per domain, respectively. The platform also offers an Enterprise plan, which can be custom-tuned for the client’s needs.
Cloudflare never charges for GBs of transfer or requests. But specific add-ons like Dedicated SSL Certificates, Load Balancing, Argo Smart Routing, and Rate Limiting require an additional fee.
Cloudflare’s free plan comes with basic DDoS protection. More advanced DDoS protection is available on the premium plans. The free, unmetered plan is a major draw for many businesses looking to dip their toes in CDN technology and speed up their site with minimal effort. The switch to a paid plan or a different CDN provider is always possible later.
Layer0 is offered in two flavors: Free and Enterprise. The former is a limited version of the full deal but should suffice to get an idea of what the infrastructure is capable of.
Enterprise pricing depends on numerous factors, such as traffic and the number of environments and seats you need. At this point, you will need to contact Edgio directly to get a detailed cost estimate.
It’s difficult to compare Layer0 to traditional CDNs because Layer0 is much more than just a CDN. Layer0 is a serverless platform that combines an application-aware CDN with various speed-oriented web technologies.
Lastly, Layer0 (Edgio) provides a few other technologies that further improve your website’s performance and simplify the entire process of developing, deploying, monitoring, experimenting on and running large-scale dynamic websites.
2. Speed and performance
Measuring the real-world performance of a CDN is challenging because it depends on many factors, including network speed and the type of content being fetched (static content or dynamic data).
CDNs operate in two basic modes, push and pull:
Push happens when your files are sent over to the CDN and then served to the visitors when they request them. The software layer is responsible for integrating the site with the CDN.
Pull is a different approach; you just let the CDN work in the background. Whenever a file is needed, it “pulls” it from your main server and caches it for future requests.
The problem with traditional CDNs is that they usually “push” information, which works well only for static websites, to serve assets that rarely change (e.g., images and text). And even when traditional CDNs do “pull” information, the caching is limited to assets (or asset URLs), not data (or page URLs) that visitors to eCommerce websites are waiting for.
Shoppers are waiting for the JSON/HTML/SSR data, which makes up the specific size, color, and price of the product they are interested in. However, quite ironically, this data isn’t cached by traditional CDNs—which are simply not geared toward dealing with dynamic data. This is the most likely reason why websites on Layer0 see cache hit rates for dynamic data at the edge in the 95% range, while the sites that use traditional CDNs see a low 6%.
«Today’s CDNs are built primarily with static content in mind. They understand asset URLs but not page routes.»
Let’s look at how Akamai, Cloudflare and Layer0 compare in terms of performance and website speed technologies they utilize to speed up the Web.
Akamai offers 32 packets of TCP connection, whereas Cloudflare only offers 10 packets.
Does that make Akamai the best out there? Perhaps not. However, it gives us useful insight into each CDN’s structure and configuration. And the “better performance” factor is worth considering when it comes to picking one up.
With that said, Akamai still has issues caching data at the edge, just like Cloudflare and every other traditional CDN. If you have a large website and most of the pages change dynamically, if you use personalization, real-time inventory and dynamic pricing if you have dozens of trackers and tags, traditional CDNs won’t make you faster.
Cloudflare speeds up and enhances the performance of networks, websites, apps and APIs. It operates as a network of global proxy servers and data centers (more than 100), which power over 10 trillion requests per month. The service can manage 10TBps in bandwidth for its users.
The standard Cloudflare cache level setting, i.e., Standard/Aggressive, caches only certain types of assets by default, like scripts, stylesheets, and images. Aggressive caching won’t cache JSON files. It will cache all static resources, including ones with a query string. Caching depends on the URL pattern (in theory, it can also include or ignore query strings) and happens regardless of the Content-Type header.
The global setting can only be made less aggressive, not more, so you’ll need to set up one or more Page Rules to match those URLs, using “Cache Everything” as the custom cache rule.
The name Cache Everything is slightly misleading as the Cloudflare CDN does not cache JSON files. There is a workaround to this which involves creating specific Page Rules or using Cloudflare Workers, but it certainly won’t cut the mustard for websites that display very dynamic, highly personalized content—unless the JSON file rarely changes or is versioned by filename.
Cloudflare also offers content prefetching. Enterprise customers can enable it by turning on the “Prefetch URLs” setting in the Speed app of the Cloudflare dashboard. Please note that you will need to provide and a list of URLs to prefetch in HTML headers.
Websites on Layer0 achieve speeds unattainable with traditional CDNs because they use advanced predictive prefetching along Layer0 modern application-aware CDN. This combination allows websites on Layer0 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 clicking anything based on what they are expected to click next. In other words, your store can serve JSON/HTML data for the different products you are offering, their prices and information in a fraction of the time.
With Layer0, cache clearing is possible by URL, regex, surrogate key, or domain via console, API, or CLI. The platform will soon listen to changes in your database and automatically clear only the objects that have changed.
Layer0 only serves prefetch requests from the edge cache. It will never make a request to the origin if a prefetch request can be served from the edge cache, which protects your servers against increased load.
CDNs are vulnerable on their own, so you need to use security measures such as Web Application Firewall (WAF) in conjunction with a CDN. A WAF serves as a barrier between your content and the broader internet. The firewall should block suspicious traffic but, at the same time, seamlessly allow good website traffic. The benefits of using CDN servers increase significantly once those servers are secured.
Sites running on Akamai can use either Kona Site Defender or Prolexic Routed for Web Application and API Protection—or a combination of both. Some clients use the former for their home page and customer portal and the latter for everything else.
Prolexic, a technology recently acquired by Akamai, helps defend data centers on all ports and protocols against complex DoS and DDoS attacks. Prolexic DDoS protection solutions leverage proprietary filtering techniques and Akamai’s DDoS mitigation network. This includes advanced DDoS protection routing and anti-DDoS devices to help protect your organization from DoS and DDoS denial of service attacks.
Kona Site Defender, Akamai’s comprehensive web application and API protection technology, helps you:
reduce risks of downtime, data theft and website defacement,
protect against the largest DoS and DDoS attacks,
protect against web attacks such as SQL injection, XSS and RFI.
With Cloudflare, you get unlimited and unmetered DDoS attack protection. When it comes to security, the key security elements include protection against SQL injection, which attacks the website code. It also protects from distributed denial-of-service attacks, which are increasingly popular due to the rise in the hacking of vulnerable Internet of Things devices.
For layer 7 (L7) protection to work, Cloudflare customers must first enable the “I’m under attack” mode. The lack of automated L7 attack protection is an omission that might prove too risky for some businesses.
Layer0 offers all the needed web security features at the edge. DDoS Protection Layers 3 and 4 automatic basic protection from attacks is available in the free version of Layer0. By upgrading to Enterprise, you gain access to:
Layer 7 DDoS and WAF with OWASP Ruleset and Layer 7 denial-of-service protection and bot mitigation.
Layer0 includes a managed web application firewall that safeguards your site from attacks and unwanted crawlers. Updated rules are automatically deployed as they become available without any need for action on your part.
Origin cloaking—to stop DDoS attacks in the cloud before letting them reach the origin server and applications.
PCI Level 1 DSS certified cloud vendor
Custom security audit—Secure by default system that has passed numerous enterprise security audits
4. Location coverage
Before choosing a CDN, reviewing the features and points of presence (PoPs) is good. A point of presence is a single geographical location where a group of CDN edge servers resides. The total number of PoPs that make up a CDN’s network and each independent location influences its coverage.
PoPs with edge servers are the key components of modern CDNs. They significantly reduce the distance information needs to travel to the user, thus significantly cutting load times.
Akamai is a massively distributed platform. According to its official website, the Akamai CDN utilizes 288,000 servers in 136 countries and nearly 1,500 networks worldwide.
The map below represents Akamai’s Media Delivery and Storage network with the approximate locations of their PoPs.
Cloudflare is known for its diverse data center locations strategically across the world. They have data centers on all continents. They operate a network of 150+ PoPs, including 20+ PoPs in mainland China.
Instead of referring to multiple PoPs in one location, Cloudflare uses the term “data center” to indicate a location where many servers are maintained. Here’s a map representing the approximate location of Cloudflare’s data centers.
Cloudflare data center locations
Layer0 location coverage
Layer0 takes a fundamentally different approach to making the Web faster and reverses some of the long-held CDN practices and concepts. At the same time, many traditional CDN vendors, including Cloudflare and Akamai, stick to their traditional approach—they add more servers to more locations.
This does not do the trick for today’s dynamic Web. We know this because networks are getting faster and faster, while mobile website speeds haven’t gotten any better. And this happens even though almost every major eCommerce site uses some kind of CDN today.
We understood a paradigm shift was needed to make the Web faster. Instead of scrambling to speed up data transfers to the browser, Layer0 utilizes advanced predictive prefetching capabilities to stream whatever a shopper browsing the site is most likely to click from the edge to their browser—before they request it.
We guarantee results—websites on Layer0 see an industry-leading average cache hit ratio of 95%+ for dynamic content, as opposed to the low rates common to eCommerce, which average at 6%.
Many of today’s websites are database-driven. This is especially true for revenue-generating websites, like eCommerce and Travel sites. They’re packed with tens of thousands of pages (or even millions), dozens of tags, personalization, real-time inventory lookups and more. A traditional CDN can make these websites a tad faster, but nowhere near sub-second.
This is seen clearly as day in real-user data. While mobile networks are getting faster and faster, website speeds on mobile haven’t gotten any better. This happens even though almost every major eCommerce site uses a CDN today. Traditional CDNs are only good at caching static files, not JSON/HTML/SSR data, which shoppers are waiting for. 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.