Stop/Start RDS Blue replicate to Green

0

I am thinking to use the Blue/Green deployment to setup a development DB for MariaDB. When the Green DB instance is setup, I will like to stop the replication from the Blue so that changes in Green will not be over written.

When the changes to Green is tested, that is after code development is ready, the changes will be applied to Blue using SQL script. After code deployment, replication from Blue will be turned on so that Green is in sync with the production.

But is there a way to stop/start replication from Blue to Green?

profile picture
Lottie
質問済み 2ヶ月前131ビュー
1回答
0
承認された回答

Hi,

Thank you for asking your question.

To stop replication from Blue to Green on RDS for MariaDB, you can use CALL mysql.rds_stop_replication;[1], then start using CALL mysql.rds_start_replication;[2] on Green database instance.

Importing data to an Amazon RDS MariaDB or MySQL database with reduced downtime might help to setup replication.

During stop replication, Blue database instance needs to keep all binary log until resume replication to avoid data loss. You can set binlog retention hours using call mysql.rds_set_configuration[3] on Blue database instance. Increasing retention hours it will be increasing disk consumption as well following increasing write workload on Blue database instance. Please monitor FreeStorageSpace on Blue environment.

I hope this might help.

AWS
回答済み 2ヶ月前
profile pictureAWS
エキスパート
レビュー済み 2ヶ月前
  • Your solution above works. I applied CALL mysql.rds_stop_replication; to Blue at first it didn't work. After applying mysql.rds_stop_replication; in Green, I made a column type change in Blue that change didn't flow through to Green. I then ran CALL mysql.rds_start_replication; on Green the column change in Blue was applied to Green thereafter. But I won't use Green as a development DBI as the retention consumes disk space. I would rather use DB restore to refresh the dev DB.

  • just wonder [3] where is the log retention stored? Is it on S3?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ