# Design a cloud resource quota service: system design interview question

> Tenant quota enforcement: atomic resource checks, reservation expiry, and safe quota release after resource deletion.

Source: https://sysround.com/questions/design-cloud-resource-quota-service
Updated: 2026-11-05


Difficulty: hard. Levels: Senior, Staff+.

## How the interviewer opens it

"Design a service that enforces tenant quotas for virtual machines, CPUs, and storage. It must support concurrent resource requests, reservations, and quota reclamation."

## What to clarify first

- Quota scope and units
- Scale
- Traffic and read:write ratio
- Latency
- Consistency and availability
- Reservation lifetime
- Resource providers
- Limit changes
- Durability and retries
- Excluded requirements

## Scope of a strong answer

Core requirements:

- Reserve several resource types without exceeding any quota
- Convert reservations into resource allocations
- Reclaim quota after reservation cancellation or resource deletion
- Read quota usage and change quota limits

Usually out of scope:

- Global quotas across regions
- Parent quotas across tenant groups
- Resource placement and physical capacity
- Billing and the implementation of resource providers

## What interviewers probe

### Concurrent resource requests

One request consumes several resource types. Concurrent requests must share one consistent view without creating partial reservations.

### Reservation expiry

A reservation can expire while a provider still creates resources. A clock cannot prove that the provider stopped.

### Resource reclamation

Deletion, callbacks, and retries cross service boundaries. Premature release can approve replacements while old resources still exist.

## Common mistakes

- Checks quota and updates usage in separate steps without an atomic guard.
- Treats reservation expiry as proof that resource creation stopped.
- Returns quota before resource deletion completes.
- Handles duplicate requests but ignores duplicate or late provider callbacks.
- Uses stale display values to approve resource requests.
- Adds global coordination before defining the quota scope and regional authority.

## The bar by level

- **Senior:** Defines the full reservation lifecycle. Resolves expiry races, uncertain provider results, duplicate callbacks, and crash recovery. Separates stale display reads from authoritative approvals.
- **Staff+:** States the end-to-end safety assumptions for providers and database failover. Explains why uncertain work can retain quota indefinitely. Addresses hot scopes without weakening correctness. Adapts the design to global limits and defines the availability trade-off.

Practice this question with an AI interviewer: https://sysround.com/practice/new?problem=cloud-resource-quotas


---
SysRound (https://sysround.com) is an AI practice tool for system design interviews. It has a voice or typed AI interviewer and a shared whiteboard. At the end, you get feedback on each skill and a model answer. The AI feedback can be wrong.
