You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3.7 KiB
3.7 KiB
rqlite
You can find details on the design and implementation of rqlite from these blog posts.
The design and implementation of rqlite was also discussed at the GoSF April 2016 Meetup. You can find the slides here.
Node design
The diagram below shows a high-level view of a rqlite node.
┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┌ ─ ─ ─ ─ ┐
Clients Other
└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ Nodes │
│ ─ ─ ─ ─ ─
│ ▲
│ │
│ │
▼ ▼
┌─────────────────────────────┐ ┌─────────────────────────────────────┐
│ HTTP(S) │ │ TCP │
└─────────────────────────────┘ └─────────────────────────────────────┘
┌───────────────────────────────────────────────┐┌────────────────────┐
│ Raft (hashicorp/raft) ││ Internode meta │
└───────────────────────────────────────────────┘└────────────────────┘
┌───────────────────────────────────────────────┐
│ matt-n/go-sqlite3 │
└───────────────────────────────────────────────┘
┌───────────────────────────────────────────────┐
│ sqlite3.c │
└───────────────────────────────────────────────┘
┌───────────────────────────────────────────────┐
│ RAM or disk │
└───────────────────────────────────────────────┘
Log Compaction
rqlite automatically performs log compaction, so that disk usage due to the log remains bounded. After a configurable number of changes rqlite snapshots the SQLite database, and truncates the Raft log. This is a technical feature of the Raft consensus system, and most users of rqlite need not be concerned with this.