-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
Respect remote concurrency limit #280
base: master
Are you sure you want to change the base?
Respect remote concurrency limit #280
Conversation
dc05819
to
9a3d21d
Compare
I agree the retry logic should be done in the client because it is the most adequate to decide what to do about it. Some requests must go through whatever the cost, some can be dropped. Backoff strategies may differ. Gun usage with sync/async may differ. |
@essen so you agree with this PR, returning an error? Then gun respects the RFC and doesn't go over the limit. What's left to do AFAICT is to the get the corresponding PR for cowlib merged, use the upstream cowlib again (and remove some debug stuff I accidentally committed). |
I need to think a little more about it. I think the error returned should be specific, not |
Changed the error to |
aee79ee
to
25f84f4
Compare
Bump. This one in 2.0? |
If I have time. I want 2.0 to be out before next year so I am focusing on what potentially break the interface. |
Ping. This one is ready for review too. The merge conflict is for the temporary dependency of a cowlib branch which this PR depends on, in Makefile and rebar.config, e.g.
No point resolving before the cowlib PR is merged, right? |
No need. I'm planning to go over the PRs later this week. |
If the limit has been reached, new requests are failed immediately, so that the application can retry them on a different connection.
112a328
to
639bafa
Compare
Rebased. |
Hej @essen, |
I will go over pending PRs and tickets in the coming weeks now that the HTTP/3 work has been merged. I would like to merge most of them. I don't have a timeline for a release at this time though. Gun has a few CI failures that would be good to address before then, if you're looking for something to do, see my comment at #319 (comment) This and other PRs will likely need a rebase as well. |
try | ||
{ok, ConnPid} = gun:open("localhost", Port, #{protocols => [http2]}), | ||
{ok, http2} = gun:await_up(ConnPid), | ||
StreamRef1 = gun:get(ConnPid, "/delayed"), |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
If the number of streams has reached the server setting MAX_CONCURRENT_STREAMS, new requests result in a stream error too_many_streams. This allows the user to handle the situation, e.g. to retry the request later or to send it on a different connection. Depends on ninenines/cowlib#123 which is included in: https://github.com/Nordix/cowlib/releases/tag/2.13.0-nordix1 Merged PR: ninenines#280
If the number of streams has reached the server setting MAX_CONCURRENT_STREAMS, new requests result in a stream error
too_many_streams
.This allows the user to handle the situation, e.g. to retry the request later or to send it on a different connection.
Depends on: ninenines/cowlib#123