-
Notifications
You must be signed in to change notification settings - Fork 4k
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
aws-rds: modifying instance_size for DatabaseCluster results in significant downtime #17916
Comments
I suspect that this is a CloudFormation change and not something that can be achieved in CDK alone unless there's something I'm not aware of in defining the resulting dependency tree to force a dependency between individual cluster members. Just my guess. |
That's fine. Is there anything I need to do specifically or would you like me to copy my notes to that issue and close this one? I got the impression #10595 was abandoned. If this is a CloudFormation I suspect there's not a whole lot that can be done as it relates to cdk. Could be wrong. |
I think just commenting on that issue, linking to your description here, is good enough. No need to duplicate it in two places 🙂. |
Closing this out as duplicate |
|
Description
If you have defined your infrastracture using cdk and you implement an rds.DatabaseCluster with multiple members, modifying the instance_props for the members results in 5-10 minutes downtime depending on instance class/size. This defeats the purpose of multi-az (or partner promotion as it's now known I think). Typically you would see 5-10 seconds downtime max if performing this operation otherwise or using best practices.
Use Case
Modify instance_props.instance_type.instance_size to adjust infrastructure to current traffic (up or down). Or if you happen to know of high traffic periods you need to modify your instance size to adjust accordingly.
Proposed Solution
The brute force method would be to move the instance_props outside of the cluster and be handled on an instance by instance case. That way you could deploy the change on one instance, wait for CFN/CDK to finish, then perform the same on remaining instances. Promotion would automatically happen as part of the deployment. This is probably not the right solution and would be too disruptive to the current api.
An alternative would be for CFN/CDK to transparently handle the resize operation internally. I don't have enough knowledge of the inner workings at this point. I'm also not sure if this is related to #10595 (that issue seems to be talking specifically about Cfn constructs and not native CDK constructs). Either way, the solution should be to calculate the graph change or resulting changeset and then perform the intended operation on a step-wise, instance by instance manner only progressing once individual changes are complete/successful or after achieving waypoints (like partner promotion success). This step-wise heuristics could also be abstracted to a standardized class if it were to be reused in other constructs (redshift, elasticache, etc). Additionally, there may also be an addition of a DatabaseCluster property to specify the desired operation, e.g.,
change_behavior: aws-rds.CHANGESET_BEHAVIOR.PARTNER_PROMOTION
oraws-rds.CHANGESET_BEHAVIOR.ONE_AT_A_TIME
.Other information
No response
Acknowledge
The text was updated successfully, but these errors were encountered: