An origin server is the original source of content distributed by a content delivery network (CDN). Examples include webpages, images, CSS files, and streaming media. A CDN retrieves data from the origin server and replicates it on edge servers around the world.
An origin server may be a dedicated or virtual web servers located at a web host. It is the physical server webmasters access when adding or updating website content and acts as the "source of truth" for the connected CDN. When a user accesses a resource not already cached on a specific edge node, the CDN will retrieve the page from the origin, then cache it on the corresponding edge server.
Below are common origin server operations:
- Push - the origin server "pushes" content to CDN, replicating the content across multiple edge nodes
- Pull - the CDN "pulls" content from the origin server when it updates a resource or caches it for the first time
- Purge - the CDN removes an object from all edge servers, which is useful when updating a file on the origin server
NOTE: Most CDNs can be configured with custom caching directives, such as max-age or expires, which indicate how frequently the CDN should check the origin server for an updated file.