Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

CDN System Design

Visual Problem Diagram

CDN System Design architecture diagram

Scenario

You open a shop page in Europe, expecting a fast copy from a cache near you and your own cart in the corner. The painful failure is when the page shows another person's cart, because the cache stored a personal response under a shared address and then served that copy to the whole region.

Stuck on where to start? Ask Coach

Clarify this problem here, or open Pathway Coach if you want a prep plan first.

Free Coach trial
How should I start prep?

A viewer asks for an image or a video. The network sends them to a cache near them. If that cache has a fresh copy, it returns it. If not, the cache fetches the file from the origin and keeps a copy. A publisher can remove a cached address. The viewer gets an encrypted connection.

You need to explain how a viewer is sent to a cache near them. You need to explain what is included in the cache address so two people do not share a private page. You need to explain how long a copy lives and how a publisher removes a bad one. You need to explain how the origin stays up when many caches do not have the file. The video player app can stay thin.

Constraints

Functional

The edge stores static files and video. A viewer is sent to a nearby cache. If that cache does not have the file, it fetches the file from the origin. A publisher can wipe a cached address. The edge serves an encrypted connection.

Non-functional

More than 95% of static requests are answered from the cache. Most viewers get an answer from the edge in under 50 milliseconds. A burst of requests that are not cached does not land on the origin together. The service stays up across regions.

Scale

Peak traffic leaving the edge is about 8 terabits a second. Millions of files. Billions of requests a day, which is the heavy read. Thousands of edge sites.

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Not ready to design yet?

Try the free Coach trial — ask how to prep, what to practice first, or how InterviewCrafted works. Sign in when you want to start this problem.

Try Coach free

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.

Want full access now? View Pro pricing