Design Daily Quota Units for the YouTube Data API

Last updated: November 29, 2026

Quick Overview

Design a quota system for the YouTube Data API where each developer project gets a daily budget of quota units and each method costs a different number of units (a list call costs 1, a video upload costs much more).

Google
System Design
Software Engineer
Google
November 29, 2026
Software Engineer
Technical Screen
System Design
Easy

0

0

0 solved


Design a quota system for the YouTube Data API where each developer project gets a daily budget of quota units and each method costs a different number of units (a list call costs 1, a video upload costs much more).

This is a scoped-down quota question used in screens for YouTube developer platform teams. The interviewer is checking that you model weighted costs, daily resets, and developer-facing visibility without overengineering.

What the Interviewer Expects
  • Model a cost table per API method
  • Use a per-project daily counter that resets at a fixed timezone boundary
  • Check and decrement atomically before executing the call
  • Expose remaining quota and clear errors to developers
  • Discuss handling of failed or invalid requests
Key Topics to Cover
weighted rate limiting
daily counters
atomic decrement
developer experience
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
  • Should a request that fails validation still consume quota?
  • How would you let developers request a quota increase?
  • How would you prevent one project from creating many projects to evade limits?
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
  • Each project has a daily allowance, for example 10,000 units.
  • Method costs come from a table: videos.list = 1, search.list = 100, videos.insert = 1600.
  • Reset at midnight Pacific time for e...
High-Level Design

API gateway receives the request, authenticates the API key or OAuth client, resolves the project, looks up the cost, and calls a quota counter service that does try_consume(project, day, cost)....


Submit Your Answer
Markdown supported