-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.toml.example
178 lines (162 loc) · 3.42 KB
/
config.toml.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# Basic configuration
#
# HTTP:
# lb-address = "127.0.0.1:8080"
#
# SSL:
# lb-enable-ssl = false
# lb-ssl-address = "127.0.0.1:8181"
# lb-ssl-cert = "certs/ssl.crt"
# lb-ssl-key = "certs/ssl.key"
#
# Default:
# lb-log-file = "" # while directive is empty - logging is disabled
#
#
# API
#
# Defaults:
# api-address = "127.0.0.1:9090"
# api-login = "lb"
# api-password = "7eNQ4iWLgDw4Q6w"
#
#
# WEB
#
# Defaults:
# web-address = "127.0.0.1:9191"
# web-login = "admin"
# web-password = "7eNQ4iWLgDw4Q6w"
#
#
# Default instances under Load Balancer
#
# [Servers]
# [Servers.web-1]
# url = "http://127.0.0.1:8081"
# weight = 1
# type = "down" # standard/mirror/backup/down; default: standard
#
# [Servers.web-2]
# url = "http://127.0.0.1:8082"
# weight = 1
#
# Default:
# [Servers]
#
# Failover Predicates
#
# IsNetworkError() # failover on network error
# Attempts() <= 1 # allows only 1 failover attempt
# RequestMethod() == "GET" # failover for GET requests only
# ResponseCode() == 408 # failover on 408 HTTP response code
#
# Default:
# stream-retry-conditions = "IsNetworkError() && Attempts() < 10"
# Monitoring
#
# Enable monitoring
#
# Default:
# monitor-broken-backend = false
#
# Remove broken backend
#
# Default:
# remove-broken-backends = true
#
# Time to check (in sec)
#
# Default:
# check-period = 1
#
# Max fails
# Sets the number of unsuccessful attempts to communicate with the server
# that should happen in the duration set by the fail-timeout parameter
# to consider the server unavailable for a duration also set by the
# fail-timeout parameter. By default, the number of unsuccessful attempts
# is set to 1.
#
# Default:
# max-fails = 1
#
# Fail timeout (in sec)
# Sets the time during which the specified number of unsuccessful attempts
# to communicate with the server should happen to consider the server
# unavailable; and the period of time the server will be considered unavailable
#
# Default:
# fail-timeout = 10
#
#
# Hooks
#
# Call script after removing backend
#
# Default:
# bash-script = ""
#
# Call Url after removing backend
#
# Default:
# web-url = ""
# Rebalancer
#
# Rebalancer will readjust load balancer weights based on error ratios
#
# Default:
# enable-rebalancer = false
# Connection Limits
#
# Connection limits control the amount of simultaneous connections per backend.
#
# Default:
# enable-connlimit = false
#
# Default:
# connlimit-connections = 10
#
# Default:
# connlimit-variable = "client.ip" // 'client.ip' or 'request.header.X-My-Header'
# Rate Limits
#
# Rate controls how many requests per period of time is allowed for a location.
#
# Default:
# enable-ratelimit = false
#
# Allowed average requests
# Default:
# ratelimit-requests = 1
#
# Period in seconds, e.g. 3600 to set up hourly rates
# Default:
# ratelimit-period-seconds = 1
#
# Default:
# Burst count, allowed some extra variance for requests exceeding the average rate
# ratelimit-burst = 3
#
# Variable defines how the limiting should be done. e.g. 'client.ip' or 'request.header.X-My-Header'
# Default:
# ratelimit-variable = "client.ip" // 'client.ip' or 'request.header.X-My-Header'
# Tracing
#
# Defaults:
# enable-trace = false
# trace-file = "/tmp/lb.trace.log"
# Statistics
#
# Default:
# statistics-enabled = true
# Mirroring
#
# Defaults:
# enable-mirroring = true
# mirror-http-methods = "GET|HEAD"
# Identification
#
# Defaults:
# enable-x-header = false
# x-header-key = "X-Proxy"
# x-header-val = "L0xyd"