Modern databases provide multiple approaches to scaling and managing greater load and query throughput. Traditionally, scaling methods are categorized into two main types:
Vertical scaling - Scaling up by increasing resources on a single machine
Horizontal scaling - Scaling out by adding more machines (nodes)
This guide will discuss the pros and cons of each approach.
Vertical scaling, or scaling up, involves increasing the resources of a single database instance. In cloud environments like Amazon RDS, this typically means:
Increasing CPU capacity
Adding more RAM
Upgrading to faster storage (e.g., from gp2 to io1 in AWS)
Expanding storage capacity
In a cloud environment, CPU and RAM are commonly bundled as a machine instance type and are typically scaled by doubling the instance type (e.g., going from a Large to X-Large).
Horizontal scaling involves distributing the database load across multiple servers.Few truly horizontally scalable databases exist, but these databases run on multiple nodes, typically distributing queries across multiple compute nodes and using a mix of shared storage layer along with locally cached data.Traditional databases like PostgreSQL are not designed for native horizontal scaling, but some strategies can be employed:
Springtail recognizes the challenges in migrating an application to a new database. There are often compatibility issues with the new database that require extensive testing, in addition to the time and complexity of performing the migration. Springtail solves this problem by leveraging a scalable set of distributed read-replicas. The set of Springtail replicas can dynamically grow or shrink as demand necessitates; providing throughput when needed, and reducing costs during periods of low usage.Learn more about Springtail’s architecture here.