-
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
Change prewarm container #4225
Change prewarm container #4225
Conversation
fbbaaf3
to
56486a0
Compare
Thanks for the contribution. This looks like the inception of an active admin interface into the invoker, correct? If so, I think we need a broader discussion on how to achieve that and for this case specifically: Do we want different invokers with different prewarming settings? Manipulating a single invoker in this case results in a divergence to the global configuration. If that invoker restarts, what happens? My gut-feeling in this case is that you'd want a propagation mechanism to roll out a new config to all invokers on the fly. I think this warrants a discussion on the dev-list. |
Codecov Report
@@ Coverage Diff @@
## master #4225 +/- ##
=========================================
- Coverage 84.64% 80.2% -4.44%
=========================================
Files 156 157 +1
Lines 7475 7588 +113
Branches 489 499 +10
=========================================
- Hits 6327 6086 -241
- Misses 1148 1502 +354
Continue to review full report at Codecov.
|
@ningyougang thank you for this contribution --- having an "admin" interface to the controller and invoker has been something we've been missing. I do think this warrants a bit of discussion. It's possible as Markus notes that you can get divergent invokers - I'd imagine one would rolls this out by running some script or playbook to update multiple invokers. A restart doesn't affect correctness, just performance... note however it is possible to have different runtime manifests which could lead to different functional behaviors (if you exclude a runtime entirely from the manifest, then actions allocated to that invoker will fail to run). I can think of different ways to also approach this - say via the existing protocols for communication between the load balancer and the invokers. In particular, if admin changes were front-doored by the controller, you can keep the manifest consistent in the system. Although you might be deliberately thinking of having a heterogenous mix of stem cells. This is great to see prototyped and give us something concrete to evaluate and discuss. |
BackgroundI think openwhisk needs some operation tools(page or API) to admin, for example:
here, we just discuss Requirements
Question?
If invoker restarts, the invoker will read the global runtime.json to create prewarm container( the extra adding prewarm container will be gone, because the invoker can't remember its previous state) |
IMHO with regard to the admin API, I have been requested from users that they want to see the real-time status of their invocation. I think we need to track the invocation status for each users in the future.(Though there could be some differences because invocation duration can be short.) One more point is what @ningyougang said. |
And one of my collegues who is public cloud operator said, he noticed that invocation pattern of each runtimes changes over time. For example, python actions mostly invoked during the morning, PHP actions are invoked during the evening and so on. Also invocation patterns change based on the social events such as big conferences, world cup, big news and so on. He is thinking of dynamically changing the prewarm configuration based on the request pattern prediction with machine learning to minimize cold start. I think this feature can be provided outside of OW and per-invoker or per-controller API would be a good building block for this. |
56486a0
to
9ee745b
Compare
- Add prewarm container - Delete prewarm container - Add test case
9ee745b
to
36ceff8
Compare
I aready added the logic of |
Use another pr: #4790 |
Sometimes, the operator wants to add/delete prewarm container to invoker dynamically
For example: under some condition, operator can add the extra runtime perwarm container number(or reduce the number) in advance.
Description
Related issue and scope
My changes affect the following components
Types of changes
Checklist: