Sitecore Media Library CDN overview
This topic describes the Sitecore Media Library Content Delivery Network (CDN) and how it helps increase performance and availability for your solution.
The CDN is a distributed network platform, which is optimized to deliver web contents efficiently to clients. CDN servers are usually distributed across different physical locations. Having distributed nodes across different geographical locations increases availability. The servers also store cached contents (which increases availability), and act as a mediator between the origin of the web application and clients.
The CDN with the Sitecore Media Library
Without a CDN, the Sitecore Content Delivery (CD) server must respond to every media request of a client, as well as media requests from locations all over the world. All of these requests are directed to the CD server regardless of the location of the client, and bring a lot of traffic to the server. This extra load on the servers can result in latency.
The following diagram shows how the Sitecore CD server responds to media requests:
How a CDN helps increase availability and performance of the Sitecore CD server
When a user requests a media item, the CDN responds to the request by utilizing the closest CDN server to the user. First, the CDN attempts to use the cache of the CDN server, (instead of directing every request to the Sitecore CD servers). If the cache is available and valid, the CDN server responds directly to the user, otherwise it sends a request to Sitecore for the content. The CDN server then stores the content in cache and responds to the user.
The following diagram shows how the CDN helps the Sitecore CD server to respond to media requests:
Sitecore CDN support limitations
Currently the only Sitecore feature that supports a CDN is the Sitecore Media Library. However, developers can customize the media library to use a CDN for static resources or other assets. For example, instead of using relative URLs to link to .css
or .js
files on master pages, you can use absolute URLs to connect to a CDN endpoint.
There are a number of settings that you must be aware of regarding Sitecore Media Library CDN-related configuration and there are further developer considerations for the Sitecore Library CDN support that developers must take into account.