S/No | Logical Entities | Tangible Entities |
---|---|---|
1 | Data | Text, images, files, vides, etc. |
2 | Database | MongoDB, MySQL, Oracle, etc. |
3 | Applications (Presentation) | Python, React, Golang, Java, etc. |
4 | Communication | APIs, Messages, RPCs, etc. |
5 | Cache | Redis, Memecache, etc. |
6 | Message Queue | Kafka, RebbitMQ, etc. |
7 | Infrastructure | AWS, Cloud, Azure, etc. |
Designing a system that supports millions of users is challenging, and it is a journey that requires continuous refinement and endless improvement.
Let’s build a system that supports a single user and gradually scale it up to serve millions of users.
Scaling a system is an iterative process.
These two are the initial and final design architecture, we will start with the architecture on the left and work our way through the right one.
The right one has multiple datacenters like DC1 but for space constraints only DC1 is shown.
A journey of a thousand miles begins with a single step, and building a complex system is no different. To start with something simple, everything is running on a single server.
The left architecture above is a single server setup where everything is running on one server: web app, database, cache, etc.
With the growth of the user base, one server is not enough, and we need multiple servers: one for web/mobile traffic, the other for the database. Separating web/mobile traffic (web tier) and database (data tier) servers allows them to be scaled independently.
Choosing the right database is an important task:
Relational databases are also called a relational database management system (RDBMS) or SQL database.
Non-Relational databases are also called NoSQL databases.
Non-relational databases might be the right choice if: