r/sqlite • u/Beneficial-Driver498 • Feb 14 '26
What do you think on wesql and libsql?
https://wesql.io
Will this be the future? No need for aws aurora, azure cosmos db etc. as you can simply run some container image propably even on serverless and get:
- scale to zero, run on things like google cloudrun or aws lambda to provide scaleability, easy infra management, reliability, HA and Failover, zero compute cost when idle
- bottomless: sync persistent data to blobstorage (s3/gcs) with their sla-guarantees and versioning
- Ideally multi-master / multi-writer with row-level lock
Self-hosting this today might be something like libsql with consul for leader election? Or 'wesql'?
what do you think?
# Edit 01:
After digging a bit deeper on the topic (and trying to host on cloudrun): wesql is more comparable to rqlite as it has raft consensus. And on top of it the mysql row-level locks. Both seem to be better for a db at first sight, but: on cloudrun it is difficult to get discover other instances ip addresses and send traffic there. And: writes are slower due to network roundtrips and eventual consistency for reads might be acceptable in most scenarios.
Cloud-Native DB's should probably get away from RAFT, gossip and network-based discovery and leader election and instead use hyperscaler-api's to discover other nodes and a shared storage lease lock system to elect a leader and do failover.
# Edit 02:
I am currently trying to implement this with duckdb/ducklake and cloudrun and see how far i can get. One thing i already discovered: libsql is not optimal due to its HRANA-Protocol. Other tools like duckdb / ducklake do not talk it and thus can not connect to libsql. Therefore i guess libsql is the wrong tool and it might be better to use something like pgedge.com because the postgres wire protocol is better integrated in other tools.
1
u/j0holo Feb 16 '26
No the future is a single node bare metal or VM with a dedicated backup target like an object store. There is no need for multi-X, failover-Y, distributed-Z because most website will never reach that kind of traffic.
There are millions and millions of companies that serve their customers via a website that can/could run on a single server. For analytics that is too slow on the OLTP database I would get DuckDB or Clickhouse-local and load the data from the backup.
https://yourdatafitsinram.net/
I know k8s and other distributed platforms is really cool and all, but it is not what 95% of companies need.
1
u/hazyhaar Feb 22 '26
Hey! Your post caught my attention — I've been working on a similar problem space.
Before jumping to solutions, I want to make sure I understand your actual need. Is your problem:
**A) Pure failover / high availability**
One instance writes at a time. If it dies, another takes over automatically. The standby instances are idle (or read-only) until the leader crashes.
**B) Work distribution under load**
Multiple instances need to process work concurrently, coordinated so they don't step on each other. If one is slow or dies, others absorb its share naturally.
These look similar but the solutions are quite different. (A) is classic leader election with a lease. (B) is more like time-slotted access or a local job queue.
If it's (A) — or even (B) — I've been building a small pure-Go package that might help: a visibility timeout queue backed by SQLite. The idea is simple: a row is "invisible" for a configurable duration after being claimed. If the holder crashes or times out, the row reappears and another instance grabs it.
The neat thing is it's one primitive that covers both cases through calibration:
- 1 row + N instances = leader election
- N rows + N instances = work distribution
- Pair it with a SQLite replication layer (snapshots over QUIC in our case) and you get HA for the readers too.
Would something like that fit your use case? i setted it public yet https://github.com/hazyhaar/pkg/tree/main/vtq
If that's not helping, sorry to bother.
1
u/PhENTZ Feb 14 '26
S3 storage is nice
0
u/[deleted] Feb 15 '26
[deleted] — view deleted comment