Diwali Special Offer – Flat 20% OFF on VPS Hosting + Free .in & .co.in Domain
Database clusterization is a compulsory requirement for notably loaded production packages to ensure data availability and excessive performance. However, the configuration of a reliable cluster isn't always a trivial undertaking even for experienced developers and device administrators.
For solving this problem, Jelastic introduced out-of-the-field clustering for MariaDB and MySQL to make programs enormously to be had by using default.
The implemented solution provides a set of benefits:
High availability with pre-configured replication options – Master-Slave, Master-Master, Galera, Single- and Multi-Primary Group Replication.
Scalability and autodiscovery – new nodes, delivered in the course of horizontal scaling, are linked to the cluster with all required adjustments being applied automatically.
Efficient load balancing – each cluster is supplemented with ProxySQL nodes for load balancing with the automatic splitting of read/write requests
Automated failover – the database nodes which might be quickly unavailable or have high latency are robotically excluded from the cluster and re-brought once the relationship is restored
All these benefits and advantages may be achieved just in a few clicks within a topology wizard. Explore the steps below to spark off auto-clustering for your MariaDB and MySQL databases in Jelastic PaaS.
Click on NEW ENVIRONMENT at the dashboard and choose MariaDB or MySQL database.
Activate the Auto-Clustering button. As a result, a dropdown with different replication schemes will appear:
MariaDB - Master-Slave, Master-Master, and Galera
MySQL - Master-Slave, Master-Master, Single- or Multi-Primary Group Replication.
Choose the replication type you decide upon and click Create. That’s all! No configurations required, the cluster is prepared to work with.
Entry Point for Connections to MySQL Cluster - hostname and credentials for connecting an application to the database cluster. In Jelastic, every MariaDB/MySQL auto-clustering answer has two ProxySQL nodes in the front of the database cluster.
Tip: To override database credentials generated by Jelastic with custom ones, do the following: 1. Click on Variables button right after you’ve selected a replication Scheme.
2. Then press Add button to provide custom user’s database credentials via two variables DB_USER and DB_PASS as follows:
3. Once custom credentials are specified they’ll be mailed to the user upon cluster successful installation as for access the PHP MyAdmin at Master Node and as Entry Point credentials.
MySQL Orchestrator Panel - credentials to access the Orchestrator panel, intended for convenient cluster management
Use the received credentials to access admin panel of cluster Orchestrator installed on ProxySQL, that provides a possibility to review the cluster topology information: slick visualization of topologies, replication problems if there are any, read/write distribution, state of health check-ups and autodiscovery of newly added DB nodes, etc.
Let’s consider the details about each replication scheme available for databases within Jelastic in order to understand which one is the most suitable for the specific needs and use cases.
Master-slave replication is the most common used topology, that provides a good consistency (i.e. exactly one node to modify data), but no automatic failover upon master failure. A write latency in asynchronous replication is low because the write is recorded locally by the master server before writing to the slave servers. It allows to scale-out the reads, providing the highest performance, since adding more replicas does not affect replication latency. Slaves can be read without impact on the master, providing such obvious advantages as:
- High performance for read requests.
- Database backup can be done with no impact on master instance.
- Analytical requests can load the slave instance only without affecting the master.
- Slave instance can be taken out of the cluster and got back with subsequent master instance data catch-up with no database downtime.
Master-master asynchronous replication operates with two master nodes simultaneously, Compared to the default master-slave solution, it benefits on the balancing of writing load and simpler recovery upon one master node failure.
The group can operate in a single-primary mode, where one group member is issued with read-write permissions (i.e. is configured as primary), while the remaining members are set to read only acting as the hot standby. Herewith, in case of the primary failure, an automatic election will be performed to assign a new one.
Galera cluster is a type of multi-master synchronous replication which is performed at a transaction commit time, by broadcasting transaction write set to all cluster nodes for applying and makes sure the write that was sent to all nodes in the cluster before this write will be actually committed.
A user application can send reads and writes to any node in the cluster, that provides an ability to scale-out read and write transactions. Adding nodes to a cluster is fully automated. Excluding nodes from the cluster is just a matter of removing the unneeded or failed ones. There is no need anymore to implement the bulky logic for separation of reads and writes, the scaling potential can be immediately implemented with no need to change the application logic. Galera offers one of the best protection against data loss and inconsistent databases since there is no delay in replicating data. If one of the cluster nodes fails the user application won't see it, and will continue to serve users using the other nodes that may also be located in other data centers.
EverData, a top Web hosting and data center services company in India, provides a 7-day money-back guarantee on all our services. Our devotion towards client satisfaction is completely proven by our 7 days' money-back policy, which allows our clients to try out their services risk-free and make an informed decision about their web hosting needs.