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(autoscaling): support warm pools #19214

Merged
merged 6 commits into from Mar 23, 2022
Merged

feat(autoscaling): support warm pools #19214

merged 6 commits into from Mar 23, 2022

Conversation

jungseoklee
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Summary

This PR adds an interface to create a warm pool easily, which gives an ability to decrease latency for applications that have exceptionally long boot times: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html

Test

  • Run unit test and integration test.
PASS test/warm-pool.test.js
...
=============================== Coverage summary ===============================
Statements   : 93.22% ( 413/443 )
Branches     : 87% ( 288/331 )
Functions    : 93.39% ( 99/106 )
Lines        : 92.95% ( 396/426 )
================================================================================
...
Verifying integ.warm-pool.js against integ.warm-pool.expected.json ... OK.
...

Notes

@gitpod-io
Copy link

gitpod-io bot commented Mar 2, 2022

@github-actions github-actions bot added the @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling label Mar 2, 2022
@jungseoklee
Copy link
Contributor Author

Here are changes since the first revision:

  • Added document link on hibernation prerequisites.
  • Rebased on top of the latest HEAD of master branch.

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Hi @jungseoklee, this looks like a good start. A few preliminary comments for my first iteration.

packages/@aws-cdk/aws-autoscaling/lib/warm-pool.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-autoscaling/lib/warm-pool.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-autoscaling/lib/warm-pool.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-autoscaling/lib/warm-pool.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-autoscaling/lib/warm-pool.ts Outdated Show resolved Hide resolved
@kaizencc kaizencc added p1 feature-request A feature should be added or improved. labels Mar 15, 2022
@kaizencc kaizencc assigned kaizencc and unassigned comcalvi Mar 15, 2022
@jungseoklee
Copy link
Contributor Author

Hi @jungseoklee, this looks like a good start. A few preliminary comments for my first iteration.

Thanks for all comments!

@kaizencc kaizencc changed the title feat(aws-autoscaling): support a warm pool feat(autoscaling): support warm pools Mar 16, 2022
This patch adds an interface to create a warm pool easily.
@mergify mergify bot dismissed kaizencc’s stale review March 22, 2022 18:32

Pull request has been modified.

@jungseoklee
Copy link
Contributor Author

The PR Linter failure is related to this commit. Could CDK maintainer check if the following regex is correct?

/^integ.*.ts$/

Do we need to change regex as below because of file path?

/integ.*.ts$/

@jungseoklee
Copy link
Contributor Author

Here are changes since the second revision:

  • Addressed comments from Kaizen.
  • Rebased on top of the latest HEAD of master branch.

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

@jungseoklee This is almost good to go. I will update the defaults myself, but leave the conversation about minSize and poolState up for you to see/discuss.

Re: pr-linter, looks like we changed it already so it should be correct when we merge from master.

packages/@aws-cdk/aws-autoscaling/lib/warm-pool.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-autoscaling/lib/warm-pool.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-autoscaling/lib/warm-pool.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-autoscaling/lib/warm-pool.ts Outdated Show resolved Hide resolved
@mergify mergify bot dismissed kaizencc’s stale review March 23, 2022 16:42

Pull request has been modified.

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Thanks @jungseoklee!

@jungseoklee
Copy link
Contributor Author

Thanks @jungseoklee!

Thanks for reviewing the PR, @kaizen3031593 !

@mergify
Copy link
Contributor

mergify bot commented Mar 23, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: a1b1628
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 737e611 into aws:master Mar 23, 2022
@mergify
Copy link
Contributor

mergify bot commented Mar 23, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

StevePotter pushed a commit to StevePotter/aws-cdk that referenced this pull request Apr 27, 2022
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*

### Summary

This PR adds an interface to create a warm pool easily, which gives an ability to decrease latency for applications that have exceptionally long boot times: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html

### Test

- Run unit test and integration test.
```
PASS test/warm-pool.test.js
...
=============================== Coverage summary ===============================
Statements   : 93.22% ( 413/443 )
Branches     : 87% ( 288/331 )
Functions    : 93.39% ( 99/106 )
Lines        : 92.95% ( 396/426 )
================================================================================
...
Verifying integ.warm-pool.js against integ.warm-pool.expected.json ... OK.
...
```

### Notes
- I borrowed description from [AWS public doc](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PutWarmPool.html) for docstring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants