> So, in a scenario where the number of concurrent requests exceeds this
value, the requests are queued, right ?

I don't know if that's correct. I'd have to dig into the Tomcat code and
check (I'd probably want to test it as well).

> new request is rejected with a 503 status code

The server would have to accept (process) the request in order to return a
response code.

What I've normally seen is people put a load balancer or proxy in front of
Tomcat / TomEE. If that proxy isn't able to get a connection accepted, it
would try another node (if there is one), or the proxy itself would return
a 503.

I'll try and find some time to double-check for you, but the use-case
sounds unusual to me - accepting requests and putting them in a queue in a
busy/overloaded system doesn't sound like a good way to get the best
throughput.

If you have a sample config and test case, that would help.

Jon

On Thu, Oct 24, 2019 at 8:21 AM COURTAULT Francois <
francois.courta...@thalesgroup.com> wrote:

> Hello,
>
> Any suggestion/answer regarding the questions I asked ?
>
> Best Regards.
>
> From: COURTAULT Francois
> Sent: jeudi 17 octobre 2019 15:44
> To: users@tomee.apache.org
> Subject: Is there a way to control the max number of requests in the queue
> ?
>
> Hello everyone,
>
> In TomEE/Tomcat, there is a way to control the max number of parallel
> requests by setting maxThreads attribute value in Executor.
>
> So, in a scenario where the number of concurrent requests exceeds this
> value, the requests are queued, right ?
> Is there a way to control the size of this queue so that if the number of
> requests (the ones in // plus we reach the max size of this queue),  any
> new request is rejected with a 503 status code ?
>
> Best Regards.
>
>
>
> ________________________________
> This message and any attachments are intended solely for the addressees
> and may contain confidential information. Any unauthorized use or
> disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for
> the message if altered, changed or falsified. If you are not the intended
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission
> free from viruses, the sender will not be liable for damages caused by a
> transmitted virus.
>

Reply via email to