You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwhisk.apache.org by Michele Sciabarra <mi...@sciabarra.com> on 2018/10/29 11:06:45 UTC

A question about concurrency in OpenWhisk

I would like to understand a bit more how concurrency is handled by the Invoker.

If there are, say, 2 concurrent requests, can the invoker send the second request to the same runtime BEFORE it has completed the first request? I have seen some tests related in the nodejs runtime but none in the basic tests.

Also, Carlos mentioned the need to increase the concurrency in the same runtime. It can be done but I need to know the requirements. So far I assumed that until a request is not completed, the invoker will spawn another runtime to serve them. 



-- 
  Michele Sciabarra
  michele@sciabarra.com

Re: A question about concurrency in OpenWhisk

Posted by Michele Sciabarra <mi...@sciabarra.com>.
Ok so my assumption is correct and we can release the runtime. 
The runtime can be extended to handle a pool of underlying action distributing the requests to the available handler. There will be separated channels for each action, without overlap.  In the current shape with concurrent actions there can be an "out-of-band" behavior.

-- 
  Michele Sciabarra
  michele@sciabarra.com

----- Original message -----
From: Rodric Rabbah <ro...@gmail.com>
To: dev@openwhisk.apache.org
Subject: Re: A question about concurrency in OpenWhisk
Date: Mon, 29 Oct 2018 07:09:02 -0400

Today there is at most one activation at a time per container we. A PR from Tyson will allow a runtime to opt into intro container concurrency and so the invoker will send up to N  invocations to that the container when possible.

https://github.com/apache/incubator-openwhisk/pull/2795

-r

> On Oct 29, 2018, at 7:06 AM, Michele Sciabarra <mi...@sciabarra.com> wrote:
> 
> I would like to understand a bit more how concurrency is handled by the Invoker.
> 
> If there are, say, 2 concurrent requests, can the invoker send the second request to the same runtime BEFORE it has completed the first request? I have seen some tests related in the nodejs runtime but none in the basic tests.
> 
> Also, Carlos mentioned the need to increase the concurrency in the same runtime. It can be done but I need to know the requirements. So far I assumed that until a request is not completed, the invoker will spawn another runtime to serve them. 
> 
> 
> 
> -- 
>  Michele Sciabarra
>  michele@sciabarra.com

Re: A question about concurrency in OpenWhisk

Posted by Rodric Rabbah <ro...@gmail.com>.
Today there is at most one activation at a time per container we. A PR from Tyson will allow a runtime to opt into intro container concurrency and so the invoker will send up to N  invocations to that the container when possible.

https://github.com/apache/incubator-openwhisk/pull/2795

-r

> On Oct 29, 2018, at 7:06 AM, Michele Sciabarra <mi...@sciabarra.com> wrote:
> 
> I would like to understand a bit more how concurrency is handled by the Invoker.
> 
> If there are, say, 2 concurrent requests, can the invoker send the second request to the same runtime BEFORE it has completed the first request? I have seen some tests related in the nodejs runtime but none in the basic tests.
> 
> Also, Carlos mentioned the need to increase the concurrency in the same runtime. It can be done but I need to know the requirements. So far I assumed that until a request is not completed, the invoker will spawn another runtime to serve them. 
> 
> 
> 
> -- 
>  Michele Sciabarra
>  michele@sciabarra.com