Skip to content

Drain API requests and run Node directly before the runtime rollout - #2

Merged
ty-everett merged 2 commits into
mainfrom
codex/nodejs-shutdown-20261022
Oct 23, 2026
Merged

ty-everett merged 2 commits into
mainfrom
codex/nodejs-shutdown-20261022

Conversation

@ty-everett

Copy link
Copy Markdown
Contributor

Run the API directly under Node as PID 1 and handle SIGTERM/SIGINT by closing the listener, draining accepted requests for up to 100 seconds, and bounding stalled connections. The Linux image build runs two real HTTP lifecycle tests. No dependency or payment behavior changes.

Validation: TypeScript build and both lifecycle tests pass on Node 22.23.4. Deployment requires endpoint withdrawal plus at least 120 seconds of Kubernetes termination grace. The existing image has no shutdown handler, so the first live migration still requires a qualified separate serving pool and an external withdrawal/drain interval. No deployment or payment transaction is included in this PR.

@ty-everett
ty-everett merged commit 2d19a4b into main Oct 23, 2026
2 checks passed
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.

1 participant