ClearDB is a distributed, cloud-hosted, database-as-a-service version of MySQL. Its primary purpose is to eliminate the management cost of MySQL databases and provide automatic database replication and failover. To increase robustness, ClearDB adds software stacks on top of MySQL and leveraging geo-separated data clusters. ClearDB supports major commercial cloud which includes Amazon EC2 and Windows Azure and also support customized data centers or a hybrid of the two.[04][05]
- Website
- http://www.cleardb.com[01]
- Tech Docs
- http://w2.cleardb.net/developers[02]
- Developer
- Country of Origin
- US
- Start Year
- 2010 [30]
- Project Type
- Commercial
- Written in
- C++
- Derived From
- MySQL
- Embeds / Uses
- MySQL
- License
- Proprietary
ClearDB is a distributed, cloud-hosted, database-as-a-service version of MySQL. Its primary purpose is to eliminate the management cost of MySQL databases and provide automatic database replication and failover. To increase robustness, ClearDB adds software stacks on top of MySQL and leveraging geo-separated data clusters. ClearDB supports major commercial cloud which includes Amazon EC2 and Windows Azure and also support customized data centers or a hybrid of the two.[04][05]
History[06][07]
ClearDB was founded by Cashton Coleman in 2010 as a pioneer of MySQL DBaaS aimed to eliminate the pain of managing MySQL clusters and free developers from supporting database issues. According to RDX, ClearDB was the world's largest MySQL DBaaS provider. In 2019, ClearDb was acquired by RDX.
Checkpoints[08][09]
Same as MySQL
It uses both Fuzzy and Sharp checkpoint. It takes a sharp checkpoint when the database is performing shut down and uses fuzzy checkpoint during normal database operations. When taking a sharp checkpoint, the database flushes all dirty pages of committed transactions to disk and update the MasterRecord to be the lastest committed LSN. Checkpoint behaves the same way as MySQL and is not modified by ClearDB
Compression[10][11][12]
Same as MySQL
InnoDB supports multiple compression algorithms which include Zlib and LZ4. When writing a page to disk, data were first compressed and then written to disk. Then empty blocks will be released by hole punching mechanism, where the system reclaims unnecessary blocks at the end of the page. ClearDB's doesn't change compression from MySQL.
Concurrency Control[13][14]
Same as MySQL
ClearDB doesn't change concurrency control from MySQL. MySQL uses a combination of Multiversion Concurrency Control (MVCC) and row-level locking to achieve better concurrency. Old versions of rows are stored in a rollback segment which could later be used to rollback changes. Rollback segments are partitioned into the insert and update undo logs for different types of rollbacks.
Data Model[15]
Same as MySQL
ClearDB's underlying MySql database uses a relational data model that is not modified by ClearDB.
Indexes[17]
Same as MySQL
MySQL support multiple types of indexes. Most MySQL tables stored on disks use B-trees. Spatial data uses R-tree for indexes. MySQL also uses hash indexes for memory tables. ClearDB doesn't modify the behavior of indexes from MySQL.
Joins[18][19][20]
Same as MySQL
ClearDB's change from MySQL doesn't involve Join. MySQL employs both nested loop join as well as hash join algorithms. Nested loop joins are used by default and hash join was used when the join has an equi-join condition and no indexes were used. Block nested loop, as well as Batched Key Access Joins, are used to improve join performance.
Logging[04][21]
To ensure data durability, ClearDB leverages durable storage as well as MySQL transaction log.
Query Execution[22]
Same as MySQL
MySQL follows an iterative processing mode and subqueries are optimized with materialization by storing subquery result in a temporary table. Query execution is not affected by ClearDB's change.
Query Interface[23]
Same as MySQL
ClearDB doesn't change the query interface of the underlying MySQL. MySQL natively supports SQL and stored procedures for query executions.
Storage Architecture[24][04]
Same as MySQL
On a higher level, ClearDB uses cloud-based durable storage. On a lower level, ClearDB MySQL uses InnoDB as the default storage engine and supports multiple other storage engines: MyISAM, Memory (Heap Engine), Merge, Archive, Federated, and NDB.
Storage Model[25][26]
Same as MySQL
InnoDB uses a row storage structure that supports 4 row formats: Redundant, Compact, Dynamic, Compressed. It is not affected by the change from MySQL to ClearDB.
System Architecture[27][28][29]
ClearDB is a cloud-based database-as-a-service version of MySQL. It wraps multiple software stacks around MySQL 5.5 and runs multiple geo-separated database clusters to reduce the chance of total database failures. It uses shared-nothing architecture, master-master replication, and proprietary routing technology to achieve automatically handle failed nodes. Database replications are done in an asynchronous manner and are realtime. In the event of failure, the SQL routing algorithm will automatically redirect the query to the secondary master and bring the master back when the node recovers.
ClearDB performs daily backup where the backups are compressed and encrypted and will be replicated to master nodes.
ClearDB leveraged a secure configuration from MySQL, and SSL was used for network security .
Citations
31 sources- http://www.cleardb.com cleardb.com
- http://w2.cleardb.net/developers cleardb.net
- https://twitter.com/ClearDB twitter.com
- https://w2.cleardb.net/faqs cleardb.net
- https://www.cleardb.com/developers/platform/overview cleardb.com
- https://www.rdx.com/company/press-release/rdx-continues-strategic-expansion-cleardb-acquisition rdx.com
- https://www.linkedin.com/in/cashtoncoleman linkedin.com
- https://www.xaprb.com/blog/2011/01/29/how-innodb-performs-a-checkpoint xaprb.com
- Transaction Processing: Concepts and Techniques - Jim Gray, Andreas Reuter - Google Books google.com
- https://lwn.net/Articles/415889 lwn.net
- https://dev.mysql.com/doc/refman/8.0/en/innodb-table-compression.html mysql.com
- https://dev.mysql.com/doc/refman/8.0/en/innodb-page-compression.html mysql.com
- https://dev.mysql.com/doc/refman/8.0/en/innodb-multi-versioning.html mysql.com
- 1. MySQL Architecture - High Performance MySQL, 2nd Edition [Book] oreilly.com
- MySQL - Wikipedia wikipedia.org
- https://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html mysql.com
- https://dev.mysql.com/doc/refman/8.0/en/mysql-indexes.html mysql.com
- https://dev.mysql.com/doc/refman/8.0/en/hash-joins.html mysql.com
- https://dev.mysql.com/doc/refman/5.7/en/nested-loop-joins.html mysql.com
- https://dev.mysql.com/doc/refman/8.0/en/bnl-bka-optimization.html mysql.com
- https://dev.mysql.com/doc/refman/5.7/en/server-logs.html mysql.com
- https://dev.mysql.com/doc/refman/8.0/en/subquery-materialization.html mysql.com
- https://dev.mysql.com/doc/refman/8.0/en/sql-statements.html mysql.com
- https://dev.mysql.com/doc/refman/5.5/en/storage-engines.html mysql.com
- https://dev.mysql.com/doc/refman/5.7/en/innodb-introduction.html mysql.com
- https://dev.mysql.com/doc/refman/5.7/en/innodb-row-format.html mysql.com
- Welcome to ClearDB s81c.com
- https://w2.cleardb.net/faqs#general_0 cleardb.net
- https://w2.cleardb.net/developers/resources/introduction-to-the-cleardb-platform cleardb.net
- http://w2.cleardb.net/about-page cleardb.net
- RDX Continues Strategic Expansion with ClearDB Acquisition prnewswire.com