Live data from Hacker News

Migrating from AWS to Fly.io

terrateam.io

141–150 of 189 posts

Re: Migrating from AWS to Fly.io

#141
post #11

Earlier quoted context omitted.

https://fly.io/docs/postgres/ It isn't "Managed Postgres," but the differences are minimal. RDS is ultimately a solution for people who look in the mirror and confidently say "you don't know how to run a database."

> RDS is ultimately a solution for people who look in the mirror and confidently say "you don't know how to run a database." I think this is a terrible oversimplification and something tells me that you haven't had to deal with a complex database setup from an operations perspective. RDS reduces a huge overhead in terms of operations (ha, backups, upgrades and clustering being the first ones that come to my mind). Be…

> you haven't had to deal with a complex database setup from an operations perspective

I've often found it to be the opposite actually.

My experience is with RDS MySQL, and on that, RDS heavily restricts what you can do. Want to do partial replication? Nope. Want to install a database plugin? No access provided to do so.

Used to have a MySQL instance on EC2, but the rest of the team joined the cargo-cult of 'everyone else uses RDS, so it must be good'. I used to be able to grep replication logs to find problem queries, but RDS doesn't give you access to those. I used to use various I/O and CPU monitoring tools to help pinpoint bottlenecks in queries/performance, but you only get the few metrics RDS gives you (e.g. RDS only gives you aggregate CPU usage, not per-core usage).

Even stuff like killing queries gets annoying - standard MySQL GUIs typically issue a `KILL` statement, but you aren't given permission to execute that. RDS provides a workaround via a stored procedure, but that means you have to break into a console and remember the name of the SP.

Which leads to my next point - I think "managed" is a big misnomer. RDS is nothing like a truly managed DB with a DBA. AWS isn't assigning someone to optimise your tables, or won't help you look at your queries to see what can be done better. If something goes wrong, it's on you to fix it. IMO, RDS is more like a pre-configured database. It saves you from having to initially configure the database, and saves you from having to set up automated backups, HA etc.

My opinion is that, if all you need is a cookie-cutter solution, RDS is okay. If you need a complex setup, stay away.

Re: Migrating from AWS to Fly.io

#142
post #50

The article mentions this, but that’s strongly enough in my opinion. With fly you have no managed PostgreSQL. In my opinion, it’s not really comparable on cost to aws when Postgres is in the stack. You do read about interesting hacks where someone will set up rds in a region that may be single digit milliseconds away from a fly region. then, presumably, you could put PG bouncer on a sort of bastion host that connects…

RDS works really well with Fly apps. We often see lower latency between Fly.io and us-east-1 in Ashburn than an app does spanning two availability zones in us-east-1. But, realistically, we'd like a managed Postgres provider on Fly.io hardware. It's a much better developer experience, we need DBs in every region, and our private networking is pretty dang powerful. I think we're close, but we may need to get a little…

Thanks for this, this is the info I was looking for. I'm thinking of using fly.io for some bigger projects and was considering the possibility of having data on AWS, so this is great to hear.

Re: Migrating from AWS to Fly.io

#143

Author here. Some folks wanted the details on pricing. Pre migration, the Terrateam AWS monthly bill was about $200/mo. With Fly.io, we're paying around $90/mo.

How much total time / effort did the migration take and when do you break even on the $110/month cost saving?

It took about a weekend all said and done. We're much happier with the Fly developer experience.

$200 -> $90 a month is peanuts. But we're 100% bootstrapped and frugal.

Re: Migrating from AWS to Fly.io

#144
post #138

Earlier quoted context omitted.

You can get 1vCPU + 2GB RAM for 3.92 Euro/month at Hetzner. Those prices are hard to beat.

You can get 4 virtual ARM CPU + 24GB RAM + 200GB hard disk for $0/month at Oracle cloud. Nothing can beat that.

Any caveats? This sounds really great.

Re: Migrating from AWS to Fly.io

#145
post #126
post #61

Would have loved to read how much money they saved from this migration. The number's not there, unfortunately.

Author mentioned here that they went from $200/month on AWS to $90/month of Fly: https://news.ycombinator.com/item?id=34242923 Pretty tiny cloud costs either way, probably safe to assume they’re a small, early stage startup. But even still, it was likely a bad call to spend significant engineering effort on saving $110/month, which is a rounding error even for small startups. Hard to imagine that time couldn’t have b…

I would read it as a 60% saving. That's a very good one. Considering that this is a recurring cost and not a one time and it's proportional to their sales. Aka, they now will be able to provide their clients twice the amount of contents for the same price. At least in theory.

Re: Migrating from AWS to Fly.io

#146
post #131
post #35

I moved a rails MVP from heroku to fly.io. Biggest negative so far: no easy way to reset the database [1]. I'd typically like to blow it away and re-create it frequently as I tinker with it e.g. adding/removing/renaming a column or changing a data type. Those small changes now require migrations, which are a fair bit more work (but not a huge problem tbh). Biggest positive: ability to select a zone meant response tim…

This is stuff where I highly recommend writing up helper scripts. I have one to pull in stuff from a fly Postgres DB, spin up my local docker compose setup, and then pump the data into there. I think that's the real niceness here, a CLI that is pretty straightforward (not perfect by any means! but I can still wrap my head around it)

Sounds awesome/slick. If you know of any examples that can be shared would love to see them. My use of the fly CLI is rudimentary at best, and I don't use scripts at all, just (mostly basic) commands.

Re: Migrating from AWS to Fly.io

#149
post #138

Earlier quoted context omitted.

You can get 4 virtual ARM CPU + 24GB RAM + 200GB hard disk for $0/month at Oracle cloud. Nothing can beat that.

Any caveats? This sounds really great.

1. Arm not x86 so for some it may be a big issue

2.Free tier oracle sometimes feels like you have a lower priority on the given resources, and network speed is less than on hetzner, but works fine now for a year. Wouldn't trust commercial things running on it though without a plan b

Post reply on HN