A Service can point at one host, or at an Upstream that spreads traffic over many Targets with weights and health checks.
curl -X POST http://localhost:8001/upstreams --data name=billing-upstream
curl -X POST http://localhost:8001/upstreams/billing-upstream/targets \
--data target=10.0.1.11:8080 --data weight=100
curl -X POST http://localhost:8001/upstreams/billing-upstream/targets \
--data target=10.0.1.12:8080 --data weight=100
# point the service at the upstream by NAME
curl -X PATCH http://localhost:8001/services/billing \
--data host=billing-upstream
# The service's `host` is resolved as an upstream name first, and as DNS
# only if no upstream matches. That is the whole wiring.
#
# weight=0 drains a target without deleting it - the clean way to take a
# node out for a deploy.
curl -s localhost:8001/upstreams/billing-upstream/targets | jq '.data[].target'
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