|
I created a filter to throttle reads. The default per-connection 1mb buffer may/probably is too large.. suggestions welcome.
The filter wraps the ThreadPoolFilter (just adds itself before + after) I think 1 mega bytes are a little bit more than much. Probably we could set it to about the default socket read buffer size in Linux. Perhaps with an extra room like 50%? WDYT?
We still need to take care of write overflow and more convenient way to prevent OutOfMemoryError, but Peter's patch at least solves the situation when the server is overloaded. I'd like to mark this issue as resolved and provide another issue for the remaining problems.
It is resolved not in 1.0.1 but in 1.0 by Peter Royal.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
* configure size of read buffer and automatically disable reads once the buffer is full
* buffer would be a filter that is inserted *before* the ThreadPoolFilter
* this eliminates the complexities of tracking things in greater detail and all the goop from the thread pool
* writes still tbd, one thought is to block the write, but that has implications if no thread pool filter is in use