A Glimpse into Database Scalability

Written by

You must have come across the term ‘scalability’ lots of time at your workplace. Scalability means the ability of any system to scale up or down depending on the workload.

On the same lines, database scalability refers to the ability of a database to scale based on the workload it is subjected to. Let us look at two main approaches of database scalability.

  1. Vertical Database Scalability

Vertical database scalability is adding more capacity to a single machine. You can apply virtual scalability to almost every database and increase CPU cores, disk space and RAM for an existing server. With vertical scalability, you will notice the following:

  • The application compatibility is prioritized and there is no need for you to change codes.
  • The overall administrative efforts are reduced as there is only a single system image to manage.
  • The software costs can increase as they are charged by the number of cores present
  • Along with software, even the cost of hardware configuration may shoot up. However, thanks to evolving technology and hardware of current times, you can get great price-performance ratios through several highly efficient server components.

Apart from a number of benefits and opportunities, vertical database scalability presents a few limitations that you must consider before opting for it. The questions you must ask are:

  • What will happen when a particular workload is unable to fit onto the best-equipped hardware configuration? Don’t be surprised to come across such a scenario but don’t be unprepared for it as well. Keep an alternative in mind so that you don’t get stuck with this issue for too long.
  • Another question you must ask is what will happen if the workload is highly variable. You might wonder why should you make an upfront investment in a system that is expensive, which could go underutilized for most of the time. This is one of the main reasons why most cloud providers do not put all their chips on vertical scalability.

Horizontal Database Scalability

In this method you can add capacity by adding more machines. Horizontal database scaling helps in tackling variable workloads by hosting data across multiple databases. Also known as scaling-out, it helps in reducing the overall costs by using less of the sophisticated hardware components and freeing up the resources for more in-application development, and system and data maintenance. At the same time, it is crucial to remember that most database products are not horizontally scalable.

There are several ways to scale out data tiers. Choose the one that suits your workload and the applications that are supported by the data store. Functional partitioning is a common approach, where the data set is divided into business or organizational functionalities. Let us look at two common scale-out techniques.

  • Data is fully replicated across all the nodes. There is one primary copy that accepts changes and multiple active replicas are typically read-only, as in the SQL Server AlwaysOn Readable Secondaries or Replication features. Those configurations are usually good for read-intensive workloads such as reporting where you can connect to any server and execute your queries. However, if you are a writer, you can only connect to the primary copy, causing a bottleneck in write-intensive workloads.

  • Read and write operations are distributed across multiple nodes. When you apply distribution logic of any kind, a given transaction is fully satisfied by all the different entities that reside on a single node. Usually, some data will be replicated across all the nodes, however, the transactional or activity data is partitioned based on a key which applies to all the entities that belong to the same logical group.

If you want to tap into the power of modern databases but do not want to type out even one line of code, then database load balancing software is the way to go.

What’s hot on Infosecurity Magazine?