-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue: support Amazon RDS #163
Comments
I should note that I am not using RDS at the moment; will need community feedback for production issues. |
I am using RDS and have been trying out gh-ost with success so far. I am happy to give feedback and contribute where possible. I've succeeded in running a test with |
As far as I can tell, the only other blocker is the In RDS, it is possible to start/stop replication with stored procedures they provide, ie: The only other thing that is not supported (that I can tell) is setting global variables, so we wouldn't be able to support auto-configuring RBR from mysql itself. It would be possible to do it via the RDS API, but there are non-trivial concerns since multiple RDS instances can share the same configuration, so setting |
Thank you! You are now assigned the role of Chief RDS Officer at Gh-Ost Corp. Changing a |
Ha, thanks! I am working on documenting the steps required for using gh-ost in our RDS environment. I should be able to make it generic enough to help others. When I do, I can submit a PR if you are interested. Hopefully we can get other RDS users to provide some feedback. |
Hooks have been merged, though not yet released. |
Great! I will try them out with our next |
The |
At this time (v.1.0.17), the way to run Real migration
Test on replicaIn addition to the above:
Once the above is tested more by the community, I will put this in documentation |
This is the hook we use. At #!/usr/bin/env bash
statement="call mysql.rds_stop_replication"
echo "Issuing statement to stop replication: ${statement}" 1>&2
exec mysql -h $DB_HOST -u $DB_USER -p$DB_PASSWORD -e "${statement}" where The |
This is the minimum privilege required for that: GRANT EXECUTE ON PROCEDURE mysql.rds_stop_replication to '<user>'@'<host_or_wildcard>'; |
@pbitty thank you for this info! To clarify, in: |
Good point. I've updated the comment above. |
Cool. Eventually we'll make a doc page out of this. |
hey all Just arriving here after researching tools like percona's online schema change and even @shlomi-noach's old open oak project. This project has become highly relevant to me on the back of a terrible alter-table experience last week :) I'm curious what is the status of Amazon RDS support at this point? it looks like the biggest issue that even Percona's toolkit had with regard to the super user was resolved in #156. Is this the only known limiting issue or are there more known issues? |
@drmmr763 , I have been using |
I should note, for |
Has anyone tested gh-ost on RDS-Aurora? |
@drmmr763 Amazon Relational Database Service (RDS) is the umbrella name for their relational DB offerings. It's basically a managed DB service. They offer Mysql, Postgres, MS-SQL server instances and maybe others. RDS Aurora is a new offering that is Mysql wire-compatible but has a different architecture on the backend (it's not actually a mysql server). We haven't used it yet, but they claim performance benefits in a lot of cases. |
@shlomi-noach could you please update this comment to reflect that replica's Parameter Group requires It can help others to have all needed information in one place, until this makes it into the official docs. |
@fern4lvarez done, thank you! |
I will set aside some time before end of week to whip up a PR for RDS documentation. |
@pbitty did you try to throttle a migration during a long period of time? I'm concerned about |
@fern4lvarez , I don't believe I've throttled one for a long period - however, we do stop replication for about 8 hours during backups on some of our instances. RDS hides this setting behind a config option that you can set using their call mysql.rds_set_configuration('binlog retention hours', 24); It's not very well-documented, you can find it at the bottom of this doc. |
Hi, I am trying to do "Connect to replica, migrate on master" or "Migrate/test on replica" on RDS but having an issue complaining "<rbr_replica_host> must have binary logs enabled". The parameter group does have "log-bin" set up and "binlog_format" is set to "ROW". I would be very appreciated any suggestions how to solve it. Thank you. |
@pbitty Thanks so much! this solved the problem. |
@fern4lvarez Is the replica configured with |
@pbitty thank you -- and I think you're on the spot. @fern4lvarez may I suggest you should ask these questions in new issues; this issue is for tracking down changes to support RDS, and we cannot handle multiple problems in the same thread. Opening a new issue and linking to this issue would be the right thing to do. |
@shlomi-noach |
@Ahmadposten I myself am not using RDS in the first place. Hopefully @pbitty can help out -- but do see his earlier notes on the matter. |
@Ahmadposten What version of mysql are you using? In our account I can only change that setting on PGs for mysql 5.6 (or higher?). On 5.5 and 5.1 it is non-modifiable as you said. Is this the case for you? You would have to upgrade to 5.6 to use gh-ost. In RDS, only mysql 5.6 or higher have support for "external replicas". With 5.5 and lower, they don't give you the ability to grant |
@pbitty @shlomi-noach |
@shlomi-noach one thing to note is that RDS will not honor the parameter group config for the binlog unless you enable automated backups on the read replica (for at least 1 day). Could you add it in your comment? |
@lperrin done. thank you! |
Hi guys, we are thinking to move from RDS mysql to Aurora and is curious if anyone here knows if gh-ost works for Aurora as well or not. Thanks! |
I'm testing it with Aurora and so far so good. |
I've run several migrations on RDS MySQL using the directions above and had no problems. |
I ran around 7-8 migrations on MySQL in December using this. Everything seemed to have worked well. |
I've been testing this for the last couple of months using RDS and aurora as the engine. The steps here related to RDS are spot on 👍 , the only differing pain point I've found is that the aurora parameter group doesn't allow modifying We're looking into a couple of work arounds for this and I'll report back if we get anything worth while but for now, best to just be aware you'll need to run it on the master. |
@jacobbednarz That's great to hear. From what I understand of Aurora, all nodes share the same underlying storage layer, so only one node is allowed to write to it. You may be able to get around this by replicating to another Aurora cluster. From gh-ost's point of view, it would still be connecting to a "master", but this master would be on a 2nd Aurora cluster (that is receiving binlog updates from the 1st one). I haven't tried this, just theorizing. :) |
This is a possibility however I don't believe it solves the issue of running on a replica but migrating the master (which is the intention here). Your comment further down explains why this is the case and right now I can't see a viable solution. The best you can expect from RDS on Aurora at the moment is that you can run it on the cluster but only directly on the master. If you want to test, you need to stand up additional clusters - probably based on a recent snapshot. |
I migrated a 1.5 billion record table on a highly concurrent system in Aurora. It took a couple attempts, because the inserts would slow even with no constraints added to the base command. We had to scale back some of the load on the server to be able to complete the task in a timely manner. |
@HasMikeW which version of |
@shlomi-noach The version is 1.0.32 I had looked into using the --dml-batch-size but was unable to get it to work with this version. I didn't want to go back and have to run more tests that a new version of gh-ost would have dictated at that point. That was the next step if reducing the load did not work :-) |
Just an update to my comment above - I've managed to find a nice workaround for testing/migrating on a replica in AWS RDS using aurora as the engine. @pbitty was pretty close to the money however you don't use Aurora replication, you need to use standard MySQL-style replication. The AWS documentation page does an OK-ish job at explaining this but it's probably better to follow non-AWS docs and just setup replication as if you would elsewhere using a separate aurora cluster in the same region. |
@jacobbednarz do you think it would be good to write some documentation for Aurora users, and if so, would you be able and willing to write it? |
It would definitely be worth while! I'm happy to write it (since I've already got a bunch of notes from our internal documentation that would help here too). |
I've opened a PR to add in AWS RDS docs at #385 for anyone following along at home. |
@shlomi-noach I think everything in this issue has been addressed either via docs or changes. We've also managed to run ~20 successful test + production migrations on RDS so I'm happy most of the annoyances are out of the way. Would it be time to close this off and expect new issues to be in a thread of their own? |
EDIT: Documentation for RDS is available
This is a tracking issue to discuss all things RDS and what it takes to be able to run
gh-ost
on RDS.The text was updated successfully, but these errors were encountered: