Skip to content
This repository was archived by the owner on Jul 11, 2024. It is now read-only.

Conversation

@JadTermsani
Copy link
Member

Added serverless-plugin-warmup that replaces the old warmup config

@JadTermsani JadTermsani requested a review from adampash April 4, 2019 10:37
@JadTermsani JadTermsani self-assigned this Apr 4, 2019
@adampash
Copy link
Contributor

adampash commented Apr 5, 2019

Do we need to any any configuration to set this to work out of the box? I know their repo has a lot of custom config, but are there defaults? Can you dig in more and add what you learn to the README, replacing, where relevant, what we currently have re: running warm in the readme?

@JadTermsani
Copy link
Member Author

@adampash yes sure, the configs I put are the ones needed so that this setup is identical to the old setup. They have a lot of options that users can configure and I inserted the link

enabled: true
- schedule: rate(5 minutes)
prewarm: true
concurrency: 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add some explanatory text here. E.g., does this just warm all your lambdas now?

If so, maybe text like:

The above config would keep all of your deployed lambda functions running warm. The prewarm flag will ensure your function is warmed immediately after deploys (so you don't have to wait five minutes for the first scheduled event). And by setting the concurrency to 2, we're keeping two instances warm for each deployed function.

I don't know if the above is correct, so can you verify?

Also it's worth pointing out that custom is for setting project-wide warmup behaviors, but you can set per-function behavior by setting config under a warmup key.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is all correct!

serverless.yml Outdated
events:
- schedule: rate(5 minutes)
prewarm: true
concurrency: 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep the default concurrency at 1, but leave it here, since it's a common one they may want to adjust.

Copy link
Contributor

@adampash adampash left a comment

Choose a reason for hiding this comment

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

👍

@JadTermsani JadTermsani merged commit bd8d4f6 into master Apr 15, 2019
@JadTermsani JadTermsani deleted the feat-add-warmup-plugin branch April 15, 2019 09:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants