Lurker News
I periodically hear about projects that use/have used sqlite as their sole datastore. The theory seems to be is that you can test out an idea with fewer dependencies (and cost) and that it scales surprisingly far.

There are even distributed versions being built for reliability in the cloud: dqlite by canonical (of Ubuntu fame) and rqlite
Given the complexity it seems like there are use cases or needs here that I'm not seeing and I'd be very interested to know more from those who've tried.
Have you tried this? Did it go well? Or blow up? Were there big surprises along the way?
- https://sqlite.org - https://dqlite.io - https://github.com/rqlite/rqlite

Comments (325) 124 threads

Show all comments

Showing thread 10 of 124

pieterhg4 replies#
Yes for all my sites: Nomad List, Remote OK, Hoodmaps, Rebase etc. No real issues at all.
el_dev_hell1 reply#
Awesome to hear!

How do you handle this? Do you store the SQLite file somewhere like s3 or just in memory?
How does this work for such high traffic sites?

pieterhg#
No in the filesystem on a VPS. All my sites just run on a VPS. Nothing fancy!
levelSEOfan#
glad to see pieter here, I am keeping an eye on rebase ;)
WA2 replies#
I read in one of your Tweets that you use one database file per (unrelated) table to avoid corruption. Why did you move to this model? Are multiple tables per file really more easy to corrupt?
barryhennessy#
I'd be interested to know what kind of corruption you were facing.
pieterhg#
Yes! It kinda happened because I had no idea how SQLite worked so I thought this was normal.

Then I thought this is great and makes it easier to move the db file if it just has 1 table. So I can download it easily for local dev for ex.
And yes in case there's corruption which never rly happens, only one file thus table would be affected.
PS: one thing that really helped reduce issues was setting PRAGMA MODE to WAL