Skip to content
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

feat(node-http-handler): configure disableConcurrentStreams in NodeHttp2Handler #2553

Merged
merged 20 commits into from
Jul 9, 2021

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jul 8, 2021

Issue

Fixes: #2550

Description

Adds an option to disableConcurrentStreams in NodeHttp2Handler

Example:

const client = new H2HandlerClient({
  requestHandler: new NodeHttp2Handler({
    disableConcurrentStreams: true
  }),
});

Testing

CI is successful
Verified that TranscribeStreaming works in parallel in demo code https://github.com/trivikr/aws-parallel-transcribe-repro/pull/1


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr requested a review from AllanZhengYP July 8, 2021 04:55
@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@a51c2f4). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2553   +/-   ##
=======================================
  Coverage        ?   60.31%           
=======================================
  Files           ?      513           
  Lines           ?    27377           
  Branches        ?     6582           
=======================================
  Hits            ?    16512           
  Misses          ?    10865           
  Partials        ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a51c2f4...2d1cade. Read the comment docs.

@trivikr trivikr changed the title feat(node-http-handler): add option to disable session cache in NodeHttp2Handler feat(node-http-handler): configure disableConcurrentStreams in NodeHttp2Handler Jul 9, 2021
@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sdk-staging-test
  • Commit ID: 2d1cade
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

expect(connectSpy).toHaveBeenNthCalledWith(1, `${authorityPrefix}:${port}`);
expect(connectSpy).toHaveBeenNthCalledWith(2, `${authorityPrefix}:${port2}`);
mockH2Server2.close();
});
Copy link
Contributor

@AllanZhengYP AllanZhengYP Jul 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another unit test for "is many for same URL but concurrent stream is disabled"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concurrent stream disabled tests are in their own section on line 378.
The section starts with describe("disableConcurrentStreams", () => {

The specific test mentioned is many for same URL but concurrent stream is disabled is called is many if multiple requests are made on same URL, and is on line 402.

Copy link
Contributor

@alexforsyth alexforsyth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I lack the context. i'll wait for @AllanZhengYP to approve

Copy link
Contributor

@AllanZhengYP AllanZhengYP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@trivikr trivikr merged commit 9303bf7 into aws:main Jul 9, 2021
@trivikr trivikr deleted the handler-disable-session-cache branch July 9, 2021 16:25
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an option to disable session cache in NodeHttp2Handler
5 participants