Hacker News new | ask | show | jobs
by hruk 530 days ago
I use SQLite for this sort of thing (small e-commerce storefront, wife's niche popular blog, etc.). Actually, I use multiple - one for the DB and Diskcache for the cache.

Caching is cheap, backup is trivial and cheap, and pulling down a perfect snapshot of production when I need to fiddle with something is also trivial and cheap.

1 comments

Thank you very much for your reply.

Do you use things like Turso too ? How much do you handle with your personal stuff ? Was it hard to manage at first ? Is there any footgun to dodge there ?

SQLite seems awesome and also .. not enough for the long run ? But I don't know much TBH.

Nah, just SQLite. I had to learn a number of things about good SQLite defaults and habits, but that was years back before it really started to take off in this space. Now, there are tons of blogs you can refer to giving reasonable advice.

The highest-traffic site I run off of SQLite gets roughly 1 million hits per day. I run it on a VPS with 2vCPU and 4 GB RAM and it hovers around ~8% CPU utilization and 12% memory usage during peak hours. Last I checked, the database is handling about ~80 queries per second during peak usage, and clearly there's a ton of headroom.

If the site got 10x as much traffic, maybe I'd double the instance size. If it 100xed, maybe I'd need to upgrade from storing the DB on an EBS volume to storing it on a NVME drive. If it 1000xed... maybe I'd have problems? That seems like a pretty long way away, and in the meantime I get super simple deployment, replication, disaster recovery, and an easy route to pull down snapshots for debugging, etc.

It's impressive and interesting, I guess in terms of performance, it's quite big, 80 qps feels quite huge!!

For such thing of mine, it's more than enough I guess.

Would it be a bad idea to use multiple sqlite files, isolating things per domains? Feels like something possible and interesting?