Design Signed Expiring URLs for Private Media on Meta's CDN

Last updated: November 29, 2026

Quick Overview

Design how Meta's CDN serves private media (photos in a private Instagram account, Messenger attachments) only to authorized viewers, using signed URLs that expire, without making the edge call back to the permission system on every request.

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

0

0

0 solved


Design how Meta's CDN serves private media (photos in a private Instagram account, Messenger attachments) only to authorized viewers, using signed URLs that expire, without making the edge call back to the permission system on every request.

This tests a focused security and caching trade-off common in Meta screens: privacy checks are expensive and live in the app tier, but the CDN must still not leak private content. The interviewer checks URL signing, expiry choice, cache key design, and what happens when access is revoked.

What the Interviewer Expects
  • Explain why the edge cannot run the full privacy check
  • Design a signed URL with expiry and an HMAC
  • Keep the signature out of the cache key so caching still works
  • Handle key rotation and revoked access
  • Pick expiry lengths and justify them
Key Topics to Cover
signed URLs
HMAC
expiry
cache keys
key rotation
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 copies the URL and shares it publicly?
  • How do you handle access revocation before expiry?
  • How would you rotate signing keys without breaking links?
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
  • Only users allowed by the app's privacy rules should load a private photo.
  • Edge servers must verify cheaply on every request, at high QPS.
  • Cached copies at the edge should be reusable across aut...
High-Level Design

When the app server builds a response (feed, chat), it runs the privacy check and, for each media item, generates a URL: https://cdn/.../photo_id.jpg?exp=1732800000&kid=7&sig=..., where `sig = HMAC(...


Submit Your Answer
Markdown supported