Repository navigation
fix(deploy): size the edge controller Container at standard-2 - #20
Merged
Merged
Conversation
The controller never sleeps, so Cloudflare bills its memory and disk all month. standard-4 (12 GiB) cost about twice standard-2 (6 GiB) for a second concurrent Agent. The host capacity check already derives the Agent count from memory, so one Agent runs at a time.
|
Architecture Data flow No data-flow sequence changed in this PR. Review ✨ Nothing flagged · reviewed Tip Open a diagram on the canvas, then press W or click play to walk through the change one step at a time 🪧 More tips
Thanks for using PR Lens! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out on X, Bluesky, Mastodon, Reddit or LinkedIn |
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.
🔗 Linked issue
Related to the Cloudflare budget alert on the Containers spend. This repository has issues disabled.
❓ Type of change
📚 Description
The edge controller Container never sleeps:
onActivityExpiredrenews its timeout and the cron restarts it. Cloudflare bills Container memory and disk for every hour it runs, so the instance size sets the monthly cost. Atstandard-4(12 GiB) the memory alone is roughly $77 a month on the published rates.This sets
instance_typetostandard-2(1 vCPU, 6 GiB, 12 GB disk), which roughly halves that. The host capacity check already derives the Agent count from memory (4 GiB per Agent, 2 GiB reserved), so one Agent runs at a time instead of two.max_instancesstays at 1, now with a comment that raising it multiplies the always-on cost. The README table and a comment incloudflare-runtime.tsfollow the new size.Operator note: the 12 GB disk holds every repository the App clones at start. If it fills, move to
standard-3(2 vCPU, 8 GiB, 16 GB).