HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

Why is it more difficult to horizontally scale a relational database than a NoSQL database like MongoDB?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
whyhorizontallymorethanlikemongodbrelationaldatabasescaledifficult

Problem

Is the main reason for the difficulty in horizontally scaling / distributing an RDBMS because of an adherence to ACID transactions? Is it the fact that multiple tables are so interconnected, or something else?

My impression is that it’s mostly the ACID requirements, given that different nodes in a cluster may have different values at any given time. But heck, I’m fuzzy on how ACID even works.

Conversely, why are some NoSQL databases so much easier to distribute? I don’t know enough about distributed databases to understand why one db can be easily distributed but the other cannot.

Can anyone shed some light?

Solution

Why is it more difficult to horizontally scale a relational database than a NoSQL database

I'm afraid your assumption is a bit flawed.

It is not difficult to scale a relational (or any other) DBMS horizontally (or along any other axis). What's difficult is to maintain all the promises the DBMS offers while doing so.

A relational DBMS mainly promises consistency, and when it's spread across multiple instances, it makes you wait until all (or at least the majority) of instances agree on the final state of the transaction. Thus, you buy the consisent state of the database for the time it takes for all the instances to come to an agreement about the transaction state.

A so called1 "NoSQL" DBMS generally promises very short local response time, at the price of not guaranteeing the same transaction state in its other instances, at any point in time (which includes never, in some cases).

Some applications (airline seat reservation comes to mind) value consistency more, while others might prefer faster response time even if the result isn't necessarlily true (like some social networks do).

Fundamentally, your question reduces to "why is it [...] difficult to [...] scale a [...] database", and the answer is, "because". It's difficult to scale anything without sacrificing its original qualities, be it raising children, delivering pizza, sending humans into space, breeding chicken in your backyard...

1 - There's nothing to prevent it from using the SQL syntax, anyway.

Context

StackExchange Database Administrators Q#314757, answer score: 16

Revisions (0)

No revisions yet.