1
0
Fork 0

Support all 2xx HTTP status code for health check.

This commit is contained in:
Ludovic Fernandez 2018-05-22 09:22:03 +02:00 committed by Traefiker Bot
parent 5c4692a0df
commit e2bac47a0a
3 changed files with 36 additions and 32 deletions

View file

@ -454,13 +454,12 @@ The deprecated way:
#### Health Check
A health check can be configured in order to remove a backend from LB rotation as long as it keeps returning HTTP status codes other than `200 OK` to HTTP GET requests periodically carried out by Traefik.
A health check can be configured in order to remove a backend from LB rotation as long as it keeps returning HTTP status codes other than `2xx` to HTTP GET requests periodically carried out by Traefik.
The check is defined by a path appended to the backend URL and an interval (given in a format understood by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration)) specifying how often the health check should be executed (the default being 30 seconds).
Each backend must respond to the health check within 5 seconds.
By default, the port of the backend server is used, however, this may be overridden.
A recovering backend returning 200 OK responses again is being returned to the
LB rotation pool.
A recovering backend returning `2xx` responses again is being returned to the LB rotation pool.
For example:
```toml