by nerdywordy · 8y ago · 0 comments
- Not very willing to setup DBs for several projects both paid and hobby because it's a fixed time sink. And before anybody tells me "but with this script it can take 2 minutes!" please don't forget that to learn to use your magical script I have to learn a few other things beforehand. (Although admittedly that's most likely a small time investment.)
The more "best practices" I can automate the better since it reduces cognitive load on my poor noggin.
I seriously can't be bothered to setup yet another cool and young database promising me quantum entanglement teleportation anymore. It's what is stopping me from trying 99.9% of what I see on the net.
I have a few scripts to which I just pass a DB name / user / pass and it brings me up (or tears down) a Postgres or MySQL/Maria database. I'd do the same for Elastic and a few others if I wasn't so lazy about it for years now.
Generally speaking, any site that gets fewer than 100K
hits/day should work fine with SQLite. The 100K hits/day
figure is a conservative estimate, not a hard upper bound.
SQLite has been demonstrated to work with 10 times that
amount of traffic.
If SQLite is able to comfortably handle 100k hits/day, I imagine that more "legitimate" databases can handle more traffic comfortably without needing to jump to scale horizontally.[1] https://www.sqlite.org/whentouse.html under "Websites" section
Notably, the SQLite website is (as far as I can see) read-only. So it's great if all you need is a SQL read API atop your structured data (and 100k hits/day is probably only limited by the filesystem/os since SQLite isn't a server). But you're setting yourself up for headaches by using SQLite if you need simultaneous read/writes combined with HA.
I think some cloud stuff is overpriced, but RDS easily pays for itself in my case.
The SQLite website (https://www.sqlite.org/) uses SQLite
itself, of course, and as of this writing (2015) it handles
about 400K to 500K HTTP requests per day, about 15-20% of
which are dynamic pages touching the database. Dynamic
content uses about 200 SQL statements per webpage. This
setup runs on a single VM that shares a physical server
with 23 others and yet still keeps the load average below
0.1 most of the time.That said, I think it's more meant to be an anecdotal rule of thumb to tell people "you're not Google, SQLite will work for most teams".
It really depends. Also, configuring everything right gets hard. Most don't even think to do RAID over a few block storage devices, but that's something that comes with cloud storage. That doesn't count HA and other issues before getting to the application layer.
It's something that unless you're paying a full-time DBA, you are probably better off buying as a service. It's one of the few holes in DO's offerings and I'm very happy to see this.
Really asking, bc for next personal projects I was getting ready to abandon DO and use AWS Lightsail + RDS.
For a DO only solution, I'd probably use SQL more and then rely on their blob (s3 compatible) storage for some bits. I have a few small projects that I've been getting anxious to finally work on, and don't want to spend a bunch of money on them in the interim.
In case of modest growth, I also don't want to be hamstrung doing DB operations work for something that isn't actually making me money... I'll split things up to save a bit in the nearer term so long as I can have a migration path.
If I did split with data in azure/aws and the apps in DO, I might go all azure later, or I might go all DO and take on the DB operations side... it depends on if/how things grow.
In production, all of a sudden you have a lot of work to do, especially around HA. Figure out replication, get it working, figure out how to monitor/alert if it stops working, figure out failover, figure out how to test that failover actually works, etc.
Support around that stuff has improved over the years, but it's still non-trivial and high-risk to DIY. It's a very different scenario than a stateless app server where you can have easy redundancy.
Just give me a database to connect to and take my money, please.
If we had staff to dedicate directly to this then it wouldn't be an issue. But paying for a managed service that gives us production grade data access is a no-brainer for any non-trivial application we build.
I'm happy to pay a few dollars a month for someone else to automate.
I prefer the managed services. Save for the high availability you get tons of best security practices -- all for a few bucks a month. It's usually a such a crazy cheap deal it's almost not fair to them.
For hobby projects, a single self-managed instance is fine. For production in a business critical environment, much more thought needs to go in.