upstream tile_cache_backend {
server 127.0.0.1;
- keepalive 32;
+ # Add the other caches to relieve pressure if local squid failing
+ # Balancer: round-robin
+<% @caches.each do |cache| -%>
+<% if cache[:hostname] != node[:hostname] -%>
+ # Server <%= cache[:hostname] %>
+<% cache.ipaddresses(:family => :inet, :role => :external).sort.each do |address| -%>
+ server <%= address %> backup;
+<% end -%>
+<% end -%>
+<% end -%>
+
+ keepalive 256;
}
# Rates table based on current cookie value
proxy_http_version 1.1;
proxy_set_header Connection '';
- proxy_connect_timeout 5s;
+ proxy_connect_timeout 10s;
# Preserve host header.
proxy_set_header Host $host;
# Allow Higher Traffic Rate from Approved User-Agents which do not support cookies (uses nginx Map)
if ($approved_scraper) {
- set $limit_rate 32768;
+ set $limit_rate 65536;
}
# Strip any ?query parameters from urls