How to solve DB replication problem? What if we use Cloud?
What if use such services, like database.com?
Have you tried? Or any other services?
Any comments welcome
Thanks.
1 Reply
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.