Skip to content

Add readiness pre-drain before graceful shutdown #210

Description

@dkijania

The production-readiness PR set still leaves rolling deploys with an ownership gap across readiness and shutdown behavior.\n\nCurrent split:\n- #187 adds /readiness, but does not flip readiness false during shutdown.\n- #188 closes the HTTP listener on SIGTERM and drains in-flight work, but traffic can still be routed until endpoints are removed.\n- #196 adds a Kubernetes preStop sleep in the reference manifest, but the app itself has no pre-drain readiness state and non-Kubernetes deployments have no equivalent default.\n\nDesired behavior:\n- On shutdown intent, mark readiness false before closing the listener.\n- Keep accepting/draining already-routed in-flight requests during a short pre-drain window.\n- Document the required preStop / terminationGracePeriodSeconds relationship for Kubernetes and the equivalent behavior for other supervisors.\n- Add regression coverage for readiness returning 503 after shutdown starts while liveness remains process-only.\n\nThis should prevent ordinary rolling deploys from resetting in-flight requests and make the behavior owned by the app, not only by the reference manifests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions