Live data from Hacker News

Ask HN: Do you self-host your database?

news.ycombinator.com

151–160 of 236 posts

Re: Ask HN: Do you self-host your database?

#151
I used WordPress as my datastore for a while on personal projects. I could wrestle it mostly into shape and use the built-in rest api. WP is my day job so I know it well and like it, but I'm not a backender, so it was a bit clunky and time consuming to get things the way I wanted.

Then I needed to host that WP instance somewhere. That was also a pain.

I decided last year to try and use Node/Express/Mongo for my backend instead and stay fully in JS land. But now I need to host a Mongo db. Instead of that, I tried Atlas for hosted mongo, but ....it feels like it's from corporate America circa 2004.

Then came Supabase.

I randomly came across it, gave it a try, and it's heaven. It's absolutely dead simple to get working (for my simple needs). It can work as a regular DB or as a realtime thing like Firebase.

Strongly recommend trying Supabase.

Re: Ask HN: Do you self-host your database?

#152
post #119

“Self-host” is such a weird word. Having your own stuff yourself should be the default , should it not? I mean, you don’t “self-drive” your car, nor “self-work” your job. The corresponding words instead exists for the opposites: You can have a chauffeur and you can outsource your job. I think the problem is entirely caused by the US having absolutely abysmal private internet speeds and capacity. Since you can’t then…

> I mean, you don’t “self-drive” your car, nor “self-work” your job.

You could just take these metaphors up a step and you get the opposite effect.

For example, building/fixing your own car or running your own business. Those are considered unusual compared to using a third party.

Re: Ask HN: Do you self-host your database?

#153

I used WordPress as my datastore for a while on personal projects. I could wrestle it mostly into shape and use the built-in rest api. WP is my day job so I know it well and like it, but I'm not a backender, so it was a bit clunky and time consuming to get things the way I wanted. Then I needed to host that WP instance somewhere. That was also a pain. I decided last year to try and use Node/Express/Mongo for my backe…

+1 for Supabase. Currently playing with Phoenix Framework and using Supabase's postgresql offering. Just needed to enable Session pooling and the CITEXT extension, but otherwise it all worked fine. Very price competitive with many of the other DBaaS.

Re: Ask HN: Do you self-host your database?

#154

I used WordPress as my datastore for a while on personal projects. I could wrestle it mostly into shape and use the built-in rest api. WP is my day job so I know it well and like it, but I'm not a backender, so it was a bit clunky and time consuming to get things the way I wanted. Then I needed to host that WP instance somewhere. That was also a pain. I decided last year to try and use Node/Express/Mongo for my backe…

Supabase cofounder here. I just want to give my thanks for your support. It’s always nice coming across a comment like this in the wild - makes all the hard work worth it.

Re: Ask HN: Do you self-host your database?

#155
post #52

We're currently transitioning from a multi-tenant 2TB postgres DB hosted on AWS RDS to using sqlite instead, a separate database for each client. We're doing this for multiple reasons: a) As our DB grew the service became very expensive, one of the biggest items in our AWS invoice; b) Keeping the PG servers up to date is a pain, we simply don't have time for this; c) We wanted to be able to migrate to other clouds an…

How do you deal with common sqlite lock file when using it for multiple users?

I solved that once by having a service layer on top of the db. Just a simple REST-like API used by the redt of the app (in Spring).

Re: Ask HN: Do you self-host your database?

#156

Earlier quoted context omitted.

What do you mean by "managing and operating" a database? Applying migrations? initial setup and configuration?

> 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.

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?

#157

Earlier quoted context omitted.

They're talking about running the db on a vm, setting it up and tuning it themselves. As opposed to a managed solution which is setup and tuned and hosted on a vm controlled by another company.

I'm still unclear on if the VM here is on a machine they own/on their own premises? Or is it under someone else's control? "In the cloud" sounded like the latter but it sounds like the intention was the former?

They are talking about renting a VM from a cloud provider and setting up the DB themselves (example: EC2) vs renting a fully managed DB from a cloud service provider (example: RDS).

Re: Ask HN: Do you self-host your database?

#159
The company I work for self hosts our databases. We self host HBase, Elastsicsearch, MySql w/ Vitess, Kafka, and a few other things. Our scale is large enough so it makes a lot more sense to pay for engineers rather than to pay for a service.

I work on the Data Infrastructure group and am more than happy to answer any questions about it

Re: Ask HN: Do you self-host your database?

#160
post #117

Earlier quoted context omitted.

Not a problem up to 100,000 customers imp

I used it 10 years ago and initially locks were a slight problem. Not sure if this has been solved somehow in sqlite itself. I solved the problem by handling all the DB operations in a separate thread that handled write and read queues. It certainly was not as easy as using mysql/postgresql where server does everything for you. Nowadays there are probably plenty of libraries that handle that for you.

This pattern is what I did when I used SQLite in production. I used a lightweight actor model microframework to make it easier to route write requests from multiple areas of the code to the single writer thread and offer a continuation (or async/await) perform any follow up actions. Performance easily went beyond the requirements for the app.
Post reply on HN