News for hackers. Stuff that matters.
Re:Ask HN: Do you self-host your database? by reacharavindh on Tuesday June 29, 2021 @05:15AM (#27673571)
As with most things in infrastructure, it is a tradeoff to be considered properly.

A startup, where you'd rather have your engineers working on adding features to your product instead of "managing and operating" a database? Have a lot of money to throw at this problem, being aware that you are paying for convenience? then using RDS and such would probably be a better choice.

An established company/product with a team of people working at a non-crazy pace, and catering to steady enterprise customers? Would like to build a sustainable long-time infrastructure setup that is optimised for efficiency and cost? running your own Database chosen well for your needs, backed up and tested rigorously, and managed by people who cares for the company's infrastructure would be a better idea.

It is weird when large companies with a dedicated platform team choose to run so many databases for their teams/services on a PaaS. That clearly is an optimisation opportunity.

Re:Ask HN: Do you self-host your database? by littlestymaar on Tuesday June 29, 2021 @08:12AM (#27674729)
> your engineers working on adding features to your product instead of "managing and operating" a database?

That's the typical sales pitch for cloud offering, but I really fails to see how it applies to DB. Which part of “managing and operating” your database do you save when using such a service? And how big of a load did it put on your engineers in the first place?

Re:Ask HN: Do you self-host your database? by reacharavindh on Wednesday June 30, 2021 @06:51AM (#27687054)
As a Sysadmin who has spent a lot of time engineering systems to do specific tasks, I will tell you that there is a lot of effort that goes into your "production" database. Some of the tasks are not going to magically go away just because you use a managed cloud service for database - securing access to your database, monitoring basic metrics such as CPU, disk usage etc, making sure your data is backed up and tested for recovery. However, if you decide to self-host your production database, you've got more work such as

1. Keeping your database software up-to-date. Applying security patches without a huge downtime.

2. Managing the installation so that it is operating correctly - it's Systemd init files are okay and that it will come back to life should the server restart, logs are being stored correctly at an appropriate disk partition and that they don't fill up your data directory,

3. OS configuration aligns with your and your database software's needs. Which sysenvs did you set? were they changed as part of your OS updates?

All of the above are worth it in many cases. Spending a few days optimising the installation for your workload can make a huge difference and also empower you to use custom extensions like Timescale which is not so easy to do in some managed database services. Also, cost savings because you take that effort on yourself.

Re:Ask HN: Do you self-host your database? by gregw2 on Wednesday June 30, 2021 @05:43AM (#27686662)
Your crown jewels backup/restore will always work. You can easily/always spin up a new db copy.
Re:Ask HN: Do you self-host your database? by tester34 on Tuesday June 29, 2021 @05:56AM (#27673832)
What do you mean by "managing and operating" a database?

Applying migrations? initial setup and configuration?

Re:Ask HN: Do you self-host your database? by moehm on Tuesday June 29, 2021 @07:19AM (#27674302)
I think he means the usual stuff, so monitoring (disk space, memory, disk io, slow queries), patching (following mailing lists, emergency patch on sunday afternoon), failover, scaling (read replicas, multi master), backup, backup restore test, tuning, auth, security etc.
Re:Ask HN: Do you self-host your database? by littlestymaar on Tuesday June 29, 2021 @08:16AM (#27674758)
How does a cloud offering's going to help you with slow queries and tuning? Same for the security part (the biggest threats coming through your app anyway).
Re:Ask HN: Do you self-host your database? by moehm on Tuesday June 29, 2021 @11:36AM (#27677412)
Honestly, I don't know and would like to know as well. Can you share some insights into how much a cloud database allows to be tuned?

I haven't used a cloud offering before, but OP was asking about managing and operating a database. And that list is what we do at work or at home.

Re:Ask HN: Do you self-host your database? by torgard on Tuesday June 29, 2021 @08:34AM (#27674925)
> initial setup and configuration?

If you think there is nothing more to maintaining a database than initial setup and configuration, you are in for a rude awakening. Shit happens.

Re:Ask HN: Do you self-host your database? by tester34 on Tuesday June 29, 2021 @08:54AM (#27675120)
I mean how much time daily would it take on average?

I felt like generally you have nothing to do, except sometimes you gotta do something like respond to disk quota alert and stuff

Re:Ask HN: Do you self-host your database? by anonfornoreason on Tuesday June 29, 2021 @12:34PM (#27678262)
you dont need to do much, i would say my time budget on self hosted replicated and backed up MySQL database administration is under 20 hours per year. yes the first couple years took more time (learning, building out a backup strategy) but id have the same amount of learning with a hosted solution so i don't consider that part of time spent.