ScaleCrafts

Design a content delivery network

HardEdge cachingDNSNetworking

Serve websites, images and video from servers close to users all over the world, like Cloudflare or Akamai.

Functional requirements

  • Customers point their domain at the CDN
  • Cache and serve content from the nearest edge
  • Purge content on demand

Non-functional requirements

  • Under 50 ms to first byte for cached content
  • Survives whole data center failures
  • Protects origins from traffic spikes

Scale

  • 300 edge locations
  • 100 Tbps peak traffic
  • Millions of customer domains

How you’ll be scored

10 checks covering your diagram and your notes, and any valid approach counts. Hints appear for anything you miss. Common mistakes, such as single points of failure or components you never explain, cost points. How grading works

What interviewers look for

  • Clarify before you draw. State what is in and out of scope. For “Design a content delivery network”, that starts with: Customers point their domain at the CDN; Cache and serve content from the nearest edge; Purge content on demand. Interviewers notice candidates who pin the requirements down first.
  • Turn the scale into numbers. The scale (300 edge locations; 100 Tbps peak traffic; Millions of customer domains) should become requests per second, storage and bandwidth, and those figures should drive your choices. Estimates with units carry more weight than adjectives.
  • Show how each quality is met. Your design should visibly deliver: Under 50 ms to first byte for cached content; Survives whole data center failures; Protects origins from traffic spikes. Saying that it does isn’t enough; point to the part of the design that makes it true.
  • Expect follow-ups on the hard parts. Interviewers usually probe edge caching, dns and networking here. This is a hard problem, so interviewers expect depth: what breaks first at this scale, how each failure is contained, and which trade-offs you accepted on purpose.
  • Explain failure and trade-offs. Say what happens when a component fails, where a single point of failure would hurt, and what you chose not to build. Naming a trade-off is a stronger answer than claiming there isn’t one.

Loading your workspace…