Differences between Cache and CDN usage

Asked

Viewed 408 times

1

What are the advantages and disadvantages when using CDN (Content Delivery Network) and Cache and how they can complement each other?

  • 1

    What kind of cache are you talking about?

  • @bigown would be a content cache server. I’m thinking of a case where a company needs to provide content (e.g. Netflix) and what would be the advantages of using cache or Cdn and how they can complement each other. I can put that in the question if necessary.

1 answer

3


Assuming that the mentioned cache server does the same as a CDN, the main difference is the content distribution. In CDN it can be delivered by a server closer to the requester, which decreases latency and therefore the user experience improves.

In some cases the content may be universal and "all" the sites use the same URL to pick up, which helps stay in the browser cache, so you may not even have to load the jQuery (or Angular or Blazor) that your site uses because it is already in the user’s browser. This is only possible if you do not use a custom jQuery file or hosted by you.

These companies are specialized in this, they know how to set up the infrastructure, deal with various attacks, you just have to set up to put the content there. It is usually highly available.

In compensation it tends to cost more in several cases.

CDN has several mechanisms to help in the best performance. Cache is not always the most appropriate mechanism.

One of the perks of it is that it can handle streaming better than a cache that only works well with small objects. Even it can use Multicasting that can greatly reduce bandwidth consumption and end up making the cost lower. Live content benefits from CDN for this.

Content that changes with some frequency can be better delivered by the cache. But nothing prevents this change from being reflected in the CDN cache for other advantages. The function of your own cache is best utilized for this type of content.

There is no guarantee that the CDN will deliver better in all cases.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.