1
0
mirror of https://github.com/tmrts/go-patterns.git synced 2024-11-25 06:26:06 +03:00

Circuit breaker markdown

This commit is contained in:
Anthony Atkinson 2016-09-04 13:52:42 -04:00
parent 5ee14c58f3
commit 9d21f856cd
2 changed files with 8 additions and 1 deletions

View File

@ -88,7 +88,7 @@ __Stability Patterns__:
| Pattern | Description | | Pattern | Description |
|:-------:| ----------- | |:-------:| ----------- |
| TODO: [Bulkheads](stability/bulkhead.md) | Enforces a principle of failure containment (i.e. prevents cascading failures) | | 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: [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: [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 | | TODO: [Handshaking](stability/handshaking.md) | Asks a component if it can take any more load, if it can't the request is declined |

View 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).