users@glassfish.java.net

Re: Avoiding dos

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 28 Oct 2009 12:34:42 -0400

Salut,

Felipe Gaucho wrote:
> If I hold the F5 key for few seconds, my glassfish hangs ... And usually
> gets back to normal in few minutes....

Can you grab a jstack PID to see what's occurring. I suspect the
requests are queued and the 5 default worker threads are just executing
them in the order they arrive. But a lot of them becomes invalid before
the connection gets processed. Usually you shield GF with a load
balancer or firewall to throttle requests attack from a single ip/port.

>
> How to avoid that?

<joke>
Remove the F5 button from you keyboard :-)
</joke>

Either you increase the number of threads so those dump connection gets
closed a little bit faster, or you reduce the request queue but that may
have an impact on normal requests under load.

I can also share a Grizzly extension that can improve a little the
handling of those bogus requests. But that will cost you something next
time we meet @ Devoxx ;-)

A+

-- Jeanfrancois




>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>