Design an image upload/download service
Company: Microsoft
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design an image upload and download service for web and mobile clients. Specify:
(
1) APIs (e.g., POST /images for single and multipart uploads, GET /images/{id}, GET /images/{id}/variants; support presigned URLs);
(
2) storage choices (object storage vs. block/file, metadata schema, IDs, deduplication);
(
3) processing pipeline (asynchronous resizing/thumbnailing, queues/workers, EXIF handling, virus scan, idempotency, retries);
(
4) delivery (CDN, caching, range requests, ETag/versioning, cache invalidation);
(
5) security and compliance (authN/Z, rate limits/quotas, signed URLs, encryption in transit/at rest, content validation, PII considerations);
(
6) reliability and consistency (multipart uploads, checksums, retries, eventual consistency handling, disaster recovery/backups);
(
7) scalability and cost (throughput estimates, partitioning/sharding, storage tiering);
(
8) observability and SLOs (metrics, logs, traces, alerts);
(
9) 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.
Quick Answer: 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.