views:

91

answers:

1

I've got a Java web service backed by MySQL + EC2 + EBS. For data integrity I've looked into DRBD, MySQL cluster etc. but wonder if there isn't a simpler solution. I don't need high availability (can handle downtime)

There are only a few operations whose data I need to preserve -- creating an account, changing password, purchase receipt. The majority of the data I can afford to recover from a stale backup.

What I am thinking is that I could pipe selected INSERT/UPDATE commands to storage (S3, SimpleDB for instance) and when required (when the db blows up) replay these commands from the point of last backup. And wouldn't it be neat if this functionality was implemented in the JDBC driver itself.

Is this too silly to work, or am I missing another obvious and robust solution?

+1  A: 

Have you looked into moving your MySQL into Amazon Web Services as well? You can use Amazon Relational Database Service (RDS). Also see MySQL Enterprise Support.

Jim Ferrans
Yes, I have looked @ RDS, but even there the backups (snapshots) are up to 5 minutes out of date. I'd need another method to preserve critical tables which can't be out of date.
sehugg
The enterprise support has "MySQL Replication for master/slave database replication, failover and backup support". The slave should be able to take over with no data loss, though it may have some degree of *replication lag* as it finishes processing the updates from the now dead master. You're probably much better off using the standard MYSQL facilities instead of rolling your own.
Jim Ferrans