Summary

DoS protection support for spiffy

Metadata

Description

Some tips Brian Mastenbrook gave on #scheme. I'm pasting them here in case we want a DoS protection module for spiffy someday. Here are the relevant parts:

 <chandler> mario-goulart: I think a sufficient approach would be to
 	   (a) limit the number of active connections, (b) kill
 	   connections according to a least-recently-transmitted
 	   policy, and (c) set a timeout for connections in the
 	   receiving headers phase, and another timeout for sending
 	   data.
 
 <mario-goulart> chandler: wouldn't (c) mess up with things like comet
 		and long live connection intentionally requested to
 		avoid the multiple requests overhead?
 
 <chandler> If the server is blocking before responding to a request,
            don't time out.
 
 <chandler> But the client shouldn't be allowed to connect or start
 	   sending a request and then block indefinitely before
 	   finishing sending headers.
 
 <chandler> mario-goulart: Furthermore, if the server has data to send
 	   to the client but hasn't actually been able to send it for
 	   several seconds, the connection should be terminated as
 	   well.

Changes and comments

[2010-08-02 14:45:02 UTC] felix removed milestone 4.6.0

[2011-02-19 19:08:29 UTC] sjamaan changed status from new to assigned

[2011-02-19 19:08:29 UTC] sjamaan set owner to sjamaan

[2011-07-13 20:32:21 UTC] sjamaan wrote:

Are there good ways to test something like this? How do you know what is sane behaviour? If someone initiates a DDoS attack, this shouldn't start semi-randomly killing existing connections of real users.

[2011-09-23 21:11:31 UTC] sjamaan changed status from assigned to closed

[2011-09-23 21:11:31 UTC] sjamaan set resolution to wontfix

[2011-09-23 21:11:31 UTC] sjamaan wrote:

Closing this since I have absolutely no clue how to fix this. If you have a concrete test or patch, please reopen.