posthog icon indicating copy to clipboard operation
posthog copied to clipboard

feat(capture): variable graceful shutdown window for capture deployments

Open eli-r-ph opened this issue 1 month ago • 1 comments

Problem

We want to ensure we await in-flight requests when a production pod is signaled for shutdown. We can use a combo of a static time limit based on resp time tail and our existing active connections counter to sleep prior to shutdown completion in capture deployments.

We can test this in capture-mirrored deploy prior to rollout.

Changes

  • Add variable graceful shutdown window to ensure in-flight requests complete

How did you test this code?

Locally and in CI

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Changelog: (features only) Is this feature complete?

N/A

eli-r-ph avatar Dec 09 '25 01:12 eli-r-ph

Test deployed this in mirror; didn't have the effect I was looking for; I iterated on the hypothesis here and have 2 other PRs to test that should shed more light on the situation. Putting this back into draft for now so we don't merge by accident

eli-r-ph avatar Dec 10 '25 01:12 eli-r-ph