Ask HN: Have you used SQLite as a primary database?
518 pointsI 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
Earlier commentsWith a lot of help from https://www.sqlite.org/appfileformat.html
It has had some pains but it has been great rather then flat file storage.
It's also powering another one and I really like the fact that I can just commit the whole DB to the GIT repo.
I've never (deliberately) considered committing a DB to git. Although there was that one time when I was straight out of college...
Pro tip: surprising your colleagues in the morning with a 40 minute wait to pull master (because you committed a ???GB db) is a good way to feel like a right eegit.
For backup, I have a small bash script that creates a git commit and pushes it to the github.
Except for some rare exceptions, it's been doing pretty great. I don't have any plans to migrate from SQLite any time soon.
Also they're where the real insights are.
By default, the connection pool in Rails contains 5 connections, and they time out within 5 seconds.
Also, take a look at ws4sqlite (https://germ.gitbook.io/ws4sqlite/) for a middle ground between SQLite (embedded) and rqlite/dqlite: it's "normal" sqlite addressable via web services. May be useful in some scenarios.
All comments shown.
Couldn't load more comments. Check your connection and try again.