Welcome! Log In Create A New Profile

Advanced

Serving cached expired content?

September 02, 2009 02:44PM
Hi all, new to Nginx here and am investigating whether it can possibly replace our current configuration in production.

I've searched a bit on this but haven't come up with much:
We run a web cluster that serves files (updates) for download for our software that clients run, and the files are updated every 30-60 seconds. Our cache-control headers for certain file types are set to 5 seconds to make sure clients are always pulling the most up-to-date update.

Right now we use Apache on the front end and Squid behind Apache on the same system (this setup duplicated on many systems). This allows every incoming http request to Apache to look to Squid for the file, and squid either serves from cache or pulls from the source creating the files if the cached file is expired.

Our requirement is that due to the 5 second cache expiration settings, we need squid to continue to serve stale files if a cached file expires and the backend server isn't responding (server down, etc) so that our clients servers don't log http errors. Squid permits this via the stale-if-error directive.

Our current solution works, but wastes system resources since this means that for every connection to a web server, a corresponding 2nd connection is created (to squid). What we'd prefer to do is replace the Apache+Squid solution with Nginx, but I haven't found anything in the documentation or forums/mailing lists with any mention of if Nginx can be configured to serve stale cached content if the source is down.

Can anyone shed any light? Thanks!
Subject Author Posted

Serving cached expired content?

ryanjwh September 02, 2009 02:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready