-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(autoscaling): support default instance warmup for Auto Scaling groups #23285
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditional approval on adding a unit test for the new prop + updating the README
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
@@ -574,6 +574,28 @@ autoScalingGroup.addWarmPool({ | |||
}); | |||
``` | |||
|
|||
### Default Instance Warming | |||
|
|||
You can use the default instance warmup feature to improve the Amazon CloudWatch metrics used for dynamic scaling. When default instance warmup is not enabled, each instance starts contributing usage data to the aggregated metrics as soon as the instance reaches the InService state. However, if you enable default instance warmup, this lets your instances finish warming up before they contribute the usage data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets split these up into different lines for better readability in raw mode.
|
||
// ... | ||
|
||
defaultInstanceWarmup: cdk.Duration.seconds(5), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i'm going to investigate why this succeeded in the first place because it really shouldn't :). but you should know:
these examples are required to be compiling, and can show up in the API documentation as stand-alone examples without the markdown context surrounding it. the way we compile it is to copy/paste the example into ///here
inside the rosetta/default.ts-fixture
file. It's worth taking a look at that file and seeing what I mean, and then updating this example to work inside of there (i.e. we haven't imported cdk
inside the default fixture).
* | ||
* @see https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html | ||
* | ||
* @default None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this what we decided on? if so, I don't like calling the default none. That's not very descriptive for the user, because what does none imply? there's no default instance warmup? or that the value is 0? we can afford to be a bit more descriptive here (and i know we say None
all over the place, but we should hold ourselves to that standard :) ).
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
@Mergifyio refresh |
✅ Pull request refreshed |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…roups (aws#23285) - add support for defaultInstanceWarmup Can read more about defaultInstanceWarmup here: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html Cloudformation previously didn't support this feature in their resource but recently added support. This PR is just to add support for that prop in the construct https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…roups (aws#23285) - add support for defaultInstanceWarmup Can read more about defaultInstanceWarmup here: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html Cloudformation previously didn't support this feature in their resource but recently added support. This PR is just to add support for that prop in the construct https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Can read more about defaultInstanceWarmup here: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html
Cloudformation previously didn't support this feature in their resource but recently added support. This PR is just to add support for that prop in the construct
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html
All Submissions:
Adding new Construct Runtime Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license