tysonnorris commented on pull request #4978:
URL: https://github.com/apache/openwhisk/pull/4978#issuecomment-693681340


   Thanks for this! 
   
   I think there is already some handling of the `runBuffer` to coerce it to 
"preserve order until the activation can be run". see 
https://github.com/apache/openwhisk/blob/39131e2cde5f30ecb331f06c47e2b70129b2aa3c/core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala#L124
   
   So you can check `isResentFromBuffer` and skip (re)enqueuing if there is no 
ability to run the activation immediately. 
   
   Separately, there will probably need to be additional special handling for 
concurrent actions - where actions can support concurrency within the 
container. If ContainerPool receives 2000 activations for an action that 
supports concurrency=200, a maximum of 10 containers (maybe less, if some were 
already running) should be launched. Since an activation shows up in the pool 
processing multiple times, each would have to be tracked as "already affected a 
container launch" to prevent a container launch on second (and subsequent) 
passes. If you enable concurrency in your containers, this is simpler, but has 
some caveats (not all runtimes/actions can support this), and is currently 
buffered inside the ContainerProxy instance for that container (with the 
waiting problem that you mention). 
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to