Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag as EXPIRED, don't delete #40

Open
fgilio opened this issue Nov 27, 2015 · 1 comment
Open

Flag as EXPIRED, don't delete #40

fgilio opened this issue Nov 27, 2015 · 1 comment

Comments

@fgilio
Copy link

fgilio commented Nov 27, 2015

Hi!

When using 'fastcgi_cache_use_stale updating' we can rely on serving and expired cache while the upstream builds a fresh new copy.
But if we delete the cache, there is no expired resource... of course, there is just nothing.

Imagine the situation in which you have a very active site, think a news site, and suddenly you experience a huge traffic spike. If we are serving fastcgi cached pages, everything goes well.
But if editors update the content the cache gets purged (deleted), and every subsequent request go straight to the upstream (if using php5-fpm you can see an army of new processes firing up). If you are lucky everything would normalize in a while... If you aren't, it will all go to hell.

But if we have the ability to flag a cache as EXPIRED, we can leverage 'fastcgi_cache_use_stale updating' to serve the old copy while the new one is being built.

What do you guys think?

@nikolay
Copy link

nikolay commented Dec 10, 2015

This is a good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants