Is it possible to scale out a RDB ? If it's possible, how can one achieve it?

I'm asking this question because I assisted to a NoSQL event in which the speaker told many times that the one of the disadvantages of relational databases is the impossibility to scale out. In other word, we should add more ram and more storage but we can't just add another computer like we would do if we're using a NoSQL database.

  • I think this belongs in stackoverflow or programmers.stackexchange. Jan 18, 2012 at 15:28
  • Sharding is also called "partitioning" in rdbms terminology. Where you split a table up over multiple servers. Jan 18, 2012 at 15:30
  • 1
    @MauricioScheffer Yeah, or "dba.stackexchange". Jan 18, 2012 at 15:31
  • 1
    It probably belongs on the Database exchange. Jan 18, 2012 at 15:31
  • I'd rather there not be a separate community for DBs...
    – gWaldo
    Jan 22, 2012 at 2:15

4 Answers 4


Yes, to some extent.

  • Master-Master Replication — theoretically scales for read and writes, however for writes it's complex and requires distributed commit mechanism, such as two-phase commit. This limits it's practicality.

  • Master-Slave Replication — scales for read operations, however it doesn't help at all for write operations. Introduces replication lag.

  • Vertical partitioning — basically locating unrelated tables on different servers. scales for reads and writes, however disadvantage is that you cannot easily JOIN results from different servers.

  • Horizontal partitioning aka Sharding — Distributing data from each table evenly among all servers. Location of data is determined by sharding key. Scales for reads and writes, however accessing data via criteria other then the sharding key requires querying all the servers, in extreme cases requires map-reduce kind of infrastructure.

If you take vertical and horizontal partitioning to extreme, you end up practically with NoSQL solution built on top of SQL backend.

The rule of thumb is, that you cannot scale horizontally preserving full ACID, you will have to give up at least one characteristic. Most typically in scalable systems have only eventual consistency (ie. whole system is not guaranteed to be consistent at all times, but is guaranteed to eventually reach consistent state).


Yes, examples: Oracle RAC, MySQL Sharding, SQL Server HADRON

Not all apps suit the NoSQL paradigm: banking, trading or accounting for example.

Also see http://www.codinghorror.com/blog/2009/06/scaling-up-vs-scaling-out-hidden-costs.html

Sounds like a prejudice to me and it's been done to death many times over


Yes, it's possible to scale out a relational database, using Sharding and/or replication.

NoSQL solutions are typically much easier to shard/replicate. They do this by relaxing the consistency requirement in the CAP theorem.


It is possible to scale out an RDBMS, but it is not easy, and involves some compromises (which NoSQL solutions often tout as part of their basic design as "features"). For instance, you often are forced to give up on cross-server transactions for performance reasons. Search for "sharding" with your chosen relational DB name and you will likely find a lot of solutions with different trade-offs. None are going to be automatic, as you need to carefully manage what data goes onto what server since the data in different tables is related.

For what it's worth, Facebook runs on thousands of sharded MySQL servers... so it is possible. All of the Microsoft web properties also run on sharded SQL Server databases. Usually this involves a good amount of application code changes (which NoSQL solutions also force you to make as well).

  • 1
    Facebook uses MySQL, but as a backend for key-value store.
    – vartec
    Jan 18, 2012 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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