Ask HN: What's the database you use for your simple website?
There are lot of options these days.
Running your own DB (EC2/MySQL/Postgres) vs using hosted one (RDS/Aurora/etc).
I am looking for a simple dynamic website that may have 50 visitors per day max doing simple operation (CRUD)
16 comments
[ 0.25 ms ] story [ 47.1 ms ] threadQuery constraint is the biggest challenge.
Do you host it yourself? What about backup, replication, and availability?
Backup, yes you can just copy the file to back it up, but SQLite documentation has a preferred method that uses its own backup api which is likely safer than a file copy.
Replication, I don’t think there is a way to keep multiple DB’s in sync. You will likely need to move to a client server DB like Postgres if you get to that point.
Availability, only allows one writer at a time, so that’s the biggest issue for performance. The docs say it’s used on websites that get 100k’s or hits a day, but likely not great for workloads that have a high amount of writes. You obviously will be constrained by how fast the servers CPU and I/O is.
The author of SQLite says for blobs of about 20kb or less, it’s faster than reading and writing to the file system due to the overhead of opening a file.
I can totally vouch for SQLite in this case, however.
https://github.com/dimitri/pgloader
My suggestion is script what you need to test to check throughput for the number of concurrent conns you think you'll be needing and base decisions on that. FYI - I use Fossil SCM over git. It is awesome.
https://www.fossil-scm.org/home/doc/trunk/www/index.wiki
MongoDB does the storage. Parse Server handles the tables, structure, communication with the app. Perfect for CRUD. Fast to start, no serious issues with scaling.
Plugging an article I wrote on how to get Parse Server up: https://medium.com/@smuzani/setting-up-a-mobile-backend-serv...
Re: SQLite, I haven't seen many production websites running on it but it's sure possible. Just make sure the place where you store it is reliable.