rqlite: The Distributed Database Built on Raft and SQLite
summary
rqlite is a single statically linked Go binary that embeds SQLite C and uses HashiCorp Raft to replicate SQL statements over an HTTP API; writes go through Raft and only committed statements are applied to each SQLite instance, reads hit the local DB unless a strong read is requested. Performance tests show about 500 inserts/sec single node, roughly 200 inserts/sec for a 3‑node single‑region cluster, and drops to ~10 inserts/sec for globe‑spanning nodes. It uses statement‑based replication (no distributed transactions), gzip log compression, a heavy test suite (≈10k LOC of tests, unit suite ~4 min), and is usable for small, critical replicated relational data.
AI-written summary · about
chapters (14)
- 0:00Start
- 1:37About me
- 2:24Agenda
- 3:46What is rqlite?
- 11:08Why a distributed system?
- 11:52Why replicate SQLite?
- 12:42It's easy to set the value of a single node
- 12:53What if the value should be replicated?
- 13:19What if the nodes can't communicate?
- 14:17Communication restored
- 14:35What is the solution?
- 15:25Core Raft concepts
- 34:25Unit testing first and foremost
- 53:59Further reading
related talks
39mBuilding Production Applications Using Go
37mBuilding a Cloud-Native SQL Database
01h 11mFearless global transactions with
30mUse SQLite in production
31mSQLite, the World's Most Ubiquitous Yet Little-Known Database
42mThe hows and whys of a distributed SQL database
52mCockroachDB
24mgives databases to everyone
