How to limit post or get speed #8439
diandengshi
started this conversation in
General
Replies: 1 comment
|
Looking at aiolimiter docs, I think it was ever supposed to work like that. The limiter controls how often you can enter a limited region; not any particular IO bandwidth or anything that happens within the region itself. In the code you posted there is no loop, meaning you'd only read a single chunk of Instead, you could limit how often chunks are read/written. You'd use a loop, and inside that loop put the AsyncLimiter region, and only then inside the limited region read a chunk. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I imagine limiting the speed of uploading or downloading files using get and post when my internet environment is not good.
Just like how aioftp provides read_speed_limit and writes_speed_limit parameters to limit bandwidth.
AsyncLimiter not limit speed
All reactions