Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Dockerfile.builder.linux-amd64-static
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ FROM debian:11
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential \
musl \
musl-dev \
musl-tools \
musl musl-dev musl-tools \
zlib1g-dev \
curl \
ca-certificates \
zlib1g-dev-musl \
curl ca-certificates \
&& ln -sf /usr/bin/musl-gcc /usr/local/bin/x86_64-linux-musl-gcc \
&& rm -rf /var/lib/apt/lists/*

Expand Down
3 changes: 2 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 5.0.2
## 5.0.3
* Refactoring Linux amd64 static build to work on Github Actions
* Creating the docs for config v3

## 5.0.0
* Refactoring config module to support config v3
Expand Down
109 changes: 20 additions & 89 deletions docs/content/2-features/remote-solver-circuitbreaker/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,107 +4,38 @@ title: Remote Solver Circuit Breaker

DPS use circuit breaker strategies to choose the most available Remote Server from the configured ones.

## Static Threshold

* Consider all remote servers circuits as **closed** on app start.
* Opens and closes circuits based on fixed number of failures or successes.


#### Configuration Example

```json
{
"version": 2,
"remoteDnsServers": [],
"envs": [],
"activeEnv": "",
"webServerPort": 5380,
"dnsServerPort": 53,
"logLevel": "INFO",
"logFile": "console",
"registerContainerNames": false,
"domain": "docker",
"dpsNetwork": false,
"dpsNetworkAutoConnect": false,
"defaultDns": true,
"hostMachineHostname": "host.docker",
"serverProtocol": "UDP_TCP",
"dockerHost": null,
"resolvConfOverrideNameServers": true,
"noRemoteServers": false,
"noEntriesResponseCode": 3,
"dockerSolverHostMachineFallbackActive": true,
"solverRemote": {
"circuitBreaker": {
"failureThreshold": 3,
"failureThresholdCapacity": 10,
"successThreshold": 5,
"testDelay": "PT20S"
}
}
}
```

* **failureThreshold**: How many attempts before open the circuit?
* **failureThresholdCapacity**: How many attempts store to the stack?
* **successThreshold**: How many attempts before close the circuit?
* **testDelay**: How much time to wait before test the circuit again?, see [Duration docs][1] for format explanation


## Canary Rate Threshold

* Consider all remote servers circuits as **open** on app start
* Opens and closes circuits based on percentage of failure

#### Consider all remote servers circuits as open on app start

Test them on startup and add the healthy ones as HALF_OPEN this will evict to app get resolution fails right on the
start because the first server on the remote servers list is offline.

#### Configuration Example
Activated by `solver.remote.circuitBreaker.type=CANARY_RATE_THRESHOLD`

| Name | Description | Default Value |
| -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `solver.remote.circuitBreaker.failureRateThreshold` | Failure rate percentage which, when equal to or greater than this value, causes the CircuitBreaker to transition to open. Valid values are greater than 0 and less than or equal to 100. | `21` |
| `solver.remote.circuitBreaker.minimumNumberOfCalls` | Minimum number of calls required (per sliding window) before the CircuitBreaker starts calculating the failure rate. | `50` |
| `solver.remote.circuitBreaker.permittedNumberOfCallsInHalfOpenState` | Number of calls allowed while the CircuitBreaker is in the half-open state. | `10` |


## Static Threshold
* Consider all remote servers circuits as **closed** on app start.
* Opens and closes circuits based on fixed number of failures or successes.

```json
{
"version": 2,
"remoteDnsServers": [],
"envs": [],
"activeEnv": "",
"webServerPort": 5380,
"dnsServerPort": 53,
"logLevel": "INFO",
"logFile": "console",
"registerContainerNames": false,
"domain": "docker",
"dpsNetwork": false,
"dpsNetworkAutoConnect": false,
"defaultDns": true,
"hostMachineHostname": "host.docker",
"serverProtocol": "UDP_TCP",
"dockerHost": null,
"resolvConfOverrideNameServers": true,
"noRemoteServers": false,
"noEntriesResponseCode": 3,
"dockerSolverHostMachineFallbackActive": true,
"solverRemote": {
"circuitBreaker": {
"strategy": "CANARY_RATE_THRESHOLD",
"failureRateThreshold": 21,
"minimumNumberOfCalls": 50,
"permittedNumberOfCallsInHalfOpenState": 10
}
}
}
```
Activated by `solver.remote.circuitBreaker.type=STATIC_THRESHOLD`

* **failureRateThreshold**: If the failure rate is equal to or greater than this threshold, the CircuitBreaker will
transition to open. rules: values greater than 0 and not greater than 100.
* **minimumNumberOfCalls**: Configures the minimum number of calls which are required (per sliding window period) before
the CircuitBreaker can calculate the error rate.
* **permittedNumberOfCallsInHalfOpenState**: Configures the number of permitted calls when the CircuitBreaker is half
open.
| Name | Description | Default Value |
| ------------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------------------| ------------- |
| `solver.remote.circuitBreaker.failureThreshold` | How many failed attempts are allowed before opening the circuit. | `3` |
| `solver.remote.circuitBreaker.failureThresholdCapacity` | How many failed attempts should be stored in the internal buffer used to evaluate failures. | `10` |
| `solver.remote.circuitBreaker.successThreshold` | How many successful attempts are required to close the circuit after it has been opened. | `5` |
| `solver.remote.circuitBreaker.testDelay` | How long the system should wait before testing the circuit again after it is opened. See Duration format [documentation][1] for details. | `PT20S` |

## Refs

### Refs
* [A more resilient circuit breaker strategy #533][2]

[1]: https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#toString--
Expand Down
Loading