Practice/Uber/Design a Private Photo Feed App
Design a Private Photo Feed App
System DesignMust
Problem Statement
Design a personal photo sharing application where users upload photos to a private feed that only they can access. Each user maintains a private collection of images, browsable in chronological order, with support for multiple image resolutions and metadata extraction. Think of it as a personal photo vault similar to Google Photos in private mode.
The system must handle large image files reliably, generate multiple resolutions for different viewing contexts, extract metadata from uploads, and provide fast feed browsing even as users accumulate thousands of photos over time. The core challenges revolve around efficient binary storage, background processing pipelines, strict privacy guarantees, and keeping read latency low for feed pagination.
Interviewers at Uber ask this to test your understanding of direct-to-storage upload patterns, asynchronous processing pipelines, access control at every layer, and efficient pagination for growing datasets.
Key Requirements
Functional
- Photo upload -- users upload images of varying sizes with optional titles, tags, and captions, preserving original quality
- Private feed -- users scroll through their photos in reverse chronological order with fast page loads showing thumbnails
- Photo management -- users view full resolution images, update metadata, delete photos, and organize content
- Search and filtering -- users find photos by date range, tags, or text in titles and captions
Non-Functional
- Scalability -- support 10 million users with an average of 5,000 photos per active user, handling 500 uploads per second at peak
- Reliability -- ensure uploaded photos are never lost, with 99.9% upload success rate and background processing completing within minutes
- Latency -- feed loading under 300 ms for the first page, thumbnail display under 200 ms, full image loading under 2 seconds
- Consistency -- strong consistency for ownership checks and metadata updates; eventual consistency acceptable for search indexes
What Interviewers Focus On
Based on real interview experiences at Uber, these are the areas interviewers probe most deeply:
1. Upload Flow and Binary Storage Strategy
How you handle large file uploads determines system reliability and cost. Interviewers want direct-to-storage patterns that avoid proxying through application servers.
Hints to consider:
- Generate pre-signed URLs from your API server that allow clients to upload directly to object storage (S3, GCS)
- Use multipart upload for large files to handle network interruptions with resume capability
- Store only metadata in your relational database while keeping blobs in durable object storage
- Consider mobile upload challenges like slow networks and battery constraints
2. Background Processing Pipeline
Thumbnail generation and metadata extraction must never block the upload request. Interviewers look for asynchronous patterns with proper failure handling.
Hints to consider:
- Emit events to a message queue after upload completes, triggering workers to process images
- Generate multiple thumbnail sizes (small for feed, medium for preview, large for detail view)
- Extract EXIF data (GPS, camera model, orientation) in workers and update metadata asynchronously
- Design for idempotency so workers can safely retry without creating duplicate thumbnails
- Track processing state so the feed can show "processing" indicators for recent uploads
3. Privacy and Access Control
With private feeds, even a small authorization bug exposes user data. Interviewers probe how you prevent cross-user access at every layer.
Hints to consider:
- Store photos in private buckets with no public read access
- Generate short-lived signed URLs (5-15 minutes) scoped to the requesting user's identity
- Validate user_id ownership in your API layer before returning metadata or issuing signed URLs
- Avoid CDN caching for private images, or use private CDNs with authentication forwarding