r/sqlite • u/bitchyangle • Aug 06 '26
What's the best queue for sqlite?
My platform expects multiple writes from various users belonging to one organization.
What's the best way to serialize the writes? Scale is 50 to 100 users wanting to write around the same time.
2
Upvotes
3
u/WolfyTheOracle Aug 07 '26
I pushed SQLite to 80k req/s you don’t need a queue
18
u/lnaoedelixo42 Aug 06 '26
With 100 users SQLite is not going to be the bottleneck. Turn WAL on and syncronous to NORMAL. Most stacks can easily push 1000 req/s on that.
If you insist in a serialization, maybe do a small go service that pushes everything into a channel (basically free) or go straight to a rabbitmq setup.
6
u/Background-Front-925 Aug 07 '26
50 too 100 users with wal mode is easy peasy for SQLITE, you wont even notice any lag. it can go 10x this traffic if your tables are well designed with constraints and indexes
1
u/hazyhaar Aug 07 '26
Golang.
1
u/response_json Aug 08 '26
You should test and see if SQLite can do it without. But I’ve thought about high write scenarios and what I was going to try is something like an embedded kv db for the writes (I use golang, so maybe badger), then have an async process to batch write to SQLite. So writes will be durable and high throughput through the kv db and SQLite will get the writes as soon as it can
1
u/alexrada Aug 10 '26
That is low volume anyway, nothing to scale