High-availability SQLite

Dqlite is a fast, embedded, persistent SQL database with Raft consensus that is perfect for fault-tolerant IoT and Edge devices.

Getting started

Dqlite (distributed SQLite) extends SQLite across a cluster of machines, with automatic failover and high-availability to keep your application running. It uses C-Raft, an optimised Raft implementation in C, to gain high-performance transactional consensus and fault tolerance while preserving SQlite’s outstanding efficiency and tiny footprint.

install on Ubuntu (bleeding edge):

sudo add-apt-repository -y ppa:dqlite/dev && sudo apt install dqlite-tools

Key features

  • Fully asynchronous network and disk I/O
  • Comprehensive test suite for correctness
  • Benchmarked for memory footprint and network efficiency
  • Persistent storage to disk for transaction logs
  • Fast recovery for system restore
  • Stable Golang client and a documented wire protocol for other languages
  • Runs on ARM, X86, POWER and IBM Z architectures

Why use Dqlite

  • Ultra-low latency

    C-Raft is tuned to minimize transaction latency.

  • Portable

    C-Raft and dqlite are both written in C for maximum cross-platform portability.

  • Open Source

    Published under the LGPLv3 license with a static linking exception for maximum compatibility.

  • Usability

    Includes common CLI pattern for database initialization and voting member joins and departures.

  • Fast failover

    Minimal, tunable delay for failover with automatic leader election.

  • Persistence

    Disk-backed database with in-memory options and SQLite transactions.

Enterprise-grade SQL database for the Edge and IoT

Modern edge computing moves high-value applications to the edge of the network with fewer guarantees about hardware availability and management. Appliances in the cabinet or remote locations cannot be monitored, managed, or replaced very quickly, and cannot assume strict environmental controls. That makes the hardware less reliable and increases the cost of human intervention.

Dqlite provides edge applications with an ultra-fast SQL database that is automatically replicated across multiple hosts and guarantees fast failover. SQLite is the world’s most widely used embedded SQL implementation. Dqlite extends SQLite with robust Raft consensus and failover semantics.

Why Raft?

Consensus algorithms provide certainty of transaction replication. It ensures data persistence in the event of the loss of one or more machines in the cluster, as long as a majority survives. Raft is widely considered the consensus algorithm of choice for efficiency and correctness of implementation. C-Raft is a hand-tuned C implementation of Raft that is fully asynchronous by design.