Contentstack for Developers
CDN and Caching
CDN and Caching
A Content Delivery Network (CDN) ensures that a cache of your content is stored at various locations around the globe. Consequently, whenever there is a page request, the content is served from the cache of the nearest CDN server, rather than the origin server ensuring quicker content delivery.
How CDN Cache Works in Contentstack
The CDN is always up-to-date. It ensures that the cache is always fresh through purging old data and caching new data.
When any user requests a piece of content, the nearest CDN server checks if it has a cached copy of the requested content. If not, it checks with the shield server. And, if the shield server does not have the cache of the requested content, it fetches the content from the origin server.
A shield server is an extra layer of caching that reduces the load on the origin server. It is located near the origin server, and it saves the cache of content that it serves to any CDN server. So, if any other CDN server requests the same data, the shield server would serve the cached content.
Contentstack automatically purges content from the internal Contentstack CDN when published.
Helpful links: