The logic through which requests for content are handled by the CDN is illustrated below.
HTTP Large and HTTP Small:
ADN:
Upon receiving a request for content, an edge server will check to see whether it has a cached version. If it finds a cached version of the requested content, it will calculate the asset's time to live (TTLTime to Live. Refers to the amount of time that a cached asset is still considered fresh. Our edge servers will continue to serve a cached version of an asset while its TTL has not expired. An asset's TTL is calculated by the Cache-Control and Expires headers associated with the response sent by the origin server.) according to its Cache-Control and Expires headers. This TTL determines whether the cached version of the requested content is fresh or stale.
Cache State | Action(s) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
FreshIndicates that the requested content has been previously cached and its TTL has not expired. | An edge server will immediately serve the requested content to the HTTP client. | ||||||||||
StaleIndicates that the requested content has been previously cached and its TTL has expired. |
HTTP Large and HTTP Small An edge server will perform either a standard or conditional GET request to the origin server depending on whether the cached asset contains Last-Modified and/or ETag directives. View additional information.
ADN An edge server will perform either a standard or conditional GET request to the ADN gateway server depending on whether the cached asset contains Last-Modified and/or ETag directives.
View additional information.
|
||||||||||
Not CachedIndicates that the edge server did not find a cached version of the asset. |
HTTP Large and HTTP Small:
ADN:
An edge server and the HTTP client will cache eligible requests. If the ADN gateway server requested the content from the origin server, then it will also cache the requested content. |
This section assumes that content was requested from a customer origin protected by the Origin ShieldThis feature provides a layer of protection for a customer origin server by creating an intermediate caching layer between it and our edge servers. This caching layer resides on one or more of our point-of-presence (POPs). Requests that have not been previously cached on a POP will be channelled through the closest origin shield server. The origin shield server will then either serve a cached version of the requested content or retrieve it from a customer origin server. This feature shifts the network load from the customer origin server to the CDN, since most requests will be handled by the origin shield server. feature.
Upon receiving a request for content, an edge server will check to see whether it has a cached version. If it finds a cached version of the requested content, it will calculate the asset's time to live (TTLTime to Live. Refers to the amount of time that a cached asset is still considered fresh. Our edge servers will continue to serve a cached version of an asset while its TTL has not expired. An asset's TTL is calculated by the Cache-Control and Expires headers associated with the response sent by the origin server.) according to its Cache-Control and Expires headers. This TTL determines whether the cached version of the requested content is fresh or stale.
An Origin Shield server determines how to handle the request according to whether it has a cached version of the requested content.
Stale Content & Revalidation: If a cached version of the requested content with an expired TTL is found and it has been assigned a Last-Modified and/or Etag directive, then an Origin Shield server will revalidateRefers to the process that occurs when a request for stale content requires that our edge servers check for a new version of the requested content on the origin server. with the customer origin server.
Revalidation Result | Description |
---|---|
Match |
If the cached version matches the version stored on the origin server, then the following actions will take place:
|
Outdated |
If the cached version is older than the version stored on the customer origin server, then the following actions will take place:
|
Not Found |
If the requested content is not found on the origin server, then a 404 Not Found will be returned to the requester. |
Unknown |
If an Origin Shield server is unable to establish a connection with the origin server, then a stale version of the requested content may be served. Stale content may be served when both of the following conditions are true:
|
Origin Shield Request for New Content
The origin server will provide a response to the client that requested it via the following path:
If eligible, the requested content may then be cached on the Origin Shield server, edge server, and the client.
A default Origin Shield configuration behaves as described above. However, you may have configured your Origin Shield configuration to bypass Origin Shield for certain POPs. This type of configuration will cause an edge server on one of those POPs to perform the standard check for content freshness.