Member-only story
How to Scale SQL and NoSQL Databases
Database sharding and managing CAP theorem tradeoffs with distributed databases
When the amount of data gets too large for our databases, it’s natural that we consider scaling them to cope with the increased load. However, depending on whether it is a SQL or NoSQL database, the techniques and principles behind scaling are different. We’ll be exploring the main ideas behind scalability for both databases. Since this article assumes some fundamental knowledge about databases and their properties, it would be helpful to review SQL/NoSQL databases.
Content Overview
- Vertical v.s. Horizontal Scaling
- Database Sharding
- Scaling SQL Database
- Scaling NoSQL Database
Vertical v.s. Horizontal Scaling
Before we jump in, let’s understand the differences between the two types of scaling.
Vertical scaling
Vertical scaling is the process of improving the processing power of the server, by increasing its hardware capacity (e.g. CPU, RAM). While this could be a plausible option, there’s a threshold to the hardware improvements — it’s capped at what’s currently available. In…