The Serve Stale Content feature is a critical fault tolerance and availability measure in ESA. When your origin server experiences an issue, such as a timeout or returning a 4xx or 5xx error, ESA points of presence (POPs) can serve expired cached content for static resources. This ensures your website remains accessible and improves availability and user experience, even during brief origin server outages. This feature is not applicable to dynamic resource requests.
How it works
Use cases
Origin server failure or unavailability: If an origin server becomes unavailable due to a server crash, network interruption, or application error, ESA points of presence (POPs) cannot fetch the latest content.
If the Serve Stale Content feature is not enabled, an ESA node forwards user requests to the origin server, but these requests may fail if the origin server is unavailable, preventing users from accessing the website.
After the Serve Stale Content feature is enabled, ESA POPs can return expired cached content to users even if the origin server is unavailable, ensuring website accessibility.
Procedure
In the ESA console, go to Websites. In the Website column, click the name of your target website.
In the left-side navigation pane, select .
Click Create Rule and enter a Rule Name.
In the If requests match... section, set the matching conditions. For more information, see Rule expression syntax.
In the Cache Eligibility section, specify whether to bypass cache. For more information, see Cache eligibility.
Turn on the Serve Stale Content switch.

Click OK.
FAQ
Why isn't stale content served after deleting an origin file?
The Serve Stale Content feature is triggered only when the origin server returns a 4xx or 5xx HTTP status code, or when the request times out. If you only delete a file from your origin server but the server itself continues to respond normally (for example, by returning a default page with a 200 status code, or by returning a 404 status code), this is not considered an origin fetch failure and will not trigger Serve Stale Content.
If you need to access a file from the cache after it has been deleted from the origin server, confirm the following:
The origin server must be unreachable (for example, the server has crashed, there is a network interruption, or it returns a 5xx error code), not merely that a single file was deleted.
A copy of the file was already cached on the edge node before it was deleted. If the file was never cached, or if the cache was purged, there is no stale content to serve, even if the feature is triggered.
Related documentation
Rule-related features vary in effective priority, reentrancy, and effective granularity. For details, see Characteristics of rule-based features.