Skip to content

Add /status/ready endpoint for service health.#19148

Merged
gianm merged 1 commit into
apache:masterfrom
gianm:ready-api
Mar 13, 2026
Merged

Add /status/ready endpoint for service health.#19148
gianm merged 1 commit into
apache:masterfrom
gianm:ready-api

Conversation

@gianm

@gianm gianm commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Currently the most natural endpoint to use for service health (e.g. if adding Druid services to a load balancer) is /status/health. However, this does not play nicely with graceful shutdown mechanisms.

When druid.server.http.unannouncePropagationDelay is used, there is a delay between unannounce and server shutdown, which allows Druid's internal service discovery to stop sending traffic to a service before it shuts down its server. However, /status/health continues to return OK until the server is shut down, so external load balancers cannot take advantage of this.

This patch adds /status/ready, an endpoint that is tied to announcement. It allows external load balancers to take advantage of this graceful shutdown mechanism.

Currently the most natural endpoint to use for service health (e.g. if
adding Druid services to a load balancer) is /status/health. However,
this does not play nicely with graceful shutdown mechanisms.

When druid.server.http.unannouncePropagationDelay is used, there is a
delay between unannounce and server shutdown, which allows Druid's
internal service discovery to stop sending traffic to a service before
it shuts down its server. However, /status/health continues to return OK
until the server is shut down, so external load balancers cannot take
advantage of this.

This patch adds /status/ready, an endpoint that is tied to announcement.
It allows external load balancers to take advantage of this graceful
shutdown mechanism.
@gianm
gianm merged commit ee614dc into apache:master Mar 13, 2026
37 checks passed
@gianm
gianm deleted the ready-api branch March 13, 2026 08:05
@github-actions github-actions Bot added this to the 37.0.0 milestone Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants