Autoscaling Controller · View 08 of 37 · 2 · Structure
Decisions
- Leader per shard, not leader per region: losing one replica affects its shard and nothing else.
- A desired-state write without a valid lease is rejected by the store, so split brain is prevented at the write rather than detected afterwards.
- The constraint stage runs after every policy has spoken, in a component no policy can reach.
Where the decision runs
- Central regional controller, not a per-cluster agent or a sidecar.
- Chosen because the constraint set is substantially global: fleet capacity ceilings, per-region spend ceilings and shared warm pools cannot be enforced from inside one target.
- The cost is a shared blast radius, which is why the plane separation and fail-static behaviour matter more here than they would for a distributed design.
Assumptions
- Lease term 10 s against a 15 s interval, so a lost leader costs at most one interval of decisions for its shard.
- Shard assignment is by consistent hash of target id; rebalancing is rare and does not need to be fast.