Today, I guided a workshop about high-availability database solutions at NDU. The workshop went for 6 straight hours (from 9:30 till 15:30) and was attended by more than 50 students from various universities in Lebanon. The workshop was organized by the NDU IEEE branch in collaboration with the Computer Science Club.
I started the workshop with a general overview of availability issues in Database solutions. Then, I moved to a more detailed description of Database Replication and Database Clustering before moving forward to the hands-on implementation that included the following:
- How-to install / configure MySQL Cluster on Centos
- How-to configure a database for asynchronous data replication
- How-to configure a Cluster for real-time synchronous data mirroring
- How-to configure load-balancing using the “balance” tool and Linux VFS (overview)
The unique thing behind this workshop was the ability to achieve a working solution that includes a Cluster Manager, 2 Cluster Nodes, 2 Cluster API nodes and a load-balancer while using only 3 server machines.
The solution architecture was simple and included the following machines:
- 192.168.0.1: this machine acted as the load balancer and the
cluster manager. All requests to database operations in applications
have to go through this machine which will, in turn, forward them to
either 192.168.0.2 or 192.168.0.3.
- A slightly different solution will be to use Linux VFS to share a load-balanced IP address (e.g. 192.168.0.10) on 192.168.0.2 and 192.168.0.3. In this case, application database operations will have to go to the shared IP address (192.168.0.10)
- 192.168.0.2: this machine acted as a cluster node and a MySQL API node.
- 192.168.0.3: this machine acted as a cluster node and a MySQL API node.