Live data from Hacker News

Migrating Large Heroku Postgres Instances to AWS Aurora Without Downtime

thecodinginterface.com

11–20 of 40 posts

Re: Migrating Large Heroku Postgres Instances to AWS Aurora Without Downtime

#11

I'm considering moving from a self-hosted Mongo setup to Aurora, either with PG or MySQL. Anyone here have opinions on Aurora?

Aurora (Postgres) looked like it would be great, and the performance for our use case was much better than RDS. But there was a showstopper for us with the replication: If the cluster leader fails, _every read replica will force a restart_ to elect a new leader, resulting in minimum ~30s complete cluster downtime. In our situation we have no problem with a short downtime in write availability, but the fact that we can't maintain read availability via replicas is a deal breaker.

Re: Migrating Large Heroku Postgres Instances to AWS Aurora Without Downtime

#13

I'm considering moving from a self-hosted Mongo setup to Aurora, either with PG or MySQL. Anyone here have opinions on Aurora?

I've heard mixed reviews on Aurora MySQL. Some people move to it and see huge performance gains, others simply don't or have some limitations.

Re: Migrating Large Heroku Postgres Instances to AWS Aurora Without Downtime

#14

Might have been nice to see this post a year ago :). My company migrated our ~2TB postgres db from heroku to AWS (originally aurora, we switched back to RDS postgres). Haven't had time for a blog post, but figure I might post our learnings here, and the differences in our approach. * We did the second step (ec2 -> aurora) via AWS DMS (database migration service). This service may be a little more of a pain than it's…

I originally wanted to use DMS but our DB failed the pre-migration assessment so that forced us to Logical Replication. We also worked with Jesse. You are right he is amazingly helpful. Unfortunately we got some pretty questionable help from others before he was assigned to our support ticket but once that happened it was infinitely improved.

Ahhhh... well you might've dodged a bullet to be honest! If I were to do it all again, there's a good chance I might stick with the standard tools rather than DMS.

Thanks for the in depth article by the way, very well written!

Keep an eye on your AuroraStorageIO costs going forward, as we said, we halved our costs and increased performance by switching back to RDS and increasing the PIOPs available. I'm sure that'll be workload sensitive though, so YMMV. We did a bunch of benchmarking, and aurora seemed nice apart from this.

We must've lucked out, as we got Jesse at the start.

Re: Migrating Large Heroku Postgres Instances to AWS Aurora Without Downtime

#15

The author has gained a significant amount of Postgres-related knowledge when performing this migration. Taking this into consideration, is it still worth using the managed Aurora, instead of the EC2 self-managed instance?

I currently manage, or am "lead dev", for around a half dozen to 10 apps using Postgres as the database. For two of those I use a managed database service (AWS RDS / AWS Aurora Postgres) because they drive mission critical high value products / services and I wouldn't consider using a standalone install of Postgres. For other apps that are not so mission critical I am perfectly happy saving considerable money and running them on a VPS on AWS EC2 or Digital Ocean or Linode. So ultimately it depends on the app and the risk tolerance for Recovery Time Objective and Recovery Point Objective.

Re: Migrating Large Heroku Postgres Instances to AWS Aurora Without Downtime

#16

The author has gained a significant amount of Postgres-related knowledge when performing this migration. Taking this into consideration, is it still worth using the managed Aurora, instead of the EC2 self-managed instance?

RDS Postgres (actual postgres, not the Aurora product which can be "mostly postgres compatible") is another option, not just "EC2 self-managed instance".

I guess we'd have to look at price comparisons for the size you actually need. I think depending on load, the price differences may be nominal.

Re: Migrating Large Heroku Postgres Instances to AWS Aurora Without Downtime

#17
post #11

I'm considering moving from a self-hosted Mongo setup to Aurora, either with PG or MySQL. Anyone here have opinions on Aurora?

Aurora (Postgres) looked like it would be great, and the performance for our use case was much better than RDS. But there was a showstopper for us with the replication: If the cluster leader fails, _every read replica will force a restart_ to elect a new leader, resulting in minimum ~30s complete cluster downtime. In our situation we have no problem with a short downtime in write availability, but the fact that we ca…

I'm no DBA, but is that not the entire point of a cluster/replicas?

Sure, maybe writes won't be accepted or replicated until a new master is elected, but you can't even read from the cluster?

I'm curious at this point: what is it exactly that you gain from a cluster? Is it only having to wait 30s vs. however long it takes for the master to come back online?

Re: Migrating Large Heroku Postgres Instances to AWS Aurora Without Downtime

#18

The author has gained a significant amount of Postgres-related knowledge when performing this migration. Taking this into consideration, is it still worth using the managed Aurora, instead of the EC2 self-managed instance?

I currently manage, or am "lead dev", for around a half dozen to 10 apps using Postgres as the database. For two of those I use a managed database service (AWS RDS / AWS Aurora Postgres) because they drive mission critical high value products / services and I wouldn't consider using a standalone install of Postgres. For other apps that are not so mission critical I am perfectly happy saving considerable money and run…

Worth noting that DO also has a hosted Postgres service.

Re: Migrating Large Heroku Postgres Instances to AWS Aurora Without Downtime

#19

Might have been nice to see this post a year ago :). My company migrated our ~2TB postgres db from heroku to AWS (originally aurora, we switched back to RDS postgres). Haven't had time for a blog post, but figure I might post our learnings here, and the differences in our approach. * We did the second step (ec2 -> aurora) via AWS DMS (database migration service). This service may be a little more of a pain than it's…

Fantastic comment, thank you so much. I've been following Aurora for a while but a little curious (and skeptical) about sharp edges vs vanilla PG. If I may ask you a follow-on question, who do you think Aurora would be the right fit for?
Post reply on HN