is presented Release distributed DBMS RQLite 6.0 , which uses SQLite as a storage engine and allows you to organize a cluster from synchronized vaults. Of the features of RQLite, there is simplicity of installation, deploying and maintaining a distributed fault tolerant storage, something similar to ETCD and Consul , but using a relational model of work With data instead of key / value format. The project code is written in the GO language and distributed under the MIT license.
to maintain all nodes in the synchronized state used Algorithm for achieving consensus RAFT . RQLite uses the original SQLite library and the standard driver go-sqlite3 , on top of which the layer starts processing customer requests that perform replication to other nodes and tracking consensus on the selection of the leading node.
Changes in the database can only be entered by a node that is selected as a leading, but connections with recording operations can be sent to other cluster nodes that return the leader’s address to repeat the request (in the next version they promise to add an automatic conversion to the leader). The main emphasis is placed on failover, therefore the DBMS is scaled only on read operations, and write operations are a bottleneck. It is possible to start the RQLite cluster from one node and such a solution can be used to arrange access to SQLite over HTTP without providing fault tolerance.
SQLite data on each node is not stored in the file, but in memory. At the layer level with the implementation of the RAFT protocol, the log of all SQLite commands leading to the database change are carried out. This log is used when replication (replication at the level of requests for requests on other nodes), start a new node or recovery after loss of connectedness. To reduce the log size, an automatic packaging is used, which runs after a specified number of changes and leads to fixation on the snap disk, relative to which a new log begins (the state of the database in memory is identical to the snapshot + accumulated change log).
Features RQLite:
- Easy to deploy the cluster, without the need for a separate installation SQLite.
- Ability to quickly get a replicated SQL storage.
- Readiness for use in work projects (Production-Grade).
- Availability http (s) API , allowing you to update data in batch mode and determine The leading cluster node. The command line interface and the ability to use various client libraries created for SQLite is also provided.
- availability of a service to determine other nodes to create clusters dynamically.
- Support encryption