One of the most challenging aspects of optimizing web page performance while using a CDN is the handling of the base page delivery (also referred as HTML, Homepage, Landing Page). Part of the what makes this so difficult is the perceived “non-cacheability” of dynamic base pages.
Historically, the base-pages were considered to be dynamic because they changed very frequently or were unique upon every request. CDNs completely ignored this type of content in their caching strategies, only leveraging their route optimization capabilities.
Here is a good rule of thumb for differentiating between content types:
Homepage of your favorite ecommerce website: “Dynamic” by historical definition, but the landing page is same for all users who are not logged in. Hence, it is cCacheable
Homepage of your favorite ecommerce website after logging in: The homepage is now custom to your historical buying patterns, recommendations, and suggestions. Hence, this is personalized and non-cacheable.
Unless it’s truly dynamic (contents that change on every request) or security compliance data, not caching these pages means missing out on a very simple performance optimization technique.
Catchpoint uses the “wait” metric to measure this exact event. The time from when the request is sent, to when the first packet of response data is received from the server.
So if the base page is non-cacheable, this time also includes the time the CDN server takes to fetch the content from your Origin server and serve to the end-user.
Using Catchpoint’s Insight feature, we were able to monitor the performance of each web server in a webfarm for a website.
Insight provides you with visibility into end-to-end application performance and the ability to correlate external monitoring data to internal performance indicators while identifying performance problems, using custom metrics based on the information passed through header and response content.
Using Insight, we were able to attribute the sudden drop in wait times to the website’s change in the CDN caching policy.
The wait times were slashed by over 96% by enabling base-page caching.
Using Tracepoint (a custom metric), we captured the cacheability of the object. The wait times dropped as soon as caching was enabled (tcp_hit, tcp_mem_hit).
This had a direct impact on the render start time and the response time (time to download HTML).
Render start times improved by 25% and response times improved by over 75%.
Moral of the story: Cache the base page. Even if the page changes at a frequent interval, cache it. Caching pages for TTLs of as low as 1 minute will improve the response times significantly and greatly offload origin traffic.