<div dir="ltr">Hi Stuart,<div><br></div><div>Thanks for the prompt reply. I am developing a critical high-performance web server and I am unsure whether I could hit the issue of many connections sitting in TIME_WAIT state or not (I came across it through a wrongly designed benchmark), I know this could happen under different obscure scenarios but it mostly doesn&#39;t if things are more or less correct... I just wanted to be on the safe side to be able to set SO_LINGER to 0 if I ever need to.</div><div><br></div><div>For 2), I gave it a try and it seems to work, I see the semantics are similar to those of DoSFilter in Jetty: it rate-limits the number of requests per active connection, not overall. Except that there is a &quot;pending&quot; queue. What I like from the DoSFilter in Jetty is that it can also kill active requests if they take more than a certain number of milliseconds, is there something in Undertow like that or how would you implement it?</div><div><br></div><div>Thanks,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 30, 2016 at 10:23 PM, Stuart Douglas <span dir="ltr">&lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">1) Why do you need to set this? In general Undertow won&#39;t close the<br>
socket until all messages have been sent anyway.<br>
<br>
2) Do you mean limit the number of active requests, or limit the<br>
number of bytes per second that can be sent?<br>
<br>
io.undertow.server.handlers.<wbr>RequestLimitingHandler can limit the<br>
number of active requests, while<br>
io.undertow.server.handlers.<wbr>ResponseRateLimitingHandler can be used to<br>
limit the rate data is sent on a connection.<br>
<br>
Stuart<br>
<div><div class="h5"><br>
On Wed, Nov 30, 2016 at 9:53 PM, Pere Ferrera &lt;<a href="mailto:ferrerabertran@gmail.com">ferrerabertran@gmail.com</a>&gt; wrote:<br>
&gt; Hi there,<br>
&gt; I have two questions: 1) How can I configure the underlying socket parameter<br>
&gt; SO_LINGER using the Undertow API ? and 2) Is there something that I can use<br>
&gt; to rate-limit requests issued to an Undertow server ? (something similar to<br>
&gt; the DoS Filter in Jetty)<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; undertow-dev mailing list<br>
&gt; <a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
&gt; <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>