NGINX can be configured to deliver stale content from its cache when it can’t get fresh content
location / { # ... proxy_cache_use_stale error timeout http_503; # ... }
With this sample configuration, if NGINX receives an error, timeout, or any of the specified 5xx errors from the origin server and it has a stale version of the requested file in its cache, it delivers the stale file instead of relaying the error to the client. https://blog.nginx.org/blog/nginx-caching-guide