vial
vial copied to clipboard
Resize thread pool and set TcpStream timeout
This fixes the trivial attack of slowloris'ing 10 threads and holding them open forever.
- 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)
- the stream is killed after one second (also depends on use case)
Basically just proposing an idea that the thread pool be resized. :)