Ask HN: Do you self-host your database?
11–20 of 236 posts
Re: Ask HN: Do you self-host your database?
#12Self hosting PSQL via Docker container + Ansible. Also hosting MongoDB, Elastic Search, Redis instances (for session & caching, separate instances). Might consider researching using pg_bouncer later (but really not needed right now). Pricing and support for vendor solutions are too bad for small scale app.
In-line with my experience too.
Where are some of the hard things that you learnt self hosting these many services?
Re: Ask HN: Do you self-host your database?
#13Postgres hot hot with 2 servers.
For clients I always recommend PaaS
Re: Ask HN: Do you self-host your database?
#14We self-host a postgres cluster in k8s (AKS). The main reason being that the Azure postgres offering was not fit for (our) purpose. We did start with the Azure offering, and our default is generally to use the cloud offering.
I am currently evaluating the same choice - Azure Postgres vs self-hosting in my k8s cluster.
Re: Ask HN: Do you self-host your database?
#15I do this for cost reasons, self hosting the database is so much cheaper than the managed options that for the same cost I can run the entire app stack, load balanced web servers, etc.
No containers anywhere but maybe in the future I'll add some.
Re: Ask HN: Do you self-host your database?
#16Yes. I self-host for my infrastructure. MariaDB and PostgresSQL. I've been self-hosting MySQL and Postgress for nearly 15 years now. But it's not something I recommend my clients doing.You need to be really careful to avoid foot guns like the one that took down new blur. For example. I don't run my DBs in containers, although I run my applications within containers.
How do you handle firewall? Just open up the source IP with the IP of wherever the Application is hosted?
Re: Ask HN: Do you self-host your database?
#17You have control over the version.
You have control over features.
You have control over performance.
It’s tons cheaper for greater performance - especially when you go over a few hundred gigs.
Yes, the hosted ones have built in replication - but my data is far too valuable to put in the hands of a third party. If they lost it - they could only shrug and say sorry and that’s it. The TOS indemnifies them.
I think it’s kind of honestly lazy — to not take the management of your data in your hands if you run a database of any significant size.
That being said, we do replicate and backup 9 ways to Sunday.
Re: Ask HN: Do you self-host your database?
#18Re: Ask HN: Do you self-host your database?
#19Would a hosted service be a better Idea, in your opinion? (That machine also has a LAMP stack for some of my web stuff).
Re: Ask HN: Do you self-host your database?
#20Self-hosting MariaDB with multi-master replication. Works pretty well for my cases. Have a friend that was surprised by the AWS pricing changes on Aurora (they charge per query now instead of bandwidth/usage?)
multi-master with conflict resolution is non-trivial. Do you have automated failover set up? Also, didn't know about Aurora's per query pricing. That is crazy.
I tend to leave the decision to switch masters to humans, and just automate the process. Unless you have bulletproof conflict resolution/reconciliation, automating failover is inviting a conflict that leads to major pain and a large effort to fix. Better to have a few minutes of write downtime while waiting for someone to make the decision (which includes making sure the dead host is truely dead and not just split brained)