nginxcaching问题与多个上游
我有一个奇怪的问题与两个相同的上游nginx代理+caching设置代理。 我有两个相同的上游服务器设置在主动/备份configuration。 caching工作正常的服务器之一,但只要我切换活动/备份configuration和重新加载nginx,我没有得到任何caching命中,并错误日志满足这些: 2017/06/15 10:14:21 [warn] 19048#19048: *2562 an upstream response is buffered to a temporary file /mnt/cache/temp/0000000504 while reading upstream, client: <CLIENT IP>, server: , request: "GET /secure/assets/file.ts?id=456 HTTP/1.1", upstream: "http://<UPSTREAM IP>:80/assets/file.ts", host: "server-host" 现在,我找不到为什么nginx必须缓冲一个上游而不是另一个的响应,因为上游服务器有完全相同的文件,并且坐在同一个networking中。 现在,configuration的相关部分: http { tcp_nodelay on; proxy_cache_path /mnt/cache/cache keys_zone=one:20m inactive=24h loader_threshold=300 loader_files=200 max_size=180g; proxy_cache_key $uri; upstream master-cdn { server cdn1 […]