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

Add an option to disable session cache in NodeHttp2Handler #2550

Closed
trivikr opened this issue Jul 7, 2021 · 1 comment · Fixed by #2553
Closed

Add an option to disable session cache in NodeHttp2Handler #2550

trivikr opened this issue Jul 7, 2021 · 1 comment · Fixed by #2553
Labels
feature-request New feature or enhancement. May require GitHub community feedback.

Comments

@trivikr
Copy link
Member

trivikr commented Jul 7, 2021

Is your feature request related to a problem? Please describe.

The services which support Http2 streaming might limit max concurrent connections on the server side. This leads to an error being thrown if concurrent requests more than maxConcurrentConnections are created on the client side which share an HTTP2 session.

The issue with AWS Transcribe Streaming is explained in repo https://github.com/jjtindale/aws-parallel-transcribe-repro
The error thrown in Node.js with concurrent requests more than maxConcurrentConnections is explained in https://github.com/trivikr/node-http2-parallel-requests-on-session

Describe the solution you'd like

Add an option to disable session cache in NodeHttp2Handler. This would ensure that a new session is created for every request.

For example:

const client = new TranscribeStreamingClient({
  requestHandler: new NodeHttp2Handler({
    disableSessionCache: true
  }),
});

Describe alternatives you've considered

Write my own Http2Handler which does not share ClientHttp2Sessions between requests.

@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
feature-request New feature or enhancement. May require GitHub community feedback.
Projects
None yet
1 participant