]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tilecache/templates/default/squid.conf.erb
tilecache: balance localhost backend
[chef.git] / cookbooks / tilecache / templates / default / squid.conf.erb
index f0a04bcd430d190fce5edc48c53174e1dcc00b85..aa3af2ff900a52d5e63d50f7d62d6589be2b15f4 100644 (file)
@@ -117,18 +117,16 @@ acl tile_caches src <%= address %>
 <% end -%>
 <% end -%>
 
-<% if node[:squid][:version] == 2 -%>
 # Siblings
 <% node[:tilecache][:tile_siblings].each do |sibling| -%>
-cache_peer <%= sibling %> sibling 3128 3130 weight=1500
-<% end -%>
+cache_peer <%= sibling %> sibling 3128 4827 htcp weight=1500
 <% end -%>
 
 # Primary Parent
 <% if node[:squid][:version] < 4 -%>
 cache_peer <%= node[:tilecache][:tile_parent] %> parent 443 0 no-query originserver name=osmtileAccel login=PASS connect-timeout=120 no-digest weight=1000 ssl ssldomain=render.openstreetmap.org
 <% else -%>
-cache_peer <%= node[:tilecache][:tile_parent] %> parent 443 0 no-query originserver name=osmtileAccel login=PASS connect-timeout=120 no-digest weight=1000 tls tlsdomain=render.openstreetmap.org
+cache_peer <%= node[:tilecache][:tile_parent] %> parent 443 0 no-query originserver name=osmtileAccel login=PASS connect-timeout=120 no-digest weight=1000 tls tlsdomain=render.openstreetmap.org standby=32
 <% end -%>
 cache_peer_access osmtileAccel allow osmtile_sites
 
@@ -153,9 +151,14 @@ acl pool_unlimited src <%= address %>
 
 # Juno Minsk office - me@komzpa.net
 acl pool_unlimited src 212.98.173.54
+<% if node[:squid][:version] < 4 -%>
+
+#Allow tile_caches HTCP access
+htcp_access allow tile_caches
 
 #Allow tile_caches ICP access
 icp_access allow tile_caches
+<% end %>
 
 <% (0..127).each do |i| -%>
 acl pool_<%= sprintf("%03d", 2*i) %> src <%= 2*i %>.0.0.0/7