Welcome!

Web Performance is a Journey, Not a Destination

Mehdi Daoudi

Subscribe to Mehdi Daoudi: eMailAlertsEmail Alerts
Get Mehdi Daoudi via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Blog Feed Post

This is Why You Need to Cache Your Base Page

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.

But with the invasion of ajax calls, client-side logic implementation and cookie-based Javascript execution, most base-pages are common for all users and, hence, lose the mask of being unique or dynamic.

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.

Non-Cacheable Content:

cdn-cachehttp://assetsblogfly1.catchpoint.com/wp-content/uploads/2016/12/CDN-cach... 300w" sizes="(max-width: 445px) 100vw, 445px" />

Cacheable Content:

cdn-cachinghttp://assetsblogfly2.catchpoint.com/wp-content/uploads/2016/12/CDN-cach... 300w" sizes="(max-width: 445px) 100vw, 445px" />

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.

screen-shot-2016-12-07-at-2-37-25-pmhttp://assetsblogfly1.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 300w, http://assetsblogfly1.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 768w, http://assetsblogfly1.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 624w" sizes="(max-width: 777px) 100vw, 777px" />

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.

screen-shot-2016-12-07-at-2-38-01-pmhttp://assetsblogfly2.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 300w, http://assetsblogfly2.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 768w, http://assetsblogfly2.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 624w" sizes="(max-width: 893px) 100vw, 893px" />

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%.

screen-shot-2016-12-07-at-2-39-14-pmhttp://assetsblogfly1.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 300w, http://assetsblogfly1.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 768w, http://assetsblogfly1.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 624w" sizes="(max-width: 900px) 100vw, 900px" />screen-shot-2016-12-07-at-2-39-56-pmhttp://assetsblogfly2.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 300w, http://assetsblogfly2.catchpoint.com/wp-content/uploads/2016/12/Screen-S... 624w" sizes="(max-width: 644px) 100vw, 644px" />

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.

The post This is Why You Need to Cache Your Base Page appeared first on Catchpoint's Blog.

Read the original blog entry...

More Stories By Mehdi Daoudi

Catchpoint radically transforms the way businesses manage, monitor, and test the performance of online applications. Truly understand and improve user experience with clear visibility into complex, distributed online systems.

Founded in 2008 by four DoubleClick / Google executives with a passion for speed, reliability and overall better online experiences, Catchpoint has now become the most innovative provider of web performance testing and monitoring solutions. We are a team with expertise in designing, building, operating, scaling and monitoring highly transactional Internet services used by thousands of companies and impacting the experience of millions of users. Catchpoint is funded by top-tier venture capital firm, Battery Ventures, which has invested in category leaders such as Akamai, Omniture (Adobe Systems), Optimizely, Tealium, BazaarVoice, Marketo and many more.