Skip to content

Commit

Permalink
Fix verb
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Nov 19, 2023
1 parent 03056c9 commit f5fb25c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .vale/Vocab/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ receiveDeadline
receiveTimeout
sendDeadline
dialTimeout
backoff
backoffMultiplier
disableBackoffCaps
API
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The dial timeout is the amount of time the client should wait before giving up o
## Retries and backoff
The first attempt to connect to the database server is made when the client is created, which happens instantly when GatewayD starts. However, if the first attempt fails, the client will retry the connection. The default number of retries is `3`, which means that the client will retry the connection three times before giving up. Setting it to `0` disables the retry mechanism. The client can also backoff before retrying the connection. The backoff duration is set to `1s` by default and `0s` disables the backoff mechanism. The backoff multiplier is set to `2` by default and `0` disables the backoff. The backoff multiplier is applied to the backoff duration. The backoff duration is capped at `60s` by default and the max retry is capped at `10` by default. Setting `disableBackoffCaps` to `true` disables the backoff and retry caps.
The first attempt to connect to the database server is made when the client is created, which happens instantly when GatewayD starts. However, if the first attempt fails, the client will retry the connection. The default number of retries is `3`, which means that the client will retry the connection three times before giving up. Setting it to `0` disables the retry mechanism. The client can also back off before retrying the connection. The backoff duration is set to `1s` by default and `0s` disables the backoff mechanism. The backoff multiplier is set to `2` by default and `0` disables the backoff. The backoff multiplier is applied to the backoff duration. The backoff duration is capped at `60s` by default and the max retry is capped at `10` by default. Setting `disableBackoffCaps` to `true` disables the backoff and retry caps.
{: .note }
> The first attempt to connect to the database server is counted as a retry, hence the three retries are actually four attempts (one instant attempt and three retry attempts), and the backoff duration is applied to the second attempt and so on.
Expand Down
2 changes: 1 addition & 1 deletion using-gatewayd/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ clients:
# Retry configuration
retries: 3 # 0 means no retry
backoff: 1s # duration
backoffMultiplier: 2 # 0 means no backoff
backoffMultiplier: 2.0 # 0 means no backoff
disableBackoffCaps: false

pools:
Expand Down
4 changes: 2 additions & 2 deletions using-gatewayd/global-configuration/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ GatewayD supports multiple client configurations. Each client in each configurat
| dialTimeout | duration (string) | 60s | Valid duration strings | The amount of time the client should wait before giving up on dialing the database. `0s` disables dial timeout. |
| retries | number | 3 | Positive integers | The amount of times to retry a failed connection. `0` means no retry. |
| backoff | duration (string) | 1s | Valid duration strings | The amount of time to wait before retrying a failed connection. `0s` means no backoff. |
| backoffMultiplier | number | 2 | Positive integers | The multiplier to apply to the backoff duration. `0` means no backoff. |
| backoffMultiplier | number | 2.0 | Positive integers | The multiplier to apply to the backoff duration. `0` means no backoff. |
| disableBackoffCaps | boolean | False | True, False | Whether to disable the backoff caps for backoff multiplier and backoff duration. |

```yaml
Expand All @@ -45,6 +45,6 @@ clients:
# Retry configuration
retries: 3 # 0 means no retry
backoff: 1s # duration
backoffMultiplier: 2 # 0 means no backoff
backoffMultiplier: 2.0 # 0 means no backoff
disableBackoffCaps: false
```

0 comments on commit f5fb25c

Please sign in to comment.