1.Hard quotas vs burst limits
A hard quota caps total usage over a fixed period — for example, 10,000 API calls per day, or 1,000 VM-hours per month. A burst limit caps the instantaneous rate of usage — for example, no more than 50 requests per second, even if the daily quota has plenty of room left. These are two different questions ("how much in total" vs "how fast right now") and a real system typically enforces both on the same resource at once: you can be well under your monthly quota and still get throttled because you tried to do too much in one second.
Key features
- A quota bounds total consumption over a period (requests/day, VM-hours/month); a burst limit bounds instantaneous rate (requests/second) — different units, different failure modes
- The two are typically enforced together on the same resource: AWS EC2 API throttling defines a token-bucket "bucket maximum capacity" (burst) and a "bucket refill rate" (sustained rate) for every API action, on top of separate account-level service quotas
- Google Cloud names this split explicitly: "allocation quotas" restrict total resource held (e.g. VM count), "rate quotas" restrict consumption speed over a window (e.g. per minute)
- Exhausting a burst limit is usually transient (wait a second, retry); exhausting a hard quota usually requires a period reset or an explicit quota increase request
- Conflating the two in a design leads to picking the wrong lever: raising a rate limit does not help a caller that is failing because a monthly quota is exhausted, and vice versa
Hard quota vs burst limit on the same resource
- Hard quota
- "How much total, over this period?"
- Calls/day, VM-hours/month, storage GB
- Hitting it means: wait for reset or request an increase
- Burst limit
- "How fast, right now?"
- Requests/second, tokens/second
- Hitting it means: slow down, capacity returns in seconds
Command
Two independent checks, both guarding the same resource:
quota_used_this_month < quota_limit (hard quota)
tokens_in_bucket > 0 (burst limit,
refills over time)
A request can fail either check independently of the other.Quota = total allowed over a period (resets on a schedule); burst limit = allowed rate right now (recovers continuously). Both commonly apply to the same resource at once — check both before deciding which one to raise.