How the interviewer opens it
“Design an image hosting service that provides shareable links and public albums. The service must handle viral images and heavy anonymous read traffic.”
The prompt is vague on purpose. The first minutes are for you. Reduce the prompt to the core features and agree on the numbers before you draw.
What to clarify first
- Users and access
- Scale and peaks
- Read and write mix
- Image sizes and formats
- Albums
- Latency
- Consistency and availability
- Durability and retention
- Deletion and abuse
- Scope limits
The interviewer has the answers. In a SysRound round, Alex gives these answers, as a real interviewer does.
Scope of a strong answer
Core requirements
- Upload a static image and receive a shareable link.
- Serve public images to anonymous visitors.
- Create public albums and add or remove images.
- Delete an image and stop public access.
Usually out of scope
- Video and animation
- Private albums
- Image search and recommendations
- Original-file downloads
- Implementation of account systems and abuse classifiers
What interviewers ask about
- Upload completion
- A file transfer, image validation, and publication can fail at different points. Retries must not expose incomplete images or create duplicate work.
- Viral image traffic
- One image can dominate bandwidth within seconds. The first requests from many locations can create a second burst at the central service.
- Public image removal
- Public URLs remain usable outside albums. The service must stop access across many locations while old upload tasks can still finish.
Common mistakes
- Routes every image response through API servers.
- Stores image bytes in the metadata database.
- Publishes raw uploads before the service validates their contents.
- Assumes a CDN removes all origin load during a viral event.
- Promises quick deletion while public caches can serve images indefinitely.
- Adds database sharding before estimating the metadata write rate.
The bar by level
- Mid-level (L4/E4)
- Defines image and album APIs with owner checks. Separates metadata from image bytes. Uses object storage and a CDN. Explains upload status, pagination, and deletion.
- Senior (L5/E5)
- Makes upload completion and worker retries safe. Calculates bandwidth and cache misses. Handles cold viral traffic, file validation, and the removal deadline across cache layers.
- Staff (L6+/E6+)
- Defines guarantees across database, storage, workers, and CDN failures. Resolves removal versus availability during partitions. Quantifies cost and abuse risks. Justifies regional ownership and metadata growth plans.