There are some objects whose names aptly describe their function. For example, a screwdriver drives screws, a sunblock blocks the sun, and a content delivery network is a network that delivers content. However, of the three examples given, a CDN is the most complex by far. One complexity involves the types of content and the locations where the content is hosted.
What Is the Difference Between an Origin Server and a CDN Server?
Before discussing content, it might be helpful to review the difference between an origin server and a CDN server.
- An origin server holds the original version of the content that you want to provide to your users. This is typically your website. If you have multiple origin servers, each server can hold identical content or content that is geared to the specific geographic area in which the origin server is located.
- CDN servers, also known as edge servers or PoPs, can deliver cached content to users or request dynamic content from your origin server. One origin server can handle multiple CDN servers. CDN servers are physically located as near as possible to the user to reduce latency and enhance performance.
The Different Types of Content Typical Placement
When you have a CDN service, you can store a variety of content on both origin and edge servers. Static content is the type of content that seldom changes, including CSS stylesheets and images. Dynamic content is generated or served on demand and may include HTML files and videos.
CDN content may be pushed or pulled. In a typical configuration, the pull zone is the website that exists on the origin server, and content is automatically pulled from the origin to the edge servers for delivery to the users.
In a typical method utilizing a push zone, you manually upload your content to a storage cloud. From there, the content is delivered to the edge servers. Push is often preferred for large files.
To illustrate, if the name of your website is www.yourcompany.com, this is your origin domain. Static and video content that is to be pulled will reside on your origin domain. If you choose to PoP to cache your CDN content, the static and video content to be pushed will reside at the selected storage point; one example of a storage label could be My Storage.
If a user requests content that does not exist on the CDN edge server, a request will be sent to retrieve the data from the origin. The asset will be delivered to the user, and it will then be stored on the edge server for the time you specified when configuring your CDN service. If repeated requests are made by the same user, the response will come from the edge server, reducing the time that the user must wait for the content to load.
However, if the request goes to an edge server on which the content is not yet cached, the asset must be retrieved from the origin server. One common method of increasing load speed is to prefetch or preload the content to all edge servers. Reducing latency and improving site speed also reduces the likelihood that visitors will grow impatient and bail.
Closing Thoughts
A properly configured CDN can be an extremely valuable tool for any business that needs to keep visitors happy and engaged. Knowing how to manage your CDN and origin content can help you get the most from your service.