# canonical/dqlite

Embeddable, replicated and fault-tolerant SQL engine.

Repository: https://github.com/canonical/dqlite
Canonical: https://ross.abutalabs.com/products/dqlite
Homepage: https://dqlite.io
Language: C
License: NOASSERTION
License Family: other
Topics: raft, sqlite, database
Last push: 2026-08-24T07:56:34+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 79, longevity 100
- inputs: {"age_days": 3388, "days_push": 9, "days_rel": 62, "gap_med": 58, "n_releases_24m": 12}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4368, forks 253 (observed 2026-08-28T04:08:46.701099+00:00)

## What it is
dqlite is a C library implementing an embeddable, replicated SQL database engine that extends SQLite across a cluster of machines using the Raft consensus algorithm. It provides high availability with automatic failover through an asynchronous single-threaded design built on libuv and a custom wire protocol optimized for SQLite primitives.

## Use cases
- embed a replicated SQL database in my application with no external database dependency
- add high availability and automatic failover to SQLite
- build a fault-tolerant database for IoT or edge devices
- run a highly-available SQLite cluster across multiple hosts
- store data for a clustered system container manager like LXD
- implement leader election and transactional consensus for a small backend service

## When to choose
- you need SQLite-compatible SQL with built-in replication and failover
- you want an embedded database with a tiny footprint for edge or IoT deployments
- you are building a C or Go application that needs a highly-available local database without running a separate database server
- you need low-latency transactional consensus via Raft

## When to avoid
- you need a database that runs on non-Linux platforms, since dqlite requires Linux native async I/O
- you need heavy multi-writer horizontal scaling across many nodes rather than small-cluster high availability
- you want a client-server database like PostgreSQL or MySQL with a rich ecosystem
- your application is read-heavy and does not need replication

## Facets
- artifact type: library
- maturity: active
- function: database, database-driver, rpc, concurrency
- domain: databases, microservices, iot, developer-tools
- platform: c, embedded, iot
- tags: sqlite, raft, replication, high-availability, embedded-database, edge-computing, libuv, wire-protocol, linux

## Member repositories
- canonical/dqlite (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:46.701099+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:23.777766+00:00, confidence not recorded.
  - readme: https://github.com/canonical/dqlite (fetched 2026-08-28T04:08:46.701099+00:00, sha 7981bfa96f94)
  - homepage: https://dqlite.io (fetched 2026-08-29T09:09:59.246985+00:00, sha f1149930a6c2)
  - site_page: https://canonical.com/maas/docs (fetched 2026-08-29T09:09:59.256052+00:00, sha bc7664ac6338)
  - site_page: https://canonical.com/microstack/docs/single-node (fetched 2026-08-29T09:09:59.257925+00:00, sha e132e9b2be0a)
  - site_page: https://canonical.com/microk8s/docs/getting-started (fetched 2026-08-29T09:09:59.259678+00:00, sha 4cb1ea6f65e4)
  - site_page: https://canonical.com/juju/docs (fetched 2026-08-29T09:09:59.261372+00:00, sha 657a866a1942)
  - site_page: https://canonical.com/dqlite/docs (fetched 2026-08-29T09:09:59.264830+00:00, sha 1efb238fc604)
  - site_page: https://canonical.com/blog/canonical-releases-ubuntu-26-04-lts-resolute-raccoon (fetched 2026-08-29T09:09:59.262935+00:00, sha 61fee91e61d0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
