Yes for sniprss.com. Backend is written in Go and using litestream for replication. No issues at all.
Ask HN: Have you used SQLite as a primary database?
151–160 of 330 posts
Re: Ask HN: Have you used SQLite as a primary database?
#152But I've run into on prod that didn't exist in dev on my MacBook M1, and I'm curious if anyone has any suggestions:
My app is basically quiet and serves requests in the dozens (super easy to run on a tiny instance), but for a few hours a day it needs to run several million database transactions, N+1 queries, etc. Because of the high number of IOPS needed, a small instance falls down and runs suuuuuper sluggishly, so I've found myself needing to shut everything down, resize the instance to something with more CPUs, memory, and IOPS ($$$), doing the big batch, then scaling down again. That whole dance is a pain.
Were I using a more traditional postgres setup, I'd probably architect this differently -- the day-to-day stuff I'd run on Cloud Run and I'd spin up a separate beefy instance just for the daily batch job rather than resizing one instance up and down over and over again. The constraint here is that I have a 50GB+ sqlite db file that basically lives on local SSD.
Any thoughts?
Re: Ask HN: Have you used SQLite as a primary database?
#153It is so convenient to have it as a file, especially when you are just learning to do software development.
And the performance has not been an issue once.
One thing to note is that my site is not Facebook size. It only gets ~40 page views a day. And most of them are just for viewing, so no database opertaions.
So, I'm not going to be the most credible voice here. FWIW, I know that Pieter Levels, who runs multiple projects like nomadlist, remoteok, rebase, uses both SQLite and plain JSON files for storage.
Re: Ask HN: Have you used SQLite as a primary database?
#154With C# (Entity Framework) I've tried and failed using sqlite in a production scenario because of concurrency issues... Recently I stumbled over a potential fix[1], which I will try in my next project. [1] https://ja.nsommer.dk/articles/thread-safe-async-sqlite3-ent...
Ouch, that sounds like a nasty bug. But if I understand correctly it's more the driver/ORM's problem than sqlite's? One to look out/test for early if I go in this direction though. Thanks for the heads up!
I think so. sqlite is pretty reliable in my opinion and I never hat these issues anywhere else, but this bug made me switch my DMBS for a small side project from sqlite to postgres.
> One to look out/test for early if I go in this direction though.
You're welcome!
Re: Ask HN: Have you used SQLite as a primary database?
#155I maintain an 'older' codebase (2012) and am rebuilding it to a new version, but both use SQLite. It's a configuration management web application installed onto either bare metal or virtual machines. Generally only a handful of simultaneous users; I want to say performance isn't much of an issue or concern, but I've had to fix a bug that was caused by too many writes to the database where the system ran into IOPS lim…
Re: Ask HN: Have you used SQLite as a primary database?
#156Re: Ask HN: Have you used SQLite as a primary database?
#157I'm using SQLite as the primary database for PlotPanel [1]! It's going great with no unpleasant surprises along the way. [1] https://plotpanel.com
Re: Ask HN: Have you used SQLite as a primary database?
#158Sqlite is one of the greatest open source projects in history, with awesome docs, and really is a tribute to the art of programming. I'm happy and honored to use it for the appropriate use cases (which are a lot more than one would think).
Re: Ask HN: Have you used SQLite as a primary database?
#159Many of the replies here attest to the simplicity and fast performance of SQLite particularly for serving pages or data. But how well does SQLite fare in concurrent write/insert situations? Although SQLite is not designed for this type of scenario, this discussion higlights there's a strong demand for a concurrent client/server RDMS that is simple, performant and easy to deploy. PostgreSQL is powerful and feature-ric…
Does your forum accept more than 1,000 writes per second? If not, SQLite should be fine.
Re: Ask HN: Have you used SQLite as a primary database?
#160Earlier quoted context omitted.
What is the point of using SQLite under a web service? I thought people complained how MySQL sucks and PostgreSQL rocks for being right and SQLite was nowhere near being right or performant. (Things seem to be getting better with strict column types these days.) I've recently migrated a smallish service from MySQL to PostgreSQL and figured it's quite a work if you're not careful writing by the SQL standard which mean…
> So, why not use a safer choice to begin with? I know several people who build projects like that. It take them months to get a working product, just to discover it doesn't interest people or doesn't work like they expected. If for every piece of tooling you go for the "safe" and most performant one you gain bloat and complexity real quick. People underestimate "simple" tech performance, in 99% of projects by the ti…