MySQL Forums
Forum List  »  InnoDB clusters

MySQL Router with one node left VS HAPROXY
Posted by: R. B.
Date: June 19, 2018 07:40AM

Hi all,

I'm working on a MySQL InnoDB cluster. The cluster part I have working (first set up group replication and used one command to create the cluster).

I also installed and bootstrapped the MySQL Router, which is working fine. I have 3 nodes, of which only one can fail ( So indeed, connecting thru the router only works when one server is down. But as I take down the second one, I can still connect and makes edits on the remaining server directly on port 3306, but just not through the router. These edits are synced to the other servers when they come back up.

This makes me wonder, what are advantages of the MySQL Router over HAPROXY? I could just set up an HAPROXY instance with the 3 servers so I can also use them when one is down. The only things I can come up with are the fact that the router has implemented health checking by default and can also find out which node has the write right. I could make all nodes primary though, or with some tweaking I could probably make a script which figures out which node has write rights.

Another possibility is using the router, and when the router is 'down', making haproxy switch to the only left over server, so I would have the 3 servers setup as backups and the router set als the default route in HAPROXY.

Am I looking over something or would this be a viable option?

One last thing that might be possible (and would certainly be the easiest), is to have some way to enable connecting through the router when only 1 server is up. If that isn't possible, for what reason is that? It is probably a design choice, but why?

Thanks in advance!

Edited 2 time(s). Last edit at 06/19/2018 07:47AM by R. B..

Options: ReplyQuote

Written By
MySQL Router with one node left VS HAPROXY
June 19, 2018 07:40AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.