Nginx Reverse Proxy Cache Cancellation Strategies

I am using Nginx 0.8.5 as a caching reverse proxy to create a custom cdn solution to speed up the loading time of our site. It has been working fine so far, except that the cache invalidation is really awkward, even with the cache flushing module installed.

For example, sometimes we may need to immediately invalidate 100 URLs, and this requires 100 different requests to send a reverse proxy cache to each caching server.

This hardly works with the settings of only two cache servers, and our plans are scaled to 20 servers, so we need to find the best solution. Any ideas?

A simple reconfiguration of Nginx will not work, and I'm sure we will need to configure something. And we do not want to participate in the development of custom Nginx modules.

+6
caching reverse-proxy nginx
source share
1 answer

Perhaps this approach will help you: Clear the cache (at the end)

basically instead of using the cleanup module, they just show you how to delete nginx files directly, so you can make some simple scripts that will get the urls and clean them directly

The cache naming convention is based on the variables that we set for the fastcgicachekey directive ... Passing this line through MD5 hashing ... get the directory and delete the files

0
source share

All Articles