@@ -9,22 +9,22 @@ The circuit breakers are always assigned to backend hosts, so that the outcome o
9
9
affects the circuit breaker behavior of another host. Besides hosts, individual routes can have separate circuit
10
10
breakers, too.
11
11
12
- Breaker Type - Consecutive Failures
12
+ # Breaker Type - Consecutive Failures
13
13
14
14
This breaker opens when the proxy couldn't connect to a backend or received a >=500 status code at least N times
15
15
in a row. When open, the proxy returns 503 - Service Unavailable response during the breaker timeout. After this
16
16
timeout, the breaker goes into half-open state, in which it expects that M number of requests succeed. The
17
17
requests in the half-open state are accepted concurrently. If any of the requests during the half-open state
18
18
fails, the breaker goes back to open state. If all succeed, it goes to closed state again.
19
19
20
- Breaker Type - Failure Rate
20
+ # Breaker Type - Failure Rate
21
21
22
22
The "rate breaker" works similar to the "consecutive breaker", but instead of considering N consecutive failures
23
23
for going open, it maintains a sliding window of the last M events, both successes and failures, and opens only
24
24
when the number of failures reaches N within the window. This way the sliding window is not time based and
25
25
allows the same breaker characteristics for low and high rate traffic.
26
26
27
- Usage
27
+ # Usage
28
28
29
29
When imported as a package, the Registry can be used to hold the circuit breakers and their settings. On a
30
30
higher level, the circuit breaker settings can be simply passed to skipper as part of the skipper.Options
@@ -63,54 +63,54 @@ Setting global values happens the same way as setting host values, but leaving t
63
63
route based values happens with filters in the route definitions.
64
64
(https://godoc.org/github.com/zalando/skipper/filters/circuit)
65
65
66
- Settings - Type
66
+ # Settings - Type
67
67
68
68
It can be ConsecutiveFailures, FailureRate or Disabled, where the first two values select which breaker to use,
69
69
while the Disabled value can override a global or host configuration disabling the circuit breaker for the
70
70
specific host or route.
71
71
72
72
Command line name: type. Possible command line values: consecutive, rate, disabled.
73
73
74
- Settings - Host
74
+ # Settings - Host
75
75
76
76
The Host field indicates to which backend host should the current set of settings be applied. Leaving it empty
77
77
indicates global settings.
78
78
79
79
Command line name: host.
80
80
81
- Settings - Window
81
+ # Settings - Window
82
82
83
83
The window value sets the size of the sliding counter window of the failure rate breaker.
84
84
85
85
Command line name: window. Possible command line values: any positive integer.
86
86
87
- Settings - Failures
87
+ # Settings - Failures
88
88
89
89
The failures value sets the max failure count for both the "consecutive" and "rate" breakers.
90
90
91
91
Command line name: failures. Possible command line values: any positive integer.
92
92
93
- Settings - Timeout
93
+ # Settings - Timeout
94
94
95
95
With the timeout we can set how long the breaker should stay open, before becoming half-open.
96
96
97
97
Command line name: timeout. Possible command line values: any positive integer as milliseconds or a duration
98
98
string, e.g. 15m30s.
99
99
100
- Settings - Half-Open Requests
100
+ # Settings - Half-Open Requests
101
101
102
102
Defines the number of requests expected to succeed while the circuit breaker is in the half-open state.
103
103
104
104
Command line name: half-open-requests. Possible command line values: any positive integer.
105
105
106
- Settings - Idle TTL
106
+ # Settings - Idle TTL
107
107
108
108
Defines the idle timeout after which a circuit breaker gets recycled, if it hasn't been used.
109
109
110
110
Command line name: idle-ttl. Possible command line values: any positive integer as milliseconds or a duration
111
111
string, e.g. 15m30s.
112
112
113
- Filters
113
+ # Filters
114
114
115
115
The following circuit breaker filters are supported: consecutiveBreaker(), rateBreaker() and disableBreaker().
116
116
@@ -129,7 +129,7 @@ route that it appears in.
129
129
130
130
disableBreaker()
131
131
132
- Proxy Usage
132
+ # Proxy Usage
133
133
134
134
The proxy, when circuit breakers are configured, uses them for backend connections. It checks the breaker for
135
135
the current backend host if it's closed before making backend requests. It reports the outcome of the request to
@@ -139,7 +139,7 @@ breaker is open, the proxy doesn't try to make backend requests, and returns a r
139
139
140
140
X-Circuit-Open: true
141
141
142
- Registry
142
+ # Registry
143
143
144
144
The active circuit breakers are stored in a registry. They are created on-demand, for the requested settings.
145
145
The registry synchronizes access to the shared circuit breakers. When the registry detects that a circuit
0 commit comments