bugfree Icon
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course

System Design Question

Design a Photo Sharing Service

bugfree Icon

Hello, I am bugfree Assistant. Feel free to ask me for any question related to this problem

Functional Requirements:

  • Users can register and log in to the service.
  • Users can upload photos (and optionally short videos).
  • Users can view their own photos and profiles.
  • Users can follow and unfollow other users.
  • Users can see a home feed showing recent posts from users they follow.
  • Users can like and comment on posts.
  • Users receive notifications for relevant events (e.g., new follower, likes, comments).

Non-Functional Requirements:

  • The system should support a large number of users (millions to billions).
  • Home feed should load quickly (target: < 1 second per request).
  • Photo uploads should be reliable and reasonably fast.
  • High availability: the service should remain operational even if some components fail.
  • Data consistency: eventual consistency is acceptable for feed and notifications, but actions like follow/unfollow should be reflected promptly.
  • Scalability: the system must handle increasing load and data volume without major redesign.
  • Media files (photos/videos) should be delivered efficiently worldwide (low latency for global users).
  • User data and media should be stored securely and reliably.

System Design Diagrams

Zoom In and Out via trackpad or posture