How to solve DB replication problem? What if we use Cloud?

Basically everyone knows that DB replication is weird.

What if use such services, like database.com?

Have you tried? Or any other services?

Any comments welcome

Thanks.

1 Reply

I'd say that pricing scheme on database.com is more complicated than replication. Replication is simple if you understand the CAP model and the inherent problem.

But using ANY external service will introduce orders of magnitude more latency into your database connection(s), and if you need replication it means you have heavy load that warrants one.

Replication is only difficult in two aspects:

1. Multiple masters for write-heavy situations

2. What happens if nodes come out of sync

If you don't need transactional integrity, perhaps you can try with several instances of MongoDB, afaik it allows multimaster replication and bringing new node up to speed (say it came out of sync and you had to repair/restart/rebuild it) is relatively easy.

But the same thing can be said for PostgreSQL replicated with pgPool-II (statement-level). You can have any number of masters and/or slaves in combination with very simple setup.

If your read : write ratio is high, then you can make it with single master? Again PostgreSQL (9.0+) excels in this with WAL stream replication and you can still throw pgPool-II in front of the db cluster for dead easy balanced READS. AND you get full ACID compliant system so if anything fails you can be sure transactions are intact and you can restore from any backup or re-sync from any point via WAL stream without losing any data.

The problem is, CAP is not weird or difficult, it is annoying. Kinda like the law of thermodynamics of the database theory. :)

Edit: If it isn't clear, my comment is only on the replication part, ie. if you need replication don't run to external services. But services like database.com replace entire db stack and administration, not just the replication part. Latency still applies, though.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct