Guru-host is using mainly Galera to achieve high availability and high performance from MySQL. Galera Replication is a synchronous multi-master replication plug-in for InnoDB. It is very different from the regular MySQL replication and addresses a number of issues including write conflicts when writing on multiple masters, replication lag and slaves being out of sync with the master. Users do not have to know which server they can write to (the master) and which servers they can read from (the slaves).
An application can write to any node in a Galera Replication cluster, and transaction commits (RBR events) are then applied on all servers, via a certification-based replication.
Certification-based replication is an alternative approach to synchronous database replication using Group Communication and transaction ordering techniques.
A minimal Galera cluster consists of 3 nodes. The reason is that, should there be a problem applying a transaction on one node (e.g., network problem or the machine becomes unresponsive), the two other nodes will have a quorum (i.e. a majority) and will be able to proceed with the transaction commit.
MySQL Replication is part of the standard MySQL database, and is mainly asynchronous in nature. Updates are always done on one master, and these are propagated to slaves. It is possible to create a ring topology with multiple masters, however this is not recommended as it is very easy for the servers to get out of sync in case of a master failing. There is no automatic failover or resynchronization in these cases.
Galera Replication is a plug-in to MySQL, and enables a true master-master setup for InnoDB. In a Galera Replication cluster, all nodes are masters and applications can read and write from any node. Transactions are synchronously committed on all nodes. In case of a node failing, the other nodes will continue to operate and kept up to date. When the failed node comes up again, it automatically synchronizes with the other nodes before it is allowed back into the cluster. No data is lost when a node fails.
Galera Replication has a number of benefits:
- A high availability solution with synchronous replication, failover and resynchronization
- No loss of data
- All servers have up-to-date data (no slave lag)
- Read scalability
- 'Pretty good' write scalability
- High availability across data centers
Like any solution, there are some limitations:
- It supports only InnoDB
- With increasing number of writeable masters, the transaction rollback rate may increase, especially if there is write contention on the same dataset. This increases transaction latency.
- It is possible for a slow/overloaded master node to affect performance of the Galera Replication cluster, therefore it is recommended to have uniform servers across the cluster.
Using Galera Replication to replicate between Data Centers:
Although Galera Replication is synchronous, it is possible to deploy a Galera Replication cluster across data centers. Synchronous replication is traditionally implemented via 2-phase commit, where messages are sent to all nodes in a cluster in a 'prepare' phase, and another set of messages are sent in a 'commit' phase. This approach is usually not suitable for geographically disparate nodes, because of the latencies in sending messages between nodes.
Galera Replication makes use of certification based replication, that is a form of synchronous replication with reduced overhead.
Guru-host manages clusters for various large Web sites, online communities and social networks. If you run a Web site that is constantly growing and requires a solid managed infrastructure, Guru-host can give you the security and scalability necessary to grow with confidence.
Clusters are deployed within 1-2 weeks. Rush deployment can be arranged for an additional rush setup fee. A rush deployment can be deployed in as little as 2 days. Once your initial deployment is complete, we can scale your cluster to a larger size in just a few hours.
Guru-host follows a five-step procedure for deploying clusters:
- We investigate your current application, get a feel for the technologies you utilize and we assess potential losses due to migration downtime. We will also discuss future growth and scalability at this time.
- We investigate your current hosting enviroment. This is to get an idea of what you will be moving away from and how it is currently setup for future reference.
- We design an optimal infrastructure for you that meets your hosting needs.
- We present you with your options and explain our plans to you.
- We implement our plan, and manage your enviroment. You will never need to touch your servers again.
- All clusters are built on a custom basis to fit our customers' exact needs and requirements.
Contact us to discuss the best possible scenario for your needs.