简体   繁体   English

NGINX 反向代理 - 预加载缓存

[英]NGINX Reverse Proxy - Preload the cache

NGINX Reverse Proxy is working well. NGINX 反向代理运行良好。 Using the cache it's possible to store static content on every Reverse Proxy to reduce traffic on the main server.使用缓存可以在每个反向代理上存储 static 内容,以减少主服务器上的流量。 I can set a time after the last access it will be removed - so far I know.我可以在最后一次访问后设置一个时间,它将被删除 - 到目前为止我知道。

Having more Reverse Proxies - is it possible to sync the cache between the Reverse Proxys or preload a special file to all of them?拥有更多反向代理 - 是否可以在反向代理之间同步缓存或为所有反向代理预加载特殊文件? And if yes, how I can do it?如果是,我该怎么做? This would be a good speed up for new bigger files.对于新的更大的文件,这将是一个很好的加速。

You could locate the cache files and synch them across your servers with something like rsync.你可以找到缓存文件并使用类似 rsync 的东西在你的服务器之间同步它们。

To pre-load a cache you'd have to curl each possible URL.要预加载缓存,您必须 curl 每个可能的 URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM