Design Storage Quotas for WhatsApp Chat Backups

Last updated: November 29, 2026

Quick Overview

Design the system that tracks and enforces how much cloud storage each WhatsApp user's encrypted chat backups use, warning users as they approach their limit and handling backups that would exceed it.

Meta
System Design
Software Engineer
Meta
November 29, 2026
Software Engineer
Phone Screen
System Design
Easy

0

0

0 solved


Design the system that tracks and enforces how much cloud storage each WhatsApp user's encrypted chat backups use, warning users as they approach their limit and handling backups that would exceed it.

A compact design question suitable for a Meta phone screen: it tests accounting correctness and user experience rather than massive fan-out. The interviewer checks that you track usage atomically on upload and delete, handle partial uploads, and keep content encrypted while still metering bytes.

What the Interviewer Expects
  • Track usage per user accurately across uploads and deletes
  • Reserve quota before upload to avoid exceeding it
  • Clean up orphaned partial uploads
  • Warn at thresholds and define over-quota behavior
  • Note that server sees only encrypted blobs and sizes
Key Topics to Cover
quota accounting
reservations
garbage collection
reconciliation
encrypted backups
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
  • What if a user restores on a new phone and uploads a full backup while the old one exists?
  • How would you reconcile usage if the counter drifts from actual storage?
  • How would you support media-excluded backups to save space?
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
  • A user's backup consists of a chat database blob plus media blobs, all encrypted on the device.
  • Each user has a storage quota (for example a few GB, with possible upgrades).
  • Uploads must not pus...
High-Level Design

The client asks the backup service for an upload session, stating the blob sizes. The service checks the quota store (a row per user: limit, used, reserved). If `used + reserved + size <...


Submit Your Answer
Markdown supported