-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Reactive prewarm pool #4725
Comments
It reminds me of this: Since it is related to "estimation", it is highly likely related to machine learning. |
Yes agree this is similar idea. The differences I would say are:
|
In a simple initial version this might be something like:
In addition, startup behavior may be worth changing as well (to avoid starting a bunch of prewarms, just to delete them on TTL), by changing the manifest to use "initCount" and "maxCount" instead of "count" - to set an invoker startup config, and a cap on number of prewarm containers that are allowed over time. |
Feature suggestion: Instead of prewarm config being statically defined at deployment, make the pool behavior reactive to load. This may be more applicable to cluster managed resources (mesos/k8s/yarn) where each invoker is not restricted to local resources for launching actions.
Since reliance on prewarm containers is a key point in improving performance, we should consider ways to keep as many as possible "cold start" containers in the "prewarm" workflow.
As an example, in current implementation where a fixed number of prewarms is launched at start, and the prewarm pool is replenished each time one is taken for use:
Doing this once for a burst of traffic may be an anomaly, but if it is a pattern every few minutes, we can easily begin to see that we often run at a deficit of prewarms.
It would be nice to allow operators to define rules around prewarms like:
So that if there are 2 consecutive 1 minute periods where number of prewarm "miss" (aka cold starts) for 256MB nodejs:10 activations exceed 4, then 3 additional prewarms are added to the system.
We would also need some form of "prewarm idle release" process, similar to the existing idle timeout, to reduce the number of prewarms if they get to a state of being unused.
The text was updated successfully, but these errors were encountered: