24

In database context, I have come across horizontal scalability as one of the advantages of the NOSQL databases. What does the term mean?

How would it compare to vertical scaling?

4 Answers 4

24

Horizontal Scaling
Horizontal Scaling is essentially building out instead of up. You don't go and buy a bigger beefier server and move all of your load onto it, instead you buy 1+ additional servers and distribute your load across them.

Horizontal scaling is used when you have the ability to run multiple instances on servers simultaneously. Typically it is much harder to go from 1 server to 2 servers then it is to go from 2 to 5, 10, 50, etc.

Once you've addressed the issues of running parallel instances, you can take great advantage of environments like Amazon EC2, Rackspace's Cloud Service, GoGrid, etc as you can bring instances up and down based on demand, reducing the need to pay for server power you aren't using just to cover those peak loads.

Relational Databases are one of the more difficult items to run full read/write in parallel.

I saw Damien Katz speaking about CouchDB at StackOverflow DevDays in Austin and one of his primary focuses for its creation was these parallel instances. As this has been a focus of it since day one, it would be much more capable of taking advantage of horizontal scaling.

Vertical Scaling
Vertical Scaling is the opposite, build up instead of out. Go and buy the strongest piece of hardware you can afford and put your application, database, etc on it.

Real World
Of course, both of these have their advantages and disadvantages. Often times a combination of these two are used for a final solution.

You may have your primary database where everyone writes to and reads real time data on a large piece of hardware. Then have distributed read only copies of the database for heavier data analysis and reporting where being up to the minute doesn't matter as much. Then the front end web application may be running on multiple web servers behind a load balancer.

1
  • 2
    Oracle's RAC is an example of Horizontal Scaling in a traditional RDBMS. Commented Aug 9, 2011 at 22:47
0

Horizontal scaling is great when you need an application that needs to handle a high amount of writes and parallel reads. Think of a website that is getting a huge amount of traffic and needs to log this, or needs to log a large number of events.

I guess the biggest plus point is that horizontal scaling can be done using commodity hardware, and there is only so much you can do with vertical scaling and trying to make your existing boxes bigger.

Traditional RDBMSs fail here for a variety of reasons (including the fact that they are ACID), and NoSQL solutions excel here because they can be easily scaled horizontally - but that's another story (RDBMS/SQL vs NoSQL.)

0

Some people in the industry use different terminology to mean the same thing:

  • scale up = vertical scaling
  • scale out = horizontal scaling
-3

Make it simpler to understand. NO SQL DB means no JOIN which means your number of columns stays the same that means all you care about scaling is the number of data i.e. the number of rows which means horizontal growth or scaling.

1
  • Not true. You can definitely join in many NoSQL products. Commented Feb 11, 2021 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.