I'm planning the set-up of a secondary datacenter for an existing system that runs in a single facility and uses master-master MySQL replication between two machines. I plan to add two machines to the second facility to make four machines in total. I'd like to be able to treat any machine as a master (only one at a time) to workaround machine failure.
I'm keen to avoid circular replication i.e. A=>B=>C=>D=>A since a single machine outage could affect replication to machines downstream. Ideally the replication would look like:
A <=> B
^ ^
1 2
v v
C <=> D
MySQL can't natively have more than one replication master. Are there any third-party replication agents that could be used in positions 1 and 2 to relay queries from the binlogs of one machine to another, filtering appropriately by server-id to avoid loops?