Design an image hosting service (like Imgur)
medium 50 minUpload a picture, get a link at once, and let the whole world look at it.
What each level should show
The same question is judged differently for mid, senior and staff.
Mid
Must show
- Files in object storage, records in a database
- Queue and workers
- CDN with a hit rate
- Short unique IDs
Will be probed on
- Why not resize in the request
- What a retry does
- Cache headers
Stands out
Strips location data without being asked.
Senior
Must show
- Private original, public copies
- Shield and merged misses
- Duplicates with safe deletion
- Counts off the path
Will be probed on
- Takedown through all layers
- Queue backlog
- Shard key and galleries
Stands out
Notices that the store cannot know which picture is cold.
Staff
Must show
- Leads with bytes and cost
- Order of gate, publish and cache
- Law and people as part of the system
- What fails closed
Will be probed on
- CDN exit plan
- Storage classes that cost more
- Error rates of checks
Stands out
States residual risk, such as browser copies, and who accepts it.
Same question, three answers
"How do you serve a famous picture?"
| Level | A good answer sounds like |
|---|---|
| Mid | "From the CDN. It never changes, so it stays cached, and the store sees little." |
| Senior | "Edges merge equal misses, a shield merges edges. 1% reaches the store. I count from edge logs, because origin sees almost nothing." |
| Staff | "Capacity is solved by caching; the open issues are cost, takedown and checking it first, since fame multiplies harm. I alert review at ten times the usual rate and cut bytes per view." |