posthog
posthog copied to clipboard
feat(capture): variable graceful shutdown window for capture deployments
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
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