In today’s saturated online service provider market, customers have endless choices. This is why websites and applications have to be fast to hold a user’s attention.
Millisecond delays in page load times are the difference between a sale or lost customer. There are hundreds of studies illustrating this. I will limit myself to one. According to Amazon a 100ms delay in page load times can lead to a 1% loss in revenue.
Why Optimize a CDN?
Content delivery networks (CDN) cater to the “need for speed” required by Internet companies. They do this by helping service providers speed up the delivery of content to end users.
The Internet is changing. From the one-way top down Internet of the 90’s and early 2000’s to the social web of today. The content generated as a result is also changing. Webpages are increasingly being personalized
Users are more likely to engage with content that is catered to them. Google’s Eric Schmidt puts it this way:
“It will be very hard for people to watch or consume something that has not in some sense been tailored to them”.
CDNs are no longer enough to ensure that your website or online application is fast.
How Do You Optimize a CDN?
This is a difficult task. The CDN industry has giants like Akamai, CloudFlare, and Fastly. There are many others and some have a 30-year head start.
CDNs do have a weakness. To understand CDN optimization let’s discuss how a CDN works, and the types of Internet content.
What is a CDN?
The concept of a CDN is not much different than the cache on your web browser. Whenever your browser loads a website, it saves or caches a copy of it. So, when you revisit that website your browser doesn’t have to fetch the content again. Rather, the website server displays the content already in your cache. CDNs take this concept and use it on the public Internet.
Internet content delivery is limited by distance. The greater the distance between a web server and user, the longer it takes for the website content to load.
CDNs work by bringing content closer to end users. This decreases the distance data has to travel. CDNs deploy multiple edge servers around the world. Whenever a client requests content, it is served from the geographically nearest edge server. This results in faster load times.
There is one small problem with caching content at edge locations. It works well for content like PDF files or images. It is not so useful for search result pages or real time video streaming. The reason for this is the nature of the content itself. PDF files or images are static content. Static content does not change over a period of time. Search results or video streaming are dynamic and continuously updated.
Let’s dive into these two types of content to determine CDN optimization.
What is Static Content?
Static content does not change over a period of time. If it does change, the changes are predictable. Static content includes images, PDF files and CSS sheets. Because of this, CDNs can cache a copy of the content at their edge servers. They can then serve it whenever a client requests it.
Static content also has another subdivision called event driven content. Event driven content is static in nature, but the changes are unpredictable. Event driven content remains static over unpredictable durations of time. This inherent unpredictability presents problems for CDNs.
The problem is determining the duration to cache content. Most CDNs solve this by caching this content for short duration’s. Some CDNs also use a purging mechanism. This purges event driven content as soon as an event occurs.
What is Dynamic Content?
Dynamic content is content which is continuously changing. Every request for dynamic content is forwarded to the origin servers.
The changing nature of the Internet has driven the creation of dynamic content. It has resulted in increasing personalization of web services. Content on the social web is shaped around individual end users.
Who Creates Dynamic Content?
Dynamic content is any content on a website that continuously changes with user requests. For example, an eCommerce website that has product recommendations based on previous buying history. Or, two users seeing completely different article recommendations from a news resource. The underlying logic behind these pages runs every time a user visits. This allows them to present unique content.
The checkout process for online transactions also falls into the category of dynamic content. Most website checkout processes use third party services like address validation and credit card authorization. These are time consuming and dynamic in nature.
User accounts on websites or web apps also generate dynamic content. Information contained in user accounts is updated with the latest user preferences, settings and actions.
Real time video streaming, voice over IP, and online gaming need solutions for dynamic content delivery. A CDN has limited benefits in speeding up these services.
While playing an online game you cannot cache a player action. The reason is it has to occur on both player’s screens within milliseconds. Any delay in transmitting these actions will upset the balance of the game and lead to delays and jumps.
The AdTech industry is the most pertinent example of this. During the ad delivery process, decisions about which ad to show to an end user is made in milliseconds. These decisions occur for individual users, and for every webpage that has ad space.
This also occurs for real time video streaming and voice over IP. Services like Twitch are dynamic in nature. Real time streaming videos have to be delivered from the peer through the origin server, then to the end user. Any website with a shopping cart will also generate dynamic content.
How do you Optimize a CDN?
Now we understand the differences between static and dynamic content. It is clear that caching content at edge servers is not optimal for dynamic content. Every time a user takes an action that generates dynamic content, there is an update.
Optimizing a CDN for Dynamic Content Delivery
CDN optimization involves supplementing static content delivery optimization with a platform to optimize dynamic content delivery. The reason is dynamic content is delivered from the origin server for every request. Optimizing dyanamic content delivery from the origin server to the user can result in significant performance improvements.
Optimizing a CDN for Static Content Delivery
CDNs are best at optimizing the delivery of static content from edge servers to users. Event driven content and static content are still fetched from the origin server. This occurs over the Internet, which suffers from frequent congestion and packet loss.
CDNs lack solutions that optimize the content delivery from origin servers to edge locations. Integrating a platform which works around congestion and Internet bottlenecks can improve CDN performance.
Datapath.io optimizes content delivery by re-engineering Internet routing protocols. Internet routing protocols are performance agnostic. Datapath.io re-implements this to make routing decisions based on performance. This helps service providers find the best network routes to users.