Design Per-Team Quotas for a Paid Third-Party Maps API
Last updated: November 29, 2026
Quick Overview
Many internal Uber services call an external maps provider that bills per request. Design a quota service that gives each team a monthly budget and per-second limits, protects critical callers like dispatch, and keeps total spend under contract.
Uber
November 29, 20260
0
0 solved
Many internal Uber services call an external maps provider that bills per request. Design a quota service that gives each team a monthly budget and per-second limits, protects critical callers like dispatch, and keeps total spend under contract.
Uber runs thousands of microservices, and shared external dependencies need cost and capacity governance, not just abuse protection. This question checks distributed rate limiting with priorities and budgets, and whether you keep the limiter off the critical path's failure surface.
What the Interviewer Expects
- Distinguish short-window rate limits from long-window budgets
- Implement token buckets with local caching and periodic sync
- Prioritize critical traffic when the global limit is hit
- Decide fail-open versus fail-closed per caller
- Expose usage dashboards and alerts to teams
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- The provider's hard limit is 5,000 QPS. How do you split it across 40 teams fairly?
- What happens if the quota service itself goes down?
- How would you add caching so repeated geocodes do not cost money?
- How do you handle a team that needs a temporary burst for a backfill?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Limits: provider hard cap (QPS) and a monthly spend cap. Each team has an allocation (QPS share plus monthly request budget). Dispatch and ETA traffic must never be starved by batch jobs. Added latenc...
High-Level Design
- Maps proxy (sidecar or shared gateway) through which every call to the provider flows. This gives one choke point for auth, caching, and metering.
- Quota service holds allocations and aggre...