Detailed Design of Instagram
Analyze the detailed System Design of Instagram, focusing on component integration like CDNs, caching, and read/write separation. Explore the trade-offs between pull, push, and hybrid approaches for efficient timeline generation. Learn how to meet non-functional requirements like scalability and low latency for a web-scale application.
We'll cover the following...
Add more components
We expand the design with the following components:
Load balancer: Distributes incoming user requests.
Application servers: Host the service logic for end users.
Relational database: Stores metadata and user information.
Blob storage: Stores media files (photos and videos).
Upload, view, and search a photo
Let’s discuss the upload, view, and search workflow:
Upload flow: The client sends a photo to the load balancer, which routes it to an application server. The server stores the photo in the database (blob storage) and sends a success or error notification to the user.
View and search flow: When a client requests to view or search for a photo, the application server fetches the matching content from the database and serves it to the user.
Service splitting: Since read requests (views) significantly outnumber write requests (uploads), we split the architecture into separate read and write services. This allows us to scale the read infrastructure independently to handle high traffic.
Optimization: We introduce caching to speed up reads for millions of users. We also implement ...