dqlite

Embeddable, replicated and fault-tolerant SQL engine.

What is dqlite?

Embeddable, replicated and fault-tolerant SQL engine.

Overview of dqlite

What it is

dqlite is a C library that implements an embeddable and replicated SQL database engine with high availability and automatic failover. The acronym stands for 'distributed SQLite'. It extends SQLite with a network protocol that connects instances of an application into a highly-available cluster, without dependency on external databases. The implementation is asynchronous and single-threaded using libuv as the event loop. It uses a custom wire protocol optimized for SQLite primitives and data types, and data replication based on the Raft algorithm. dqlite runs on Linux and requires a kernel with support for native async I/O.

Key features

  • Embeddable SQL database engine with replication and fault tolerance.
  • High availability and automatic failover.
  • Asynchronous single-threaded implementation using libuv.
  • Custom wire protocol optimized for SQLite primitives and data types.
  • Data replication based on the Raft algorithm.
  • Supports static linking with dependencies (using --with-static-deps).
  • Environment variable LIBDQLITE_TRACE for tracing levels 0 to 5.

Use cases

dqlite is suitable for applications that need an embedded SQL database with built-in replication and high availability, without relying on an external database server. It can be used to build distributed systems where multiple instances of an application form a cluster and maintain consistent state. Examples include edge computing, IoT, and other scenarios where a lightweight, self-contained database is required.

Getting started

On Debian-based systems, install the development release from the dqlite PPA: sudo add-apt-repository ppa:dqlite/dev sudo apt update sudo apt install libdqlite-dev To inspect a running instance, install dqlite-utils via snap: sudo snap install dqlite-utils --classic For building from source, see the repository README for dependencies and build instructions.

License and pricing

dqlite is open source, released under a slightly modified version of LGPLv3 that includes a copyright exception allowing users to statically link the library code in their project and release the final work under their own terms. No pricing information is provided.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/canonicaldqlite.svg)](https://yunodb.com/tools/canonicaldqlite?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/canonicaldqlite?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/canonicaldqlite.svg" alt="Featured on YunoDB" height="20"></a>