The defaults are 5 retries against 60-second timeouts, so a single client request can occupy a connection for five minutes before it fails.
curl -X PATCH http://localhost:8001/services/billing \
--data connect_timeout=2000 \
--data write_timeout=5000 \
--data read_timeout=5000 \
--data retries=2
Defaults (5 x 60s): worst case 300 s per request
Above (2 x 5s): worst case 15 s per request
# Retrying a SLOW upstream adds load to the thing already struggling. Retries
# are for connection failures; a low value plus health checks is usually
# better than a high one.
#
# Kong retries are not idempotency-aware: a POST that timed out after the
# upstream processed it will be sent again.
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-25