System Design Fundamentals
So far we have discussed different software architecture topics in more low-level aspects, focusing on designing specific parts of software system separately such as backend, frontend, middleware etc. With this article we take the discussion to one step further and discuss designing a software system end-to-end. In designing whole system, besides detailed technical analysis the one needs to make thoughts about scalability of a system supporting from one user to million users. The absolute must-have pillars of a system design are:
Picking a database…
Database — whenever there is a need for a persisting data continuously, there is a need for Databases. Simply put, it is just a collection of information that is organised and saved for consistent interaction. In designing The different types like relational, non-relational databases are developed over decades to match different use-cases.
- Relational Databases (also called SQL databases) like MySQL, PostqreSQL, DB2 are pretty popular alternatives that hold that in form of tables, rows with joining operations over primary, secondary keys.
- Non-Relational Databases (also called NoSQL databases) like MongoDB, CouchDB, Cassandra are well-known examples that are categorised in 4 different forms: key-value stores, column stores, graph stores and document stores.
Take relational database if data is structured, relational to one another, latency is not an issue, no massive amount.
Take non-relational database if data is not specifically relevant to one another, only serialising/deserialising needed, it should be super-low latent big amount of data.
As a software system gets more users, its abilities to handle that load gets limited. So the one can tend to scale-up or scale-out the system whether vertically or horizontally
- vertical scaling — is increasing power through more CPU, RAM etc. to existing system. It is suitable for low-latency systems because of its simplicity. But it has limits in terms of technical infrastructure. If server fails, whole system fails.
- horizontal scaling — is adding…