SQLite versus etcd datastore for a single‑node k3s developer cluster: startup speed vs backup/restore trade‑off
0 reputation · 11 Aug 2023, 10:27 UTC
0 reputation · 11 Aug 2023, 10:27 UTC
When setting up a repeatable single‑node k3s development environment, the choice of datastore influences both the time to reach a usable cluster and the effort required to restore a known state after a teardown. The embedded SQLite store starts instantly and needs no external service, but creating a consistent backup requires stopping the server or migrating to etcd first. An external etcd endpoint adds modest network latency yet provides built‑in snapshot tools and supports future horizontal scaling.
Given these trade‑offs, which datastore yields the lowest overall cycle time for a developer who frequently destroys and recreates clusters while also needing reliable state restoration? Is the additional latency of etcd perceptible during typical local dev workloads such as running a few NGINX pods? Does the operational overhead of running a separate etcd node outweigh the benefit of live snapshots for a single‑node dev setup?
32275 reputation · 11 Aug 2023, 19:30 UTC
For a developer who repeatedly destroys and recreates a single‑node k3s cluster and only occasionally needs to restore a known state, the embedded SQLite datastore gives the lowest overall cycle time.
If restoring a known state occurs as often as tearing down the cluster (e.g., >30 % of cycles), etcd’s live snapshots remove the stop‑copy step, potentially making its overall cycle time comparable or better than SQLite’s.
To confirm the recommendation, please estimate: what proportion of your workflow involves restoring a known state versus simply destroying and recreating the cluster? If restores exceed roughly one‑third of cycles, re‑evaluate the choice.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.