[aws-rds] Minimize downtime during DBCluster updates
See original GitHub issueMinimize downtime during DB Cluster updates
Current Status
The CfnDBInstance of DBCluster is currently loosely coupled. That is, if there are multiple CfnDBInstances, Instance updates will occur at the same time because there is no dependency on them on Cloudformation. Therefore, the cluster will not be available until the DBInstance update is complete.
Proposal
Adds a dependency to CfnDBInstance. As a result, one by one, RollingUpdate will be performed, and the only downtime will be the timing of the primary switch. In other words, when there are two instances, it will take only two failover times to update. (A) If we can create Dependency dynamically, it will take only a one-time failover time to update. (B)
I think primary failover times are faster than Instance updates. So I think it would be useful to include this feature. However, the update time for Stack and the maintenance time for offline updates will increase.
What do you think about this proposal? I’d like to hear your opinion.
Proposal Solution (A)
https://github.com/aws/aws-cdk/blob/d95af009a8d59393d019620aa8878098ce0aed1d/packages/%40aws-cdk/aws-rds/lib/cluster.ts#L734
Add instance.node.addDependency(previous_instance);
Proposal Solution (B)
I think we need to use aws-sdk to determine if the current Instance is primary or replica, but I haven’t thought about it in detail.
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Top GitHub Comments
No worries, thanks for helping me anyway 😃
@skinny85 Yes, You know exactly what I mean.