Skip to content
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

feat: add production quality features to rds db #471

Merged
merged 1 commit into from
Dec 2, 2024
Merged

Conversation

wolverian
Copy link
Contributor

@wolverian wolverian commented Nov 22, 2024

Slight issue here related to Aurora clusters and how CDK models them (wrongly): aws/aws-cdk#26726 - this means that if the cluster failovers, our "reader" replica can become the writer. CDK will be confused on the next run (since the writer has disappeared). I'm not sure what CDK will do in that case, we should test it.

Changes

Production

Resources
[+] AWS::RDS::DBInstance Database/DbStack/reader DbStackreader1001C220
[~] AWS::RDS::DBCluster Database/DbStack DbStackBE19CDA3
 ├─ [+] DeletionProtection
 │   └─ true
 ├─ [+] PerformanceInsightsEnabled
 │   └─ true
 └─ [+] PerformanceInsightsRetentionPeriod
     └─ 7

@@ -22,6 +23,11 @@ export class DbStack extends cdk.Stack {
storageEncrypted: true,
defaultDatabaseName: props.databaseName,
enableDataApi: true,
...(props.productionQuality && {
readers: [aws_rds.ClusterInstance.serverlessV2("reader")],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test what happens after failover when a reader has become the writer.

@wolverian wolverian merged commit 30b451f into main Dec 2, 2024
16 checks passed
@wolverian wolverian deleted the feat/db-prod branch December 2, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant