New cluster - haproxy,keepalived, dns made easy?
Hi i am busy created a 3 node database cluster.
What is a bit confusing for me is the virtual IP section, is it something i need to request from my service provider?
Can i set up the 3 nodes with haproxy and dnsmadeeasy and just point the database there?
is haproxy even required with the above setup?
thanks, Bob
-
Hi,
Keepalived allows you to configure a virtual IP within a group of servers. This virtual IP is assigned to an active server. If this server fails, the IP is automatically migrated to the secondary server, allowing it to continue working with the same IP in a transparent way for your systems. You can avoid using this, but if your load balancer fails, all your system will be down, so keepalived is recommended for an HA environment with 2 load balancers at least.
You can refer the following links for HA environments:
https://severalnines.com/blog/become-clustercontrol-dba-making-your-db-components-ha-load-balancers
https://severalnines.com/resources/tutorials/mysql-replication-high-availability-tutorial
https://severalnines.com/resources/tutorials/mysql-load-balancing-haproxy-tutorial
https://severalnines.com/blog/become-mysql-dba-blog-series-database-high-availability
-
Hi,
The DNS is not recommended for HA.
If you have the same record resolving differents IP address you can't check if some of the destinations are not responding, so if one of the nodes are down, you will sending traffic anyway.
For this is recommended to use a Load Balancer. With this, if one node is down, the load balancer won't send traffic to him until it will online again.
-
Hi,
In general, the virtual IP is a private IP address, so you don't need to ask this to your ISP, but it depends on your infrastructure.
I can't help you with the DNS made easy implementation because of I'm not sure how it works, but you can implement keepalived with ClusterControl to add HA for your load balancer servers.
-
Hi,
ClusterControl's Keepalived deployment only works with bare-metal infrastructure (where you have the freedom to choose your routable floating IP address). For cloud infrastructure the steps are vary depending on the cloud provider. With Digital Ocean, you need to use Floating IP Assignment Script as shown in this guide:
Regards,
Ashraf -
Hi Alyson,
The HAProxy should be installed in a separate Server/VM or in the Application Server, depending on the requirement. This is to balance the traffic from the application server or from the users to the correct server/servers.
Regarding the Keepalived, this service should be installed in the same HAProxy server if you want to deploy two HAProxy for HA. Keepalived will use a Virtual IP Address configured in the active HAProxy node. If this node fails, keepalived will migrate the Virtual IP Address to the second HAProxy to keep working in a transparent way for the application.
The Application should use the Virtual IP address to make it works.
If you don't want to deploy two HAProxy instances, the keepalived is not necessary because it doesn't have a second HAProxy to migrate the virtual IP address.
Regards,
Sebastian.
Please sign in to leave a comment.
Comments
12 comments