Setup HAProxy Load Balancer for MariaDB Galera Cluster Rumi, December 28, 2022December 28, 2022 If you check the above test scenario and try to create DBs on any of the nodes, you would see that the data would automatically sync between the nodes. Which means Availability is achieved. Now to achieve high availability we will use HaProxy as the loadbalancer. Set up another VM for this and install HAProxy as follows. sudo apt-get update sudo apt-get install haproxy Edit HA Proxy Config as follows. sudo vim /etc/haproxy/haproxy.cfg Add the following lines. # MySQL Cluster FE configuration frontend mysql_cluster_frontend bind *:3306 mode tcp option tcplog default_backend galera_cluster_backend # MySQL Cluster BE configuration backend galera_cluster_backend mode tcp option tcpka balance leastconn server mysql-01 <node-1-ip>:3306 check weight 1 server mysql-02 <node-2-ip>:3306 check weight 1 server mysql-03 <node-3-ip>:3306 check weight 1 Make sure to update the ip addresses of each node in the config above. systemctl restart haproxy That’s it. Connect to Loadbalancer VM IP address : 3306 and you should now have a Highly Available MySQL/Mariadb Cluster with Galera. Ref: View story at Medium.com Related Administrations Configurations (Linux) HAProxyUbuntuUbuntu 20
Step by step procedure for installing Sarg Log Analyzer April 17, 2009 Installation of the sarg log analyzer: 1) Download the packeg to “/usr/local/src” directory cd /usr/local/src wget -nd http://downloads.safesquid.net/free/general/precompiled/sarg-2.2.3.1.tar.gz Related Read More
Essential Openvz commands May 31, 2017 1. Command to list the running VPSs in a node # vzlist Example: # vzlist CTID NPROC STATUS IP_ADDR HOSTNAME 106 104 running xx.xx.xx.xx server1.test.com 107 46 running xx.xx.xx.xx server2.test.com 108 83 running xx.xx.xx.xx server3.test.com 109 86 running xx.xx.xx.xx server4.test.com 2. This command lists all (running and stopped) the VPSs… Read More
How to Change Hostname on Ubuntu 18.04 August 6, 2019 Display the Current Hostname To view the current hostname, enter the following command: hostnamectl As you can see in the image above, the current hostname is set to ubuntu1804.localdomain. Change the Hostname The following steps outline how to change the hostname in Ubuntu 18.04. 1. Change the hostname using hostnamectl… Read More