mirror of https://github.com/hashicorp/consul
Backport of docs: remove unsupported critical flag from DNS weights into release/1.15.x (#20097)
backport of commit e6b60f5f5e
Co-authored-by: DanStough <dan.stough@hashicorp.com>
pull/20102/head
parent
aeb39b8804
commit
182ed3afeb
|
@ -343,22 +343,21 @@ The following table describes the parameters that you can place in the `connect`
|
|||
| `sidecar_service` | Object that defines a sidecar proxy for the service. Do not configure if `native` is set to `true`. Refer to [Register a Service Mesh Proxy in a Service Registration](/consul/docs/connect/registration/sidecar-service) for usage and configuration details. | Refer to [Register a Service Mesh Proxy in a Service Registration](/consul/docs/connect/registration/sidecar-service) for default configurations. |
|
||||
|
||||
### weights
|
||||
Object that configures how the service responds to DNS SRV requests based on the service's health status. Configuring allows service instances with more capacity to respond to DNS SRV requests. It also reduces the load on services with checks in `warning` status by giving passing instances a higher weight.
|
||||
Object that configures how a service instance is weighted in a DNS SRV request based on the service's health status. Configuring tells DNS clients to direct more traffic to instances with a higher weight. A use case would be adjusting the weight higher for an instance with large capacity. It could also be used to reduce the load on services with checks in `warning` status by favoring passing instances with a higher weight.
|
||||
|
||||
You can specify one or more of the following states and configure an integer value indicating its weight:
|
||||
|
||||
- `passing`
|
||||
- `warning`
|
||||
- `critical`
|
||||
|
||||
Larger integer values increase the weight state. Services have the following default weights:
|
||||
|
||||
- `"passing" : 1`
|
||||
- `"warning" : 1`
|
||||
|
||||
Services in a `critical` state are excluded from DNS responses by default. Services with `warning` checks are included in responses by default. Refer to [Perform Static DNS Queries](/consul/docs/services/discovery/dns-static-lookups) for additional information.
|
||||
Services in a `critical` state are excluded from DNS responses. Services with `warning` checks are included in responses by default. Refer to [Perform Static DNS Queries](/consul/docs/services/discovery/dns-static-lookups) for additional information.
|
||||
|
||||
In the following example, service instances in a `passing` state respond to DNS SRV requests, while instances in a `critical` instance can still respond at a lower frequency:
|
||||
In the following example, DNS SRV queries direct more traffic to service instances in a `passing` state, while instances in a `warning` instance are less favored:
|
||||
|
||||
<CodeTabs tabs={[ "HCL", "JSON" ]}>
|
||||
|
||||
|
@ -369,8 +368,7 @@ service {
|
|||
port = 6379
|
||||
weights = {
|
||||
passing = 3
|
||||
warning = 2
|
||||
critical = 1
|
||||
warning = 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -383,8 +381,7 @@ service {
|
|||
"port": 6379,
|
||||
"weights": {
|
||||
"passing": 3,
|
||||
"warning": 2,
|
||||
"critical": 1
|
||||
"warning": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue