vial icon indicating copy to clipboard operation
vial copied to clipboard

Resize thread pool and set TcpStream timeout

Open sigaloid opened this issue 4 years ago • 0 comments

This fixes the trivial attack of slowloris'ing 10 threads and holding them open forever.

  1. the thread count is dynamic (up to 400 threads in my example but that's not a hard limit and depends on use case; it also rescales back down based on demand)
  2. the stream is killed after one second (also depends on use case)

Basically just proposing an idea that the thread pool be resized. :)

sigaloid avatar Oct 20 '21 04:10 sigaloid