[HN Gopher] How We Built Fly Postgres
___________________________________________________________________
How We Built Fly Postgres
Author : pw
Score : 57 points
Date : 2022-11-30 09:11 UTC (13 hours ago)
(HTM) web link (fly.io)
(TXT) w3m dump (fly.io)
| stuff4ben wrote:
| Using Stolon for PG is a poor choice. Up until just very
| recently, they haven't had any significant updates in a year.
| We've abandoned our use of it in favor of EnterpriseDB.
| tptacek wrote:
| There's a bunch of our own engineering going into this. But:
| the good news about this whole situation is, if you have a
| clustering solution you like better: you can just use it. We
| "automate" Fly Postgres, but we don't "manage" it. Fly Postgres
| is using features of Fly.io that are available to anybody's
| application, not just ours.
| asguy wrote:
| > we're good at consul
|
| Thank god someone is. I've lost more of my life to consul
| partition failures that's any other part of the nutech stack.
| madeofpalk wrote:
| They've had their fair share of pains with it, but they still
| seem pretty happy with it https://fly.io/blog/a-foolish-
| consistency/
| tptacek wrote:
| Happy is a word. There are lots of words. I like words! You
| could be creative about what word could take the place of
| "happy" in that sentence, and probably still be correct. Get
| weird with it! Maybe "sanguine" would work. "Engaged".
|
| The reality is: we've got a fair bit of experience with
| Consul at this point, we respect the hell out of it for the
| problems it was designed to solve, and we're unlikely to
| stretch it any further than we've already stretched it.
| Distributed lock service for Postgres clusters? Sure. Source
| of truth for all our app state? We've built our own thingy
| ("corrosion", a Rust distribute state system) to phase Consul
| out with. I'll get Jerome to say things about it.
| WFHRenaissance wrote:
| What else would you include in the nutech stack? HashiCorp
| products in general?
| smallerfish wrote:
| This is tangential - anybody have a reasonably clean way of
| running JVM apps on fly?
|
| Given that the deploy model of a jettified jar is so clean in
| comparison to the various hipster stacks ;) that they do have
| primary support for, I'm not sure why they don't have much in the
| way of documentation for it. I did find a support thread that
| refers to https://archive.is/o9YE1, which seems like a fairly
| gross and opaque sequence of steps.
|
| @tptacek, what are the chances that somebody at Fly could produce
| a more streamlined recipe and/or documentation for JVM apps?
| MuffinFlavored wrote:
| > You can spin up a Postgres database, or a whole cluster, with
| just a couple of commands. Sign up for Fly.io and launch a full-
| stack app in minutes!
|
| What is the HackerNews opinion on: who is their actual customer?
|
| Obviously lots of companies pay for managed databases. It's not
| an uncrowded market for a reason.
|
| But like... pricing wise... it seems so expensive? What is the
| HackerNews take on the valuable proposition specifically for
| hosted databases? Is the answer basically 1:1 with anything cloud
| hosting related?
| rozenmd wrote:
| Last I checked, a 4 vCPU/16GB RAM/1TB storage configuration
| costs around $80 USD per month at VPS hosts like Hetzner. It's
| $762 USD per month on RDS.
|
| There are trade-offs of course (https://onlineornot.com/self-
| hosting-vs-managed-services-dec...) between the two options.
|
| I've been hoping fly.io builds a strong automated middle ground
| for a while now!
| w-ll wrote:
| Am I reading https://instances.vantage.sh/rds/?min_vcpus=4&co
| st_duration=... wrong. It seams you can get that as a
| db.t4g.xlarge for ~$188/month.
|
| Still more than 2x the cost, but not nearly $760
| newaccount2021 wrote:
| nicoburns wrote:
| > who is their actual customer?
|
| Anyone who wants a managed database + to run Docker contains on
| VMs without having to do much ops work or deal with the
| complexities of the big clouds.
|
| > But like... pricing wise... it seems so expensive?
|
| It's quite a bit cheaper than Heroku who run a similar service
| and have bootloads of customers.
| MuffinFlavored wrote:
| > Anyone who wants a managed database + to run Docker
| contains on VMs without having to do much ops work or deal
| with the complexities of the big clouds.
|
| At what cost though? Why not run a VM that runs Postgres? It
| might take a week to set up in terms of automated backups,
| cluster, failover, etc. (ok, maybe a few more weeks) but
| hosted DB costing 5x the underlying VPS is insane?
| tptacek wrote:
| _By all means_ , if you have a database stack you're
| comfortable managing yourself, use it! We did Fly Postgres
| because we more or less had to, not because we want to own
| the storage stack on Fly.io. We want, in fact, the exact
| opposite thing. If you've got a database stack you _enjoy_
| managing, and extra time on your hands, spin it up for
| other Fly.io customers as a product! We 'll love you for
| it.
| garganzol wrote:
| Database is a thing I never want to deal with at such low level.
| Such approach will be brittle, very brittle. Managed data storage
| with SLA guarantees is not easy and there are quite a few
| companies specializing on that for a reason.
|
| As a proof, check out fly.io forums. They are full with posts
| about suddenly broken Postgres instances.
___________________________________________________________________
(page generated 2022-11-30 23:00 UTC)