]> git.openstreetmap.org Git - chef.git/commitdiff
tilecache: fix peer weight
authorGrant Slater <git@firefishy.com>
Sun, 5 Apr 2020 20:34:49 +0000 (21:34 +0100)
committerGrant Slater <git@firefishy.com>
Sun, 5 Apr 2020 20:34:49 +0000 (21:34 +0100)
cookbooks/tilecache/templates/default/nginx_tile.conf.erb

index 7c41496b0638b45494ac9965ec47517c65138601..4495f568af839ef6457874b05b9ab61371ac973c 100644 (file)
@@ -4,9 +4,9 @@ upstream tile_cache_backend {
   server 127.0.0.1:8080;
   server 127.0.0.2:8080;
 
-  # Add the other caches to relieve pressure if local squid failing
+  # Add the tile_siblings caches to relieve pressure if local squid failing
   # Balancer: round-robin
-<% server_weight = 10 -%>
+<% server_weight = 20 -%>
 <% @node[:tilecache][:tile_siblings].each do |cache_peer| -%>
 <% @caches.each do |cache| -%>
 <% if cache_peer == cache[:fqdn] -%>
@@ -19,6 +19,8 @@ upstream tile_cache_backend {
 <% end -%>
 <% end -%>
 <% end -%>
+
+  keepalive 128;
 }
 
 # Geo Map of tile caches