mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
website: document http check timeout configuration
This commit is contained in:
parent
84f8c70a79
commit
6cc9478c38
@ -26,7 +26,10 @@ There are three different kinds of checks:
|
|||||||
every 30 seconds) to the specified URL. The status of the service depends on the HTTP response code:
|
every 30 seconds) to the specified URL. The status of the service depends on the HTTP response code:
|
||||||
any `2xx` code is considered passing, a `429 Too Many Requests` is a warning, and anything else is a failure.
|
any `2xx` code is considered passing, a `429 Too Many Requests` is a warning, and anything else is a failure.
|
||||||
This type of check should be preferred over a script that uses `curl` or another external process
|
This type of check should be preferred over a script that uses `curl` or another external process
|
||||||
to check a simple HTTP operation.
|
to check a simple HTTP operation. By default, HTTP checks will be configured
|
||||||
|
with a request timeout equal to the check interval, with a max of 10 seconds.
|
||||||
|
It is possible to configure a custom HTTP check timeout value by specifying
|
||||||
|
the `timeout` field in the check definition.
|
||||||
|
|
||||||
* Time to Live (TTL) - These checks retain their last known state for a given TTL.
|
* Time to Live (TTL) - These checks retain their last known state for a given TTL.
|
||||||
The state of the check must be updated periodically over the HTTP interface. If an
|
The state of the check must be updated periodically over the HTTP interface. If an
|
||||||
@ -59,7 +62,8 @@ A HTTP check:
|
|||||||
"id": "api",
|
"id": "api",
|
||||||
"name": "HTTP API on port 5000",
|
"name": "HTTP API on port 5000",
|
||||||
"http": "http://localhost:5000/health",
|
"http": "http://localhost:5000/health",
|
||||||
"interval": "10s"
|
"interval": "10s",
|
||||||
|
"timeout": "1s"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user