Design Per-Project API Quota Enforcement for Google Cloud APIs

Last updated: November 29, 2026

Quick Overview

Design the service that enforces per-project quotas (requests per minute and requests per day) for Google Cloud APIs such as Vision or BigQuery, across many regions, with quota overrides set by customers and admins.

Google
System Design
Software Engineer
Google
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the service that enforces per-project quotas (requests per minute and requests per day) for Google Cloud APIs such as Vision or BigQuery, across many regions, with quota overrides set by customers and admins.

Cloud API teams at Google rely on a shared quota system, so this question appears in system design rounds for Cloud infrastructure roles. The interviewer is checking whether you can keep the hot path fast while counters live far away, and whether you reason about how much over-admission is acceptable.

What the Interviewer Expects
  • Separate quota configuration (limits, overrides) from quota consumption (counters)
  • Keep the API request path at low single-digit millisecond overhead using local token leases
  • Explain how per-minute and per-day windows are computed and reset
  • Quantify acceptable over-admission when regions are partitioned
  • Describe how customers see usage and receive 429 RESOURCE_EXHAUSTED errors with retry hints
Key Topics to Cover
quota leases
token bucket
global vs regional counters
fail-open policy
configuration propagation
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you handle a project whose traffic is spread evenly across 30 regions with a tiny limit?
  • How would you support quotas measured in units other than requests, such as bytes or compute seconds?
  • What happens if the quota service is completely down?
  • How do you roll out a quota decrease without breaking a customer mid-batch?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: limits per (project, API, metric, window), for example 600 requests/minute and 50,000/day. Customers can request lower caps, admins can grant increases. Return 429 with a retry-after w...

High-Level Design
  • Quota config store: a globally replicated database (Spanner) holding limits and overrides, pushed to every frontend as a versioned snapshot.
  • API frontend (ESF-like proxy): before forwardin...

Submit Your Answer
Markdown supported