RDS for MySQL Blue-Green Deployment
What Is Blue-Green Deployment?
Blue-green deployment is a service version upgrade strategy based on redundant deployment. It replicates the existing production environment (the blue environment) into a real-time synchronized test environment (the green environment) for testing and canary verification. By changing the mapping between virtual IP addresses (VIPs) and real nodes, you can quickly switch between the production and test environments. This approach requires no application-side modifications, minimizes service interruption, and supports rollback.
You can use an RDS for MySQL instance running an earlier version as the blue instance and create a new green instance with the target higher kernel version. The green instance synchronizes data with the blue instance through native binlog replication. After blue-green deployment is complete, you can initiate a blue-green switchover to direct service traffic to the green instance and verify whether workloads run properly on the higher-version instance. If compatibility issues occur, you can roll back the blue-green deployment to direct service traffic back to the blue instance.
Deployment Process
- After you submit a blue-green deployment task, the system first restores a higher-version green instance based on the lower-version blue instance and establishes a replication relationship between the two instances. The system then waits for the green instance to catch up with the blue instance before creating a DRS synchronization task for potential rollback.
- After you submit a blue-green switchover task, the system waits until the data in the blue and green instances is consistent, triggers a VIP switchover to direct read and write requests to the higher-version green instance, and then starts the DRS synchronization task to complete the switchover.
- After you submit a blue-green rollback task, the system waits for the DRS synchronization task to catch up with the data, triggers a VIP switchover to direct read and write requests to the lower-version blue instance, and completes the rollback.
Notes and Constraints
| Phase | Notes | Feature Constraints |
|---|---|---|
|
| |
| Phase 2: After Blue-Green Deployment Is Complete | During the period in which the blue-green deployment relationship is maintained, entry points for maintenance operations, such as making changes to the blue and green instances, are disabled. | The DRS synchronization task is retained for three days by default after blue-green deployment is complete. You are advised to perform the blue-green switchover within three days to verify workload compatibility. |
|
| |
|
| |
| You can delete only the blue-green deployment relationship while retaining the green instance as an independent pay-per-use instance and leaving the blue instance unchanged.
| After the blue-green deployment relationship is deleted, the blue and green instances become independent instances. Blue-green switchover and rollback are no longer supported. Confirm this before deleting the relationship. |
Procedure
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot








