<div dir="auto">Hi Stuart,<div dir="auto"><br></div><div dir="auto">Request limit might be insufficient, could you share how to implement the custom handler and possibly how to deploy this custom handler to Wildfly ?</div><div dir="auto"><br></div><div dir="auto">Regards,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 23, 2016 04:36, &quot;Stuart Douglas&quot; &lt;<a href="mailto:sdouglas@redhat.com">sdouglas@redhat.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>You would need to write a custom handler to set the thread pool if you want to do this in Wildfly, however if you just want to limit the number of active requests in a given path you may want to just use the request limiting handler instead.<br><br></div>In WEB-INF/undertow-handlers.conf try adding something like the following:<br><br></div>path-prefix(/mypath) -&gt; request-limit(10)<br><br></div>This will limit the number of requests that can be active in /mypath/* to 10.<br><br></div><div>If you actually need to use a thread pool and the request limit is not sufficient let me know and I can point you in the right direction.<br></div><div><br></div>Stuart<br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 23, 2016 at 12:07 AM, Bill O&#39;Neil <span dir="ltr">&lt;<a href="mailto:bill@dartalley.com" target="_blank">bill@dartalley.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">I only use undertow directly I haven&#39;t looked at Wildfly before so I won&#39;t be able to answer your question sorry.</div><div class="m_573358623559659959HOEnZb"><div class="m_573358623559659959h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 22, 2016 at 7:55 AM, tone randomnaja <span dir="ltr">&lt;<a href="mailto:randomnaja@gmail.com" target="_blank">randomnaja@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">Thanks,<div><br></div><div>And let&#39;s say if I had custom executor, how could I set the DispatchExecutor ? (from Wildfly point-of-view)</div><div>Could it be another module being placed inside system lib of Wildfly ? </div><div><br></div><div>ps. I&#39;m pretty sure, I&#39;d not have done this within Application (EAR/WAR) itself ?</div></div><div class="m_573358623559659959m_3172011128053046883HOEnZb"><div class="m_573358623559659959m_3172011128053046883h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 22, 2016 at 6:43 PM, Bill O&#39;Neil <span dir="ltr">&lt;<a href="mailto:bill@dartalley.com" target="_blank">bill@dartalley.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">This might be what you are looking for.<div><br></div><div><a href="https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/server/HttpServerExchange.java#L821" target="_blank">https://github.com/undertow-io<wbr>/undertow/blob/master/core/src<wbr>/main/java/io/undertow/server/<wbr>HttpServerExchange.java#L821</a><br></div><div><br></div><div>You can change the dispatch executor to your own custom executor before you call dispatch. This will allow you to have different worker pools and configure them per HttpHandler.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 22, 2016 at 6:16 AM, tone randomnaja <span dir="ltr">&lt;<a href="mailto:randomnaja@gmail.com" target="_blank">randomnaja@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"><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px">Hi there !</span><br><div><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px">Undertow has `</span><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px">IO Thread` and `Worker Thread` configuration (</span><font face="consolas, lucida console, monospace" color="#000000">&lt;subsystem xmlns=&quot;urn:jboss:domain:io:1.1<wbr>&quot;&gt;&lt;worker name=&quot;default&quot;.....</font><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px">) which could be bounded per Listener (</span><font face="consolas, lucida console, monospace" color="#000000">&lt;http-listener....</font><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px">).</span></div><div><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px">In my case I have 1 Listenner (AJP) and 1 Application (EAR),</span><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px">I&#39;d like to be able to priority and manage Worker Thread base on some preferences, </span><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px">such as URL path.</span><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:consolas,&#39;lucida console&#39;,monospace;font-size:13px"><br></span></div><div><font face="consolas, lucida console, monospace" color="#000000">Above for a reason of controlling the load of specific URL (under the same Web Context).</font></div><div><font face="consolas, lucida console, monospace" color="#000000"><br></font></div><div><font face="consolas, lucida console, monospace" color="#000000">Any suggestions or ideas ?</font></div></div>
<br>______________________________<wbr>_________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">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/mailma<wbr>n/listinfo/undertow-dev</a><br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">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/mailma<wbr>n/listinfo/undertow-dev</a><br></blockquote></div><br></div>
</blockquote></div></div>