Design an image upload/download service
MicrosoftSoftware Engineer · OnsiteLast updated
This question evaluates a candidate's competency in system design, distributed storage and processing, API design, scalability, security, reliability, and observability for production-grade services.
Design an image upload and download service for web and mobile clients. Specify: (
- APIs (e.g., POST /images for single and multipart uploads, GET /images/{id}, GET /images/{id}/variants; support presigned URLs); (
- storage choices (object storage vs. block/file, metadata schema, IDs, deduplication); (
- processing pipeline (asynchronous resizing/thumbnailing, queues/workers, EXIF handling, virus scan, idempotency, retries); (
- delivery (CDN, caching, range requests, ETag/versioning, cache invalidation); (
- security and compliance (authN/Z, rate limits/quotas, signed URLs, encryption in transit/at rest, content validation, PII considerations); (
- reliability and consistency (multipart uploads, checksums, retries, eventual consistency handling, disaster recovery/backups); (
- scalability and cost (throughput estimates, partitioning/sharding, storage tiering); (
- observability and SLOs (metrics, logs, traces, alerts); (
- edge cases (partial/failed uploads, duplicate files, hot objects, very large images, deletions/retention). Provide a high-level architecture diagram description, data models, and key trade-offs.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.