mirror of
https://github.com/tmrts/go-patterns.git
synced 2024-11-21 20:46:08 +03:00
Circuit breaker markdown
This commit is contained in:
parent
5ee14c58f3
commit
9d21f856cd
@ -88,7 +88,7 @@ __Stability Patterns__:
|
||||
| Pattern | Description |
|
||||
|:-------:| ----------- |
|
||||
| TODO: [Bulkheads](stability/bulkhead.md) | Enforces a principle of failure containment (i.e. prevents cascading failures) |
|
||||
| [Circuit-Breaker](stability/circuitbreaker.go) | Stops the flow of the requests when requests are likely to fail |
|
||||
| [Circuit-Breaker](stability/circuit_breaker.md) | Stops the flow of the requests when requests are likely to fail |
|
||||
| TODO: [Deadline](stability/deadline.md) | Allows clients to stop waiting for a response once the probability of response becomes low (e.g. after waiting 10 seconds for a page refresh)|
|
||||
| TODO: [Fail-Fast](stability/fail_fast.md) | Checks the availability of required resources at the start of a request and fails if the requirements are not satisfied |
|
||||
| TODO: [Handshaking](stability/handshaking.md) | Asks a component if it can take any more load, if it can't the request is declined |
|
||||
|
7
stability/circuit_breaker.md
Normal file
7
stability/circuit_breaker.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Circuit Breaker Pattern
|
||||
|
||||
The [circuit breaker design pattern](https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern) is used to detect failures and encapsulates logic of preventing a failure to reoccur constantly.
|
||||
|
||||
# Implementation and Example
|
||||
|
||||
An example of implementation and usage can be found in [circuitbreaker.go](circuitbreaker.go).
|
Loading…
Reference in New Issue
Block a user