开发者

Nginx reverse-proxy cache invalidation strategies

开发者 https://www.devze.com 2023-02-10 06:34 出处:网络
I\'ve been using Nginx 0.8.5 as a caching reverse-proxy to build out a custom cdn-like solution to speed up our site\'s load time. It works great so far except that cache invalidation is really cludgy

I've been using Nginx 0.8.5 as a caching reverse-proxy to build out a custom cdn-like solution to speed up our site's load time. It works great so far except that cache invalidation is really cludgy, even with the cache purge module installed.

For example, sometimes we may need to invalidat开发者_C百科e 100 urls at once, and this requires 100 different requests to get sent out to each Caching reverse-proxy server.

This hardly works with just two cache servers set up, and our plans are to scale to 20 servers, so we need to find a better solution. Any ideas?

Simply reconfiguring Nginx won't work, and I'm sure that we will need to custom-code something. And we don't want to get involved in custom Nginx module development.


maybe this approach will help you: Purging the Cache(in the end)

basically instead of using the purge module they just show you how to delete the nginx files directly, so you can make some easy script that will get urls and will purge them directly

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

0

精彩评论

暂无评论...
验证码 换一张
取 消