Skip to content

Commit

Permalink
Add defaults and env control of the fin timeouts in the router
Browse files Browse the repository at this point in the history
Set defaults for the fin timeouts and expose them as environment
variable controls to the user.

The new environment variables are:
 - ROUTER_CLIENT_FIN_TIMEOUT: Controls the fin timeout to the client of
     haproxy (default 1s)
 - ROUTER_DEFAULT_SERVER_FIN_TIMEOUT: Controls the fin timeout to the
     server haproxy contacts, i.e. in the cluster (default 1s)
  • Loading branch information
knobunc committed May 16, 2017
1 parent aa4f611 commit 3939a73
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions images/router/haproxy/conf/haproxy-config.template
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,21 @@ defaults
{{- else }}
timeout client 30s
{{- end }}
{{- if (matchPattern "[1-9][0-9]*(us|ms|s|m|h|d)?" (env "ROUTER_CLIENT_FIN_TIMEOUT" "")) }}
timeout client-fin {{env "ROUTER_CLIENT_FIN_TIMEOUT" "1s"}}
{{- else }}
timeout client-fin 1s
{{- end }}
{{- if (matchPattern "[1-9][0-9]*(us|ms|s|m|h|d)?" (env "ROUTER_DEFAULT_SERVER_TIMEOUT" "")) }}
timeout server {{env "ROUTER_DEFAULT_SERVER_TIMEOUT" "30s"}}
{{- else }}
timeout server 30s
{{- end }}
{{- if (matchPattern "[1-9][0-9]*(us|ms|s|m|h|d)?" (env "ROUTER_DEFAULT_SERVER_FIN_TIMEOUT" "")) }}
timeout server-fin {{env "ROUTER_DEFAULT_SERVER_FIN_TIMEOUT" "1s"}}
{{- else }}
timeout server-fin 1s
{{- end }}
{{- if (matchPattern "[1-9][0-9]*(us|ms|s|m|h|d)?" (env "ROUTER_SLOWLORIS_TIMEOUT" "")) }}
timeout http-request {{env "ROUTER_SLOWLORIS_TIMEOUT" "10s" }}
{{- else }}
Expand Down

0 comments on commit 3939a73

Please sign in to comment.