Design a Story feature with offline support
Company: Snapchat
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design a “Story” feature (similar to a social app’s stories) with the following capabilities:
## Core user features
- Users can create a story (photo/video + optional caption).
- Followers/friends can view a user’s story.
- Stories expire after a fixed TTL (e.g., 24 hours).
## Additional requirements
- **Favorite/Bookmark**: user can mark a story as “favorite” for quick access.
- **Save for offline**: user can explicitly save stories for offline viewing (device-side download + server-side state).
- Offline mode: if the device has no network, the app should still display previously saved stories.
## Non-functional requirements
- Very large scale (tens/hundreds of millions of users, heavy read traffic).
- Low latency story viewing.
- Privacy/ACLs (e.g., friends-only, custom lists, blocks).
- Handle deletes/expiration correctly across caches and offline copies.
Deliverables:
- APIs (create story, fetch feed, view story, favorite/unfavorite, save/unsave)
- High-level architecture (storage, cache/CDN, fanout strategy)
- Data model
- Offline sync strategy and edge cases (expiration, revocation, device storage pressure)
- Metrics and reliability considerations
Quick Answer: This question evaluates proficiency in large-scale system design, including distributed storage, cache and CDN strategies, API and data model design, access control, offline synchronization, and TTL/expiration semantics.