-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Applying backpressure to over-eager pipelining clients #1368
Comments
I am planing to work on this task Sent from my iPhone
|
any news about that? |
we need champion for this issue. fix is relatively simple. |
Some useful configuration parameters:
|
first two points are implemented on aiohttp.web level, other points are not related to this issue. |
We are going to make every write an async function. |
we just need to limit number of in-flight requests |
The issue is fixed in aiohttp 3.x line. |
Long story short
Asyncio seems to continue reading and buffering incoming requests from a client, even while it's still handling the previous request. This is weird and a mild DoS problem, since a client can trivially cause aiohttp's receive buffer to grow to unbounded size.
Expected behaviour
If I try to send lots of requests at an aiohttp server then it should buffer a small amount and then apply backpressure to me.
Actual behaviour
It just queues up requests indefinitely.
Steps to reproduce
Point this client at an aiohttp server:
Ideally after some time the number of requests sent should stop increasing because
sock.sendall
starts blocking, and the aiohttp server's memory usage should stop increasing.The text was updated successfully, but these errors were encountered: