AS216394 · WireShield

Network Operations

How to keep your site up when your server is down: serving stale content and Always Live

When your origin server stops responding, visitors can see the last good copy of each page instead of an error. Learn how it works, its limits and how to set it up.

Always Live: while the origin server is not responding, WireShield serves visitors the last good copy of the page

The most practical way to keep your site up when your server stops responding is to serve visitors the last good copy of each page from the cache instead of an error page. If the layer in front of you (a CDN or WAF) already stores your pages, visitors keep seeing the site even while the origin server is down for a while. Always Live in WireShield Web Protection does exactly this: when the origin server stops responding, visitors see the last good copy of each page, and the feature is on by default. This guide explains how to keep your site up during a server outage, the limits of this approach and how to set it up.

Why does an origin server stop responding?

Common reasons why an origin server stops responding, even briefly:

  • A faulty deployment or configuration change.
  • A crash of the database or back-end services.
  • A hosting provider outage or maintenance.
  • Resource exhaustion from a sudden traffic spike.
  • Attacks on the server. Remote DDoS protection filters network-level attacks and Web Protection filters HTTP-level attacks, but an outage can come from another cause too.

Options for keeping the site up during a server outage

MethodHow it worksUpsideDownside
Static maintenance pageA fixed "we'll be back" page is shown instead of the errorSimpleVisitors cannot see the site
Failover serverTraffic switches to a second origin serverContent stays liveExtra infrastructure and synchronisation cost
Serving stale contentThe last good copy from the cache is servedNo extra infrastructure, pages stay visibleOnly content that was cached; data can be old

Serving stale content is the lowest-cost approach for most content sites, brochure sites and documentation sites.

How does serving stale content work?

The idea rests on standard HTTP caching behaviour. The IETF's RFC 5861 defines the stale-if-error extension: when the origin server returns a 500, 502, 503 or 504 error, or there is a network or DNS problem, the cache may keep serving an expired response. The main HTTP caching standard, RFC 9111, also defines that caches may serve stale responses under certain conditions. In a protection layer that works the same way, if the origin server does not respond when a visitor requests a page, the last good copy from the cache is served.

What can and cannot be served?

For a copy to be served from the cache, the page must have been cached earlier. So:

  • Can be served: Public pages that rarely change: home page, product and service pages, blog, documentation, pricing.
  • Cannot be served: Pages specific to a logged-in user (account, cart, checkout), form submissions and personalised API responses. These should not be cached anyway.
  • May be old: The copy shows the content from the last good moment; updates you make during the outage are not visible to visitors.

How does WireShield Always Live work?

Always Live in Web Protection provides the following:

  • When the origin server stops responding, visitors see the last good copy of each page instead of an error page.
  • It is on by default; you do not need to switch it on.
  • It works with the cache. The last good copies come from the WireShield cache. By default the cache stores only static files (js, css, images, fonts, pdf). For copies of your HTML pages to be served too, you need to add a cache rule that caches HTML.
  • Cache rules apply: Only GET and HEAD requests are stored; the cache is not used when the origin server returns no-store or private, when the response sets a cookie (Set-Cookie) or when the request carries an Authorization header. Personalised pages are therefore not served as copies.

Setup checklist

  1. Review your cache rules. Are your public HTML pages cached? If not, add a rule for HTML.
  2. Keep personalised paths out. Exclude paths such as /api/ or /account/ from the cache.
  3. Set the cache duration. Cache duration and query parameter settings decide which copy is kept and for how long.
  4. Turn development mode off when you are done. While development mode is on, the cache is bypassed and every request goes to the origin server.
  5. Watch the cache statistics. A high hit ratio means more copies available during an outage.
  6. Plan the outage in advance. Know which pages will stay up and which will not when your origin server stops responding.

Frequently asked questions

Do I have to change a setting to turn on Always Live?

No, it is on by default. What matters is that your pages are cached; HTML pages need a cache rule.

If my origin server crashes, will my forms and login still work?

No. The cache only stores GET and HEAD requests; form submissions and personalised pages cannot be served as copies. Always Live keeps public pages visible.

Do visitors see old content?

Yes, they see the last good copy. New changes you make during the outage are not visible until the server is back.

Is Always Live DDoS protection?

No. Against DDoS attacks you need remote or inline protection that filters in front of your link. Always Live aims to keep public pages visible whatever the cause of the outage.

What happens if I purge the cache?

If you purge the cache, the stored copies are deleted too, and if the origin server is not responding there is no copy left to serve. Purge while your origin server is healthy.

Sources

Next step

Let us plan your cache rules and outage scenario together. You can look at the Always Live section on the Web Protection page or talk to the technical team.

All posts

Let’s review the right protection model for your network together.

Contact our team to talk through your technical needs.