How To Design A System Like... Flashcards

1
Q

How to Design a System like Instagram

A

Here’s a simple step-by-step approach to build the core functionality:

Users perform an action on their device like tapping the like button, uploading a picture, or following another user.

The request goes through a gateway to the backend server built using frameworks like Django, Express, or anything else.

The data is stored in the database.

Structured data such as user profiles, comments, and relationships are stored in relational databases like Postgres.

Data items requiring high write throughput such as user feeds and activity logs can be stored in eventually consistent databases like Cassandra.

Frequently accessed data is stored in cache (for example, Redis or Memcached).

Images and videos are stored in an object storage and corresponding metadata is stored in the database.

Asynchronous tasks like sending notifications are sent to a queue.

Background workers (like Celery) retrieve the task from the queue and perform the necessary processing.

Celery worker also performs the necessary updates in the databases.

Over to you: What else will you add to build an Instagram-like system?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly