Dynamic content caching is a buzz word in the Content Delivery Network industry: Everyone wants it, many CDNs claim to offer it, but only a few make it truly accessible. However, the real value of dynamic caching is something not often discussed: saving hosting and server costs. Here’s how it works.
What is Dynamic Caching?
The name “dynamic” implies that this is content that changes regularly or is unique for each website user. In reality dynamic caching usually refers to caching of the HTML document, which is the building block of the entire webpage and can change quite frequently. This is especially true for ecommerce sites or media sites who are updating content on pages regularly to reflect the latest articles, featured products, or prices.
Dynamic content does not include content that is different for each user, such as the account information often displayed in the upper corner of a webpage: this content should not be cached.
Reduce Server Costs with Dynamic Caching
Here’s why caching of the HTML document is so valuable and why it results in higher speed than caching of static objects such as images:
Because of this stress on the origin servers, website managers need to plan for the maximum amount of traffic they believe they will have at any time. This means buying servers for peak traffic times, even if those peaks are only reached 1% of the time.
When the HTML document is cached, the caching server (such as Varnish Cache) is the only one making a request to the origin server: If the HTML document is set to live for 1 minute, then the caching server would make one request back to the origin server per minute, whether there are 10 visitors or 1,000 visitors going to the website in that minute.
This means the website servers are freed up for critical transactions such as the check-out process, increasing the number of visitors that can be served at once and at the same time reducing the number of servers that need to be bought in case of peak traffic. This saves businesses in hosting costs and ensures users still have a good experience.
CDNs and Dynamic Caching
Due to the high value of dynamic caching both in performance benefits and server costs, it seems that every website out there would want to take advantage of this practice. However, because the HTML document is the backbone of the entire webpage, many websites feel it is too risky to cache it. This is exasperated by the fact that the vast majority of Content Delivery Networks, which frequently manage caching for sites through a global server network, do not allow for proper testing of the cache configuration.
Without being able to test that HTML caching is set up correctly, websites run the risk that they could take down their entire webpage when the configuration goes live if there are any issues. It was for this reason that section.io created a development environment that pulls the CDN and cache configuration code into a developer’s local environment, so all caching can be tested before going live. By doing this, we empower section.io users to cache their HTML without worrying about issues arising in production.
So, while major CDNs claim to support dynamic caching, the reality is that the majority of their customers will not be caching HTML documents due to the inability to test before going live.
Cache Dynamic Content with section.io
If you are interested in caching dynamic content and improving your website performance, please contact us for a consultation and demo.