...

/

In-depth Investigation on CDN (Part 2)

In-depth Investigation on CDN (Part 2)

Let's learn content consistency mechanisms and the deployment of the proxy server in CDN.

In this lesson, we will understand how content consistency can be achieved using different consistency mechanisms. We will also understand where to deploy the proxy servers and the difference between CDN as a service and specialized CDN.

Content consistency in CDN

Data in the proxy servers should be consistent with the data in the origin servers. There is always a risk of users accessing stale data if proxy servers do not remain consistent with the origin servers. Different consistency mechanisms can be used depending on the Push or Pull models.

  • Periodic polling: Using the Pull model, proxy servers request the origin server periodically for updated data and change the content in the cache accordingly. When content changes infrequently, the polling approach does unnecessary bandwidth consumption. Periodic polling uses Time-to-refresh (TTR) to adjust the time period for requesting updated data from the origin servers.

  • Time-to-live (TTL): Because of the TTR, the proxy servers may uselessly request the origin servers for updated data. Thus, a better approach employed to reduce the refresh messages frequency could be the Time To Live (TTL). In this approach, each object has a TTL attribute assigned by the origin server. The TTL defines the expiration time of the content. The proxy servers serve the same data version to the users until that content expires. Upon expiry, the proxy server checks for an update with the origin server. If the data is changed, it gets the updated data from the origin server and then responds to the user’s requests with the updated data. Otherwise, it keeps the same data with an updated expiry time from the origin servers.

  • Leases: The origin server grants a lease to data sent to a proxy server using this technique. The lease denotes the time interval for which ...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy