anchor.diff:    <%- tcp_services.each do |service| -%>
     upstream <%= service[:port] %>_stream_<%= service[:name] %> {
       <%- if has_flannel? -%>
  -    server <%= service[:cluster_ip] %>:<%= service[:source_port] %>;
  +    server <%= service[:cluster_ip] %>:<%= service[:source_port] %> fail_timeout=<%= fail_timeout %>;
       <%- else -%>
       <%- minions.each do |node| -%>
  -    server <%= node[:ip] %>:<%= service[:target_port] %>;
  +    server <%= node[:ip] %>:<%= service[:target_port] %> fail_timeout=<%= fail_timeout %>;
       <%- end # end of the minion iteration -%>
       <%- end # end of the flannel check -%>
     }
  
positive.code:   <%- pool = "#{service[:port]}_#{service[:name]}" -%>
    upstream <%= pool %> {
      <%- if has_flannel? -%>
      server <%= service[:cluster_ip] %>:<%= service[:source_port] %>;
      <%- else -%>
      <%- minions.each do |node| -%>
      server <%= node[:ip] %>:<%= service[:target_port] %>;
      <%- end # end of the minion iteration -%>
      <%- end # end of the flannel check -%>
    }
  
negative.code:     <%- if balancer['ssl'] -%>
      ssl_certificate      <%= balancer['ssl']['cert'] %>;
      ssl_certificate_key  <%= balancer['ssl']['key'] %>;
      <%- if balancer['ssl']['ca'] -%>
      ssl_trusted_certificate <%= balancer['ssl']['ca'] %>;
      <%- end -%>
  
      ssl on;
      ssl_session_cache  builtin:1000  shared:SSL:10m;
      ssl_session_timeout 10m;
      ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
      ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
      ssl_prefer_server_ciphers on;
  