# DO NOT EDIT - This file is being maintained by Chef
upstream tile_cache_backend {
- server 127.0.0.1:8080 weight=1000;
- server 127.0.0.2:8080 weight=1000;
+ server 127.0.0.1:8080 weight=1000 max_fails=32;
+ server 127.0.0.2:8080 weight=1000 max_fails=32;
# Add the tile_siblings caches to relieve pressure if local squid failing
# Balancer: round-robin
<% server_weight = 1000 -%>
-<% @node[:tilecache][:tile_siblings].each do |cache_peer| -%>
+<% Array(@node[:tilecache][:tile_siblings]).each do |cache_peer| -%>
<% @caches.each do |cache| -%>
<% if cache_peer == cache[:fqdn] -%>
<% if cache[:hostname] != node[:hostname] -%>
<% cache.ipaddresses(:family => :inet, :role => :external).sort.each do |address| -%>
- server <%= address %>:80 weight=<%= server_weight %> backup; # Server <%= cache[:hostname] %>
+ server <%= address %>:80 weight=<%= server_weight %> max_fails=32 backup; # Server <%= cache[:hostname] %>
<% server_weight -= server_weight.div(2) -%>
<% end -%>
<% end -%>