api-breaker
note
Whenever the Upstream service responds with a status code from the configured unhealthy.http_statuses
list for the configured unhealthy.failures
number of times, the Upstream service will be considered unhealthy.
The request is then retried in 2, 4, 8, 16 … seconds until the max_breaker_sec
.
The example below shows how you can configure the Plugin on a specific Route:
In this configuration, a response code of or 503
three times within a certain period of time triggers the unhealthy status of the Upstream service. A response code of 200
restores its healthy status.
If the Upstream service responds with an unhealthy response code, you will receive the configured response code (break_response_code
).
To disable the Plugin, you can delete the corresponding JSON configuration from the Plugin configuration. APISIX will automatically reload and you do not have to restart for this to take effect.