Recently the release of the distributed DBMS rqlite 7.0 was announced, in which this new version presents a new node discovery integration with Consul and etcd. Using one of those systems with rqlite makes rqlite’s automatic clustering much easier, plus legacy Discovery mode is not supported in version 7.0, but may be in a future release.
For those who are unaware of rqlite, they should know that this one that uses SQLite as a storage engine and allows organizing the operation of a cluster from storages synchronized with each other.
Of the characteristics of rqlite, it stands out that distributed fault-tolerant storage is easy to install, deploy, and maintain, somewhat similar to etcd and Consul , but using a relational data model instead of a key/value format.
Raft’s consensus algorithm is used to keep all nodes in sync. Rqlite uses the original SQLite library and the go-sqlite3 driver, in addition to which it runs a layer that processes requests from clients, performs replication to other nodes, and monitors consensus on the election of the leader node.
Database changes can only be made by the node that is selected as the leaderbut write connections can be directed to other nodes in the cluster, which will return the leader’s address to repeat the request.
The main emphasis is on fault tolerance so DBMS scales only on reads and writes are the bottleneck. It is possible to run an rqlite cluster from a single node and such a solution can be used to provide access to SQLite over HTTP without providing fault tolerance.
SQLite data on each node is not stored in a file, but in memory. At the layer level with the Raft protocol implementation, a log is kept of all SQLite commands that lead to a database change.
This log is used for replication (replay-level replication to other nodes), when starting a new node, or to recover from a loss of connectivity. To reduce the size of the log, automatic packing is usedwhich starts after a specified number of changes and leads to the commit of a snapshot, in connection with which a new record is started (database state in memory is identical to snapshot + changelog accumulated).
Main novelties of rqlite 7.0
In this new version that is presented we can find that support for rqlite automatic clustering was added using a new node discovery service that can run on Consul’s distributed storage and etcd. As such the service allows rqlite nodes to be found automatically: the administrator only needs to run multiple nodes on different servers by specifying the common address of the Consul or etcd cluster (for example, “example.com:8500”), and the nodes will be automatically grouped together. .
The leader node periodically updates its address information in Consul or etcd storage, allowing you to change the leader in the future without reconfiguring the remaining nodes, and to add new nodes even after the leader has changed.
Another notable change is that discontinued support for old Discovery mode service powered by AWS Lambda.
In addition to it in the CLI interface, it is allowed to specify multiple hosts at once: if the first node is not available, the following hosts will be contacted.
It is also noted that the redesigned code to parse rqlited command line arguments and that the deprecated protobuf package has been deprecated.
While the BoltDB storage used in the Raft protocol implementation has been superseded by bbolt, a fork of the etcd project.
Finally if you are interested in learning more about ityou can check the details in the following link.