TOC — High Availability – DRBD & MySql
- High Availability (HA) – MySql using DRBD Part 1
- High Availability (HA) – MySql using DRBD Part 2
- High Availability (HA) – MySql using DRBD Part 3
- High Availability (HA) – MySql using DRBD Part 4
- High Availability (HA) – MySql using DRBD Part 5
- High Availability (HA) – MySql using DRBD Part 6
- High Availability (HA) – MySql using DRBD Part 7
High available systems provide almost 100% uptime means you hardly find that service is not working or website is down. There are some different terms used for High Availability like 3-9 available systems, 4-9 available systems and 5-9 available systems, which actually means 99.9 % available systems, 99.99% available systems and 99.999% available systems.
There are whole lot of more theories and terms specific to HA but the main motive is providing almost 100% up time. Generally stand-by systems are used for providing HA. In case one server goes down because of some reason, another server takes up all the requests and avoid downtime of service.
Before going towards more details, let me list down types of systems for which HA and performance can be done differently:
1. Read intensive systems: These are basically the systems where people view more data than create it. The percentage difference matters, generally all software systems are for reading and writing some or other kind of data but if there is a significant difference of % of reading and writing, some things can be planned in certain ways for high availability and performance.
2. Write intensive systems: There are the systems where read operation are less or during some fix time. Example of these kind of systems are telecoms systems where data is collected for each and every interaction but reporting is done on some intervals.
I tried to differentiate between above two cases because you can handle the HA differently in these cases. If you are read intensive systems, you can replicate your read data and provide more read nodes to make your service available for most of the time. As write is less in first case there can be less write nodes.
In second case you need to make sure that your service is up and running for all data preserved for all the transactions happened till now. If you are writing quickly to the system you need more I/O, fast processing and good bandwidth to provide the service. To maintain the High Availability you need to make sure that all the data is getting copied/replicated to the backup system which can be used in case of main machine goes down.
We are using MySql in our project and i studied over this subject to make our system Highly available. I am more close to case 2 and did study about it. According to my study MySql cluster does not help when you have write intensive system. Cluster provide less number of transactions per second than standalone instance because of all replication/concurrency business.
As we needed more transactions per second we chose MySql with DRBD as our HA solution. DRBD stands for Distributed Replicated Block Device. This is a software piece very close to linux kernel which does mirroring a whole block device via an assigned network. In this way you can create backup of a whole device.
Let’s do some home work before i go through what i did to achieve HA using MySql and HA.
Go through http://en.wikipedia.org/wiki/High_availability for understanding HA more.