Hacker News new | past | comments | ask | show | jobs | submit login

Not unless you're ready to try to create a physical host replica, and then fail over to it as a master during downtime.



Is it possible to run a read replica outside of RDS these days?


Funny this showed up on here. I just spent the last 4-5 days playing with DMS.

My company has been using AWS for a while, but management wanted a "backup" backup off Amazon "JUST IN CASE". Due to amazon blocking replication credentials for MYSQL servers we had to basically dump over scp to our off amazon server and run the update on that machine via a script. We tried a number of different options but none were reliable. All nasty stuff.

Anyway after setting up a dms.t2.medium replication instance, I was able to create a number of tasks pulling from our amazon server to our off amazon server.(You have the option to just pull a full dump, pull a full dump and continue replication or simply replicate data.) It's been running for a little under 24 hours now and has been, solid so far with the replication. I know not even a day yet, but it's looking promising. Fingers crossed!

A small bonus to doing the setup for this. I found out the hard way that there was bad schema in our database, which I spent the last couple days fixing. DMS is rather sensitive, and will fail and not restart if it encounters to many errors trying to replicate data.

Overall cost is looking like it's going to cost me about $150 a month for the replication instance, which is only marginally more than the bandwidth costs I was incurring doing full dumps to our off amazon server.

Benefits are almost instant replication and an interface that will give me almost instant feedback on failed replication tasks, all within AWS which is where we are hosting everything else at this time. I was also able to create individualized tasks for separate schema so I can watch and manage errors on a schema by schema basis which is nice.

Overall I'm happy with it, but only time will tell if it can continue to be a reliable replication option.

O.


Thanks for all the info. Is your On Amazon DB on RDS?

We use Postgres so it might be that we couldn't do the same. Presently I run the DB on EC2 instance(s) but one day I'm sure I'll switch to RDS. Just trying to understand what an exit strategy might look like in the future.


Yes we are running a mySQL 5.6 Database on RDS.

If the Database you want to migrate/replicate from is running on Amazon you should be able to make it a replication source.

I saw nothing that stated the database HAD to be on RDS. You use the servers address to setup the endpoints. And provide a database username and password to connect with so it should be doable.


I don't see why not. Replication is just a command stream over a network. You can secure it over the daabsse's built in TLS support or over VPN. The only question is bandwidth and latency between your DC and AWS's.


I believe AWS stop you from connecting to anything outside your RDS subnet.


Then get you outside DB server via a VPN.


Unless something has changed, that's the problem. When I last looked RDS was a sandboxed environment. You can't ssh to it or connect it to a VPN.


You don't need to get the RDS box on a VPN. Instead, you get your server in your data center into the AWS VPC via the AWS Gateway VPN thing. From there you tell your data center server that it's master is the RDS box and you should be all good (assuming you can do the usual song and dance with the full DB dump and replication coordinates).


Some RDS flavors now support offsite replication, it's quite easy to set up.


Do you know if PostgreSQL is included in that list? Can I just pg_basebackup to start up a read slave?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: