2012年6月12日 星期二

HA Active-Standby MySQL + Heartbeat 3.x + Coroysnc 1.x + Pacemaker 1.x on RHEL / CentOS - Section 1

- The HA Cluster design.


This HA MySQL clustering configuration will be based on 2 servers which are in an active-backup relationship. Below diagram explain the logical design of the setup.

Both HA-master nodes are installed with heartbeat packages, an internal nic presented to each other with private ip.  Heartbeat package of both nodes will check the status of remote node and take the “active node” role when remote node is down. Active node will be responsible to take over the VIP (Virtual IP, the IP floating between 2 HA master), MySQL DB store and spawn up MySQL process to serve mysql request. If replication slave is needed, a 3rd node could be added to the cluster as replication slave and this 3rd node could hooking to the VIP to fetch binary logs but the detail procedures for replication slave is out of the scope of this howto hence it should be pretty straight forward for those that familiar with mysql master-slave replication setup. 

- Hardware and software requirement of both nodes
So here are the ingredients for the HA setup.
  • 2 server with identical hardware configuration
  • Minimum requirement (at least 1G memory, 20G root disk)
  • Each node will need a pair of nic, public and internal heartbeat nic
  • Public nic will be configured as public facing (or at least the nic is connected to internet to allow packages fetching)
  • Internal nic of both nodes will be connected to each other via either crossover cable or on same VLAN.
  • One shared LUN (Logical Disk Unit) to be seen and mountable by both nodes. You may probably configure this by using iscsi (e.g. openfiler), vmware shared-disk , phyiscal fiber-channel storage or DRBD disk. In this example we used a pre-configured Vmware ESX shared-disk.
  • One shared Virtual IP for IP failover in between 2 nodes. This IP will be on the same segment of public nic's IP.
  • The OS will be RHEL/CentOS 6 64bit with minimal installation. Additional software repositories have to be added so that we could fetch and install Heartbeat 3.x, Corosync 1.x and Pacemaker 1.1.x.

沒有留言:

張貼留言