Skip to content

Kong: "failure to get a peer from the ring-balancer" – no healthy target

Networkingtested on Kong OSS 3.9.4 (Docker, DB-less), decK v1.69.0

If only one instance in the upstream fails, the client notices nothing. If all fail, the ring balancer has nobody left – and Kong answers with 503 itself.

Symptom

{
  "message":"failure to get a peer from the ring-balancer",
  "request_id":"…"
} 503

Both instances of notes-api are stopped.

Diagnosis

Query the health status of each target.

curl -s $ADMIN/upstreams/notes-up/health | jq -r '.data[] | [.target, .health] | @tsv'
notes-api-2:8080	UNHEALTHY
notes-api:8080	HEALTHY

Causes

all UNHEALTHYNo healthy target left

The active health checks removed each target after two failures. If none is left, there is no peer.

/healthzShared dependency

/healthz of notes-api also checks the database. If Postgres fails, all instances report unhealthy – even though the processes run.

Fix

Start at least one backend again. After one successful check (successes: 1, every 2 s) plus startup time, Kong serves again.
docker compose start notes-api
 Container backend-notes-api-1 Started
... wieder da

Don't: Disabling health checks so the 503 disappears – then Kong sends requests to dead backends.

▶
Break it yourself and find it – free
Kong hands-on, Day 9: upstreams, targets, health checks, canary with weights and balancing algorithms.
Go to day 9 →

FAQ

Does every Kong node check on its own?

Yes, active health checks run per node. Ten nodes with a 2 s interval create five check requests per second per backend.

Is it possible without extra check requests?

Passive health checks evaluate real responses. Combined with active checks they detect failures faster.

Related error patterns

More