Currently i'm running Rails 3 web application with MySQL on one first server and Rails API application on second server that connects to the MySQL database from first server.
I'm not happy that API depends on database from first server and decided to go with replication/clustering, but i'm not sure what is the best options for my case?
- Master - slave replication, our api not read-only, it writes a lot of information too, so it doesn't look that bright.
- Master - Master replication, too afraid of inconsistency in data, since it can get out of sync.
- MySQL cluster - this seems like the best options for me, however i'm not sure if it's worth clustering with only 2 nodes?
What if one node goes down, does it means, that as soon as it goes live and will consume second node as donor, the whole cluster will be unavailable? How can i avoid this?
What do you think my best option here?