Repository navigation
DRU-1094 -- One cloud's burst cannot take every sandbox host on a cell - #93
Merged
czpython merged 1 commit intoNov 6, 2026
Merged
Conversation
czpython
force-pushed
the
paulo/dru-1094-one-clouds-burst-cannot-take-every-sandbox
branch
from
November 6, 2026 20:42
219c329 to
b2fda07
Compare
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.
HOST_LIMIT_PER_SERVICE_ACCOUNTsets the most live hosts per service account, besideHOST_LIMITSper provider. A caller that creates hosts with its own service account now waits on its own limit, so one caller's burst cannot take every host the provider allows.HostService.get_or_create_hostchecks it before it claims a warm host or creates one, so a claim counts like a create. The check takes an advisory lock keyed by the service account, and the claim or the insert commits the transaction that holds it, so two creates of one account cannot both pass the count.errorand has not expired, the count the provider limit uses. Both limits now count through_count_live_hosts, which takes the lock first. The provider's lock key is nowprovider:<name>, apart fromservice_account:<name>.POST /hostsanswers503withCAPACITYandRetry-After, as at the provider limit. The admin key has no service account limit. Unset means no limit.docs/api.mdand the settings table indocs/deploy.mdname the setting.hosts/service.pyimportshosts.exceptionsandproviders.exceptionsas modules, as the house rules ask of a touched file.