Pre-Cache CDN Edge Servers with Synthetic Monitoring

CDN Edge Servers

A Content Delivery Network (CDN) is a collection of distributed nodes, called edge servers, connected to the same origin servers and placed local to the users’ location. If you are using a CDN, your website content is delivered to the user from the nearest edge server to their location.  Without a CDN, you are putting stress on the origin server every time a user requests something. If you have many visitors on your website, it would bog down your server making it slower to respond and even worse, become unresponsive to the users.

 

How a CDN Works

Think of CDN as a tree whose root is your origin server and edge servers are the tree nodes. When new content is made available on the origin server, it is distributed and cached on all edge servers. Now when a user makes a DNS request, it is interrupted by CDN, and the content is served from the nearest edge server.  There are two fundamental approaches to implement a CDN cache strategy:

Push Network.  When any new content is uploaded to the website, the origin server pushes this new content to the CDN. Then, CDN takes this new content and distributes across all it’s edge servers to cache it there. This is essentially a pre-caching strategy where we minimize a hit-and-miss when the request for a resource is made the very first time on the network. Cached content is available to the user from the edge server for the subsequent requests.

Pull Network.  In this strategy, there is no pre-caching. When any resource is requested the very first time, CDN goes to the origin server, fetches the content and serves it to the user. This content is then distributed to all the edge servers and put in the cache on edge servers. In this strategy a hit-and-miss occurs, increasing the first load time.

Which one of the two approaches you use depends on your use case and CDN provider you are using. Type of the content also plays an important role here, but a mixed approach of both push and pull strategy is the best when it comes to fully utilizing the power and benefits of a CDN.

 

Static and Dynamic Content

Now, not every piece of content on your site is able to be cached, so let’s talk a bit about the types of content before we dive deep into a better pre-caching strategy using synthetic monitoring.

Static content is basically any file that is stored on a server, for example, images, videos, PDFs, HTML files, CSS files, JavaScript files, etc. it doesn’t change over time, so a static copy is cached and served from the nearest edge server. A browser can also cache the static content until it expires and serves locally from the computer.

Dynamic content, however, is generated on the server-side in response to the user’s request based on location, device, time, personal settings, etc. At one point dynamic content was not able to be cached, but as technologies evolved, dynamic content too can be cached and served from the edge server.

There is an important point to note here from the perspective of a business. If you don’t pre-cache the data, first-time users are most likely going to face a hit-and-miss, thus increasing the latency and having a slower response. With every second of delay, your website’s bounce rate is increases.  9.6 percent of visitors bounce when page load time is 2 seconds and 32.3 percent of users bounce if it is 7 seconds. Those kind of numbers can result in a significant drop in revenue.

More often, regardless of the content type, CDN has a set expiration to purge the cached content and bring in new content from the origin server. This expiration options can be the following:

  • Origin controlled
  • TTL (time to live) specification
  • Never expire
  • Do not cache

 

If users from certain locations don’t make a request for a particular content and the content is expired, then depending upon your cache expiration strategy, they might also face a hit-and-miss scenario resulting into more bounce rate for your website. With CDN implementation in place, we get three main benefits:

  1. Performance.  Speeding up your website performance by reducing latency and server loads.
  2. Availability.  Making your data more available to counter server failure and low-bandwidth.
  3. Security.  Increasing your overall server capacity utilizing a CDN to dodge DDoS and other network attacks on data.

 

So, pre-caching your data on edge servers using an efficient CDN strategy will give you all sorts of advantages. But the question is, with interactive websites, dynamic content, and complex user paths, how do you pre-cache the data? The answer is distributed synthetic monitoring.

 

Synthetic Monitoring

Synthetic monitoring is a mechanism to monitor your websites and applications by simulating users in an interactive environment using tools and scripts. These tools perform traversing of possible guided paths and business transaction activities around-the-clock. By implementing synthetic monitoring for your sites and applications, you get important information about the performance, such as latency, accessibility, broken transactions, etc. There are many third-party SaaS options available but you would want to choose one with a wide array of monitoring solutions. Typically these solutions have click-and-go setup and get you ready in no time.

For example, the web application monitoring solution from Dotcom-Monitor includes a point and click scripting tool called the EveryStep Web Recorder. Simply navigate through your website or application like one of your users would to create scripts that you can use to monitor your web applications.

 

Pre-caching CDN Edge Serves with Synthetic Monitoring

If you are using a CDN, Synthetic monitoring setup for multiple locations will take advantage of the distributed system to perform synthetic monitoring on every edge server to simulate localized users. Thus, requesting the content before any user does, pre-cache the content, and minimizing the first hit-and-miss and loading time for almost all of your users.  As synthetic monitors are set up to perform tests in intervals around the clock, they maximize the chances of detecting new content uploaded before any user could. Thus, pre-caching the content based on location, time, and device and enabling the CDN edge servers to serve the content faster and efficiently.

 

Advantages to Pre-caching CDN Edge Servers

  • Monitoring website uptime across different end-users in multiple locations.
  • Pre-caching the content for speeding up the first load time.
  • Purging and replacing expired CDN cache to deal with frequent hit-and-miss.
  • Monitoring complex business transactions and process flow.
  • Detecting server and application failures and implementing a fail-safe.
  • Spot and fix issues before they affect end-users.
  • Baselining and benchmarking for improvement strategies.
  • Analyze UX from the end-user perspective.

 

If you are using a CDN but haven’t implemented synthetic monitoring, you may want to have synthetic monitoring in place for your application to make the best of the content delivery mechanism and rack in the unconsciously lost revenue.

Try the full Dotcom-Monitor platform free for 30 days.

 

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on email
Email
Share on print
Print