users@grizzly.java.net

DoS prevention [was Re: Quickest way to kill a connection]

From: Alan Williamson <alan_at_blog-city.com>
Date: Fri, 30 Nov 2007 16:04:02 +0000

> OK can you try the following. Download the following jars:
>
> http://weblogs.java.net/blog/jfarcand/archive/DosTest.zip
>
> This is the Grizzly WebServer. I've set the default timeout to 5000. I
> start the server with:
>
> java -jar http-1.6-SNAPSHOT.jar 8080 /var/www/
>
> Then I'm doing:
>
>
>> [ja120114_at_localhost grizzly]$ telnet localhost 8080
>> Trying 127.0.0.1...
>> Connected to localhost.
>> Escape character is '^]'.
>> aaaa
>> aaaa
>
> The 5000 seems to work. Could it be an issue with your implementation?

Thanks ... okay we are getting close.

This particular example does work. HOWEVR ... i can open up a
connection and send NOTHING to it, and it sits there for ages. Well
past the 5second mark. It's as soon as i send the first character does
the timer actually kick in.

make sense?