<div dir="ltr">I&#39;m not positive but I believe you need to look into the AcceptingChannel. See the bound AcceptingChannel for HTTP here.<div><a href="https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/Undertow.java#L192">https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/Undertow.java#L192</a><br></div><div><br></div><div>Digging a little further you find NioXnioWorker.createTcpConnectionServer</div><div><a href="https://github.com/xnio/xnio/blob/3.x/nio-impl/src/main/java/org/xnio/nio/NioXnioWorker.java#L177">https://github.com/xnio/xnio/blob/3.x/nio-impl/src/main/java/org/xnio/nio/NioXnioWorker.java#L177</a><br></div><div><br></div><div>Notice the backlog option. The Javadoc from ServerSocker.bind</div><div><br></div><div><div>* The {@code backlog} argument is the requested maximum number of</div><div>     * pending connections on the socket. Its exact semantics are implementation</div><div>     * specific. In particular, an implementation may impose a maximum length</div><div>     * or may choose to ignore the parameter altogther. The value provided</div><div>     * should be greater than {@code 0}. If it is less than or equal to</div><div>     * {@code 0}, then an implementation specific default will be used.</div><div>     * @param   endpoint        The IP address and port number to bind to.</div><div>     * @param   backlog         requested maximum length of the queue of</div><div>     *                          incoming connections.</div></div><div><br></div><div>So depending on the implementation it may or may not queue.</div><div><br></div><div>Then back to Undertow you can find</div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;background-color:rgb(255,251,221);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">.set(</span><span class="gmail-pl-smi" style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Options</span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">.</span>BACKLOG</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;background-color:rgb(255,251,221);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">, </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">1000</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;background-color:rgb(255,251,221);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">)</span><br></div><div><a href="https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/Undertow.java#L138">https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/Undertow.java#L138</a><br></div><div><br></div><div>So it defaults to a queue size of 1000 as long as the underlying implementation supports it. You can configure it with the BACKLOG option.</div><div><br></div><div>Bill</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 22, 2018 at 12:04 AM, Brad Wood <span dir="ltr">&lt;<a href="mailto:bdw429s@gmail.com" target="_blank">bdw429s@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I&#39;m looking for a bit of understanding on just how Undertow handles large numbers of requests coming into a server.  Specifically when more requests are being sent in than are being completed.  I&#39;ve been doing some load testing on a CFML app (Lucee Server) where I happen to have my io-threads set to 4 and my worker-threads set to 150.  I&#39;m using a monitoring tool (FusionReactor) that shows me the number of currently executing threads at my app and under heavy load I see exact 150 running HTTP threads in my app server, which makes sense since I have 150 worker threads.  I&#39;m assuming here that I can&#39;t simultaneously process more requests than I have worker threads (please correct if I&#39;m off there)  <br></div><div><br></div><div>So assuming I&#39;m thinking that through correctly, what happens to additional requests that are coming into the server at that point?  I assume they are being queued somewhere, but</div><div><ul><li>What is this queue?</li><li>How do I monitor it?</li><li>How big can it get?</li><li>Where do I change the size?</li><li>How long do things stay in there before sending back an error to the HTTP client?</li><li>Can I control what error comes back to the HTTP client in that scenario?</li><li>If I&#39;m using an HTTP/S and AJP listener, do they all share the same settings?  Do they share the same queues?</li></ul></div><div>I&#39;ve done a bit of Googling and reviewed some docs but haven&#39;t quite found any definitive information on this, and a lot of info I found was about Wildfly specifically so I wasn&#39;t sure how much of it applied.  </div><br clear="all"><div><div class="m_-5881574417491759043gmail_signature"><div dir="ltr"><div><div dir="ltr"><div></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" target="_blank">http://www.codersrevolution.<wbr>com</a></div><div><br></div></div></div></div></div></div>
</div>
<br>______________________________<wbr>_________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/undertow-dev</a><br></blockquote></div><br></div>