feat(deploy): event-driven pre-warm to cut free-tier cold-start#251
Merged
Conversation
…old-start Wake the free-tier service on genuine CI events instead of a fixed-interval cron (which reads as an anti-hibernation keep-alive and risks throttling/bans): - scripts/render/prewarm-service.sh: best-effort health ping, never fails its job (a sleeping service is exactly what we are waking). - Runs at the start of Promote to Production and both rollback workflows, so the instance is warm just before the deploy container provisions. - New Warm Production On Merge workflow pings on every push to main, since a merge is a leading indicator that a promotion is coming. Target is overridable via the PRODUCTION_HEALTH_URL variable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Event-driven pre-warming of the free-tier production service to cut cold-start latency when a deploy provisions — no fixed-interval cron.
scripts/render/prewarm-service.sh— best-effortGET /api/health(retries to wake a sleeping instance), never fails its job (a hibernating service is exactly what we're waking).mainvia a new Warm Production On Merge workflow (a merge is a leading indicator a promotion is coming).PRODUCTION_HEALTH_URLvariable (defaults to the Render service URL).Why this shape
A fixed
*/Ncron pinging health is the classic anti-hibernation keep-alive pattern that free hosts detect and can throttle or ban — and on a private repo it also burns Actions minutes fast (per-minute billing rounding makes a <15-min cadence cost ~3000+ min/month). Firing on real CI activity instead is organic, effectively free, and warms the instance precisely when a deploy is imminent. It complements #248 (longer rollout stabilization) rather than replacing it.