What you will have at the end
Two mechanisms, measured by stopping a backend while requests run. On a two-node Upstream with health checks, the node that died is taken out of rotation and twenty requests during the outage are all answered 200 by the other node; when it comes back, it is probed healthy and takes traffic again. On a Route to that one dead node with api-breaker, three failed attempts open the breaker, and the next requests are answered 503 by the gateway in a few milliseconds instead of waiting seconds for a connection that will not come. Traffic Explorer shows which node answered each request, and the audit log holds both changes.
Prerequisites
- A backend on two nodes. Here the Upstream
orders-hahas the nodesorders-svc:8080andorders-v2:8080, two instances of the orders service that answer/healthwith 200, and the Routeorders-ha-apiserves/ha/orders/*from it. - For the breaker, a Route to a single node:
orders-v2-apiserves/v2/orders/*from the Upstreamorders-v2, the node that the article stops. - Traffic logging turned on under Traffic Explorer › Settings, and a role that may manage Routes and Upstreams. The screenshots below were taken as
nora.becker.
Two different questions
Health checks answer “which nodes of this Upstream may receive a request?” and keep the Upstream answering as long as one node is well. The breaker answers “should this Route ask its backend at all right now?” and spares the client the wait when the whole backend is down. The first is set on the Upstream, the second on the Route, and a production Route usually wants both.
Health checks on the Upstream
Open the Upstream orders-ha, select Edit upstream and scroll to Health checks. Switch Active health check on; the help says what it is: the engine probes every node on its own schedule, and off keeps every node in rotation regardless of its state. The fields that open:
- Path:
/health, the path the probe requests on every node; Typehttp, the default; Timeout 1 second. - Healthy › Interval 2 seconds and Successes 2: an unhealthy node is probed every two seconds and taken back after two successful probes in a row. HTTP statuses stay at
200, 302. - Unhealthy › HTTP failures 2, TCP failures 2 and Timeouts 2: two probes in a row answered with an unhealthy status, refused, or left unanswered take the node out. Interval for unhealthy nodes stays at its default.
Passive health check, the switch under it, marks nodes from real traffic and is allowed only together with the active check; it stays off here, so what follows is the active probe alone.

Select Save upstream. The Upstream page shows the settings and a line that matters for what comes next: node health is available with the Control API or Prometheus, not on this page, so the evidence of a node leaving rotation is in the traffic, below.
The breaker on the Route
Open the Route orders-ha-api, Plugins, Add plugin, api-breaker:
- Break response code: 503. The help says what the client gets while the breaker is open: this code, and the upstream is not asked at all.
- Unhealthy › Failures 3 and HTTP statuses
502. The note under the statuses is the one to read twice: only what the upstream answered counts, a connection it refuses counts as 502, and a status the gateway produced itself never opens the breaker. - Healthy › Successes 3: successes in a row that clear the failure count.
- Longest time the breaker stays open: 30 seconds. The note explains the shape: the breaker first opens for two seconds and doubles that with every further round of failures, up to this value.

Select Add plugin. The same Plugin, with the same values, was put on orders-v2-api, the single-node Route the measurement uses.
Stop a node and watch
One setting first. In a first run, with the Upstream’s Timeouts at the engine defaults, one request that was already on its way to orders-v2 when the container stopped waited 38.97 seconds on its first attempt before the retry answered it; its record’s Timing tab reads Gateway 2 ms, Upstream 38.97 s, 2 attempts. A client of that request saw a 200 after 39 seconds. So the Upstream’s Timeouts are set before the measurement: Connect 2 seconds, Send 2 seconds, Read 3 seconds, the longest a client will wait for a node that does not answer.
Then a request every quarter of a second for a minute; orders-v2 is stopped five seconds in and started again twenty-three seconds later:
### two-node Upstream, 150 requests, orders-v2 stopped at 23:25:41 and started at 23:26:04
codes: 150 × 200
rows over 1 s: 8, each 2.00–2.03 s
Every request was answered. Eight of them, spread over the outage, were handed to the stopped node first, waited the two-second connect timeout and were retried on the other node, which Traffic Explorer marks with +1 in the Upstream node column; the rest went straight to the surviving node. The health check decides which node a request is handed to; the timeouts decide what a request pays when the choice was wrong.

Eight requests to the single-node Route, one per second, against the dead node:
21:12:33 502 3.106935s
21:12:38 502 2.414559s
21:12:41 502 2.995975s
21:12:45 503 0.006054s
21:12:46 503 0.003157s
21:12:47 502 1.017039s
21:12:49 502 2.986668s
21:12:53 502 3.002853s
Three attempts, each a 502 after about three seconds of trying to connect. The third opens the breaker: the next two requests are answered 503 in six and three milliseconds without a connection attempt. Two seconds later the breaker closes to try again, the attempt fails, and the next round opens it for longer, which is the doubling the form described.

Bring the node back
orders-v2 is started again. On the two-node Route the first record naming its address again is half a second after the container started, and from then on the two addresses alternate as before. On the breaker Route the next five requests are 200 in a few milliseconds each: the breaker closed on its next try and three successes cleared the count.
### breaker Route after the node is back
21:13:19 200 0.009562s
21:13:20 200 0.006426s
21:13:21 200 0.004251s
Under Analytics, the breaker Route’s Server errors card lists the 5xx by code and by source. For this window it holds 502 only, five of them, and by source Unreachable, the connections every node refused. Traffic Explorer has six 502 records and two 503s for the same minute: Analytics counts increases and leaves the first sample of a new series out, so the first 502 is missing and the two-sample 503 series is not counted in the card. The records are the complete list; the card is the share.

What the audit log keeps
The health checks are an Upstream update: who, when, and the checks block as the difference, with the probe path, the intervals and the thresholds on the after side. The breaker is a Route update with the api-breaker block. Neither holds a secret.

What to do next
- Put a new version on a share of the traffic first, and let the breaker guard the rest: Canary releases with traffic-split.
- Keep the 502 and 503 lines in your own store: Access logs to Elasticsearch, syslog and HTTP; watch the 5xx share and get an email when it rises: the solution page API observability.
- The traffic Plugins and the Upstream settings side by side are in the capabilities reference and on API Gateway.