Introduction to the ClearDB Platform
This article dives into how the ClearDB platform works, what topologies it uses, and how it keeps your database online and available with our advanced auto-failover technology
ClearDB: Interesting Name… What Is It?
ClearDB is a cloud, hybrid, and on-premise database-as-a-service for MySQL powered applications. It stores and manages your MySQL database for you so that you don’t have to deal with things like database servers, replication, advanced storage, IT support, and especially things like database failures. ClearDB is designed around the idea that systems, networks, and storage fails from time to time, which under ordinary circumstances can leave your database offline while your IT department scrambles out of bed to figure out what happened. ClearDB solves this problem by running a geo-separated, mirrored database cluster utilizing a combination of MySQL master-master replication technology as well as our own custom SQL routing technology which detects failures and automatically re-routes connections to the servers which are still online. Once the system(s) that failed are back online and are back in sync, our routing technology will automatically switch back to the newly recovered server instance so that you get the lowest latency and highest performance.
ClearDB Shared Cloud Database Services
ClearDB offers shared MySQL services for our PaaS partners, such as Heroku, Azure, BlueMix, Pivotal and AppFog. Our shared services enable users of these PaaS partners to easily create and connect to a ClearDB database without having to pay for enterprise class services when they may not yet be ready to take that step.
In order to ensure a high quality experience for all of our shared database customers, we utilize quality of service policies (or resource boxing) such as:
- Connection limits
- Maximum database sizes
- Maximum queries per hour
- Maximum query execution time limits
These resource limits ensure that each class of service (or “plan”) receives what they have paid for on our systems. As a general rule, our shared database customers experience very high throughput and execution speed on their database due to the server instance sizes we use as well as the way in which our MySQL instances are tuned.
ClearDB Dedicated Cloud Database Services
For customers who need more resources than what is offered in our shared database service plans, we offer our dedicated cluster services. With our dedicated clusters, there are no quality of service policies that are enforced beyond what the actual server instances they operate run on, as the customer is the only tenant on the entire cluster. Each dedicated cluster can support up to 600 connections.
ClearDB Dedicated Hybrid Cluster Services
Customers who wish to operate database configurations that also require one or more on-premise instances can utilize our dedicated hybrid clusters. These cluster configurations are custom-built to provide an exact-fit for your needs, whether they be multi-cloud (or cloud spanning), datacenter support, on-premise master or slave support, and more. Contact us if you’re interested in using our Hybrid Cluster services for your organization.
How We Use MySQL Master-Master Replication
What we do with master-master replication is no secret: it’s a non-standard approach to replication in MySQL, but at the same time it provides us with the ability to dynamically re-route traffic in the event of a failure, all without having to worry about things like master elections, whether or not to log slave updates, etc. However, that’s not to say that there are no quirks with using master-master replication on MySQL. For instance, one quirk that is non-standard is the way auto_increment (or sequences) work in this topology. For example, each master node must have its own offset value in order to prevent cases in which one master can overwrite the same auto_increment value as the other, as this would break replication. What’s particularly interesting about this fact is that it’s the only thing that’s unusual from the user perspective about how our MySQL clusters operate.
What Happens When A Master Node Fails?
Systems can and do fail, especially in the cloud. The way we handle these inevitable events is to utilize our proprietary SQL routing technology, which can redirect your connections mid-stream to the alternate master server instance when this happens. At the same time, our core systems automatically begin the process of diagnosing what’s going on with the failed node, and will attempt to revive it, if possible. If it’s not possible to be automatically revived, our support team is notified and will take action to revive or replace the failed node. During this time, our SQL routing technology will ensure that you are connected to the operating node, and will only reconnect you to the failed node once it has been restored and has resynchronized.
Can Data Be Lost If A Master Node Fails?
Under ordinary circumstances, the answer would be: it depends. In our case, we use a combination of highly durable storage along with cloud server instances, which greatly reduces the chances that data will be lost, even if a server instance fails.
If (and when) a server instance fails, we can re-attach the durable storage to a new server instance and restore services. Once the cluster becomes aware of the newly revived master node, it will re-synchronize. Only after the new master node has synchronized to be 1:1 or within an acceptable pre-determined delay tolerance ratio will our SQL routing technology recognize the new server instance as a valid master node and begin routing SQL connections to it. This ensures that your database “view of the world” is consistent at all times.
Our 100% Uptime SLA Means We Mean Business
We designed our service for mission-critical applications and services, with the idea that customers should not suffer from any downtime due to the cloud or how our service works. We back that idea by providing you with a 100% Uptime SLA guarantee. See our SLA policy for more details.
SSL Everywhere Security And Encryption
All intra-connected links between nodes in ClearDB are encrypted to keep the bad guys out. We also use 100% encrypted backups to ensure that your data is safe while it’s outside the database, no matter what. You can also encrypt your connections to ClearDB using full X.509 encryption on top of account authentication using our auto-generated SSL certificates, available directly from your account dashboard.
ClearDB provides your business with enhanced reliability and scalability through geo-separated high-availability and failover support. ClearDB is the only MySQL database-as-a-service that keeps your data secure whether it’s on the wire or on the disk all the time so that you can rest easy, knowing that your data is protected. Combined with our affordable price range for our shared, dedicated, hybrid, and on-premise database packages, 24/7 support, and free bandwidth, you save money by using ClearDB!