[undertow-dev] two questions

Pere Ferrera ferrerabertran at gmail.com
Thu Dec 1 04:37:51 EST 2016


Hi Stuart,

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'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.

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
"pending" 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?

Thanks,

On Wed, Nov 30, 2016 at 10:23 PM, Stuart Douglas <sdouglas at redhat.com>
wrote:

> 1) Why do you need to set this? In general Undertow won't close the
> socket until all messages have been sent anyway.
>
> 2) Do you mean limit the number of active requests, or limit the
> number of bytes per second that can be sent?
>
> io.undertow.server.handlers.RequestLimitingHandler can limit the
> number of active requests, while
> io.undertow.server.handlers.ResponseRateLimitingHandler can be used to
> limit the rate data is sent on a connection.
>
> Stuart
>
> On Wed, Nov 30, 2016 at 9:53 PM, Pere Ferrera <ferrerabertran at gmail.com>
> wrote:
> > Hi there,
> > I have two questions: 1) How can I configure the underlying socket
> parameter
> > SO_LINGER using the Undertow API ? and 2) Is there something that I can
> use
> > to rate-limit requests issued to an Undertow server ? (something similar
> to
> > the DoS Filter in Jetty)
> >
> > Thanks,
> >
> > _______________________________________________
> > undertow-dev mailing list
> > undertow-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/undertow-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20161201/e86c6a86/attachment-0001.html 


More information about the undertow-dev mailing list