-
Notifications
You must be signed in to change notification settings - Fork 619
chore(client-kinesis): switch to H2 handler #3577
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
Conversation
...-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddHttp2Dependency.java
Show resolved
Hide resolved
c157f2a
to
1de63ee
Compare
1de63ee
to
27c1e1b
Compare
@AllanZhengYP After about an hour I'm hitting tons of errors "The session has been destroyed" when using this update with Kinesis. Looks like its tearing down and not reconnecting? edit: |
Reproduces on Node 16 @ Heroku for me too. |
@AllanZhengYP I removed elastic apm as a test and this occured, its some defect in the http2 handling.
|
Me and @up73k resolved that problem via using |
@AllanZhengYP not sure on the trace, the 3602 one looks parsed to me. In terms of observations, nothing useful, we have a fairly busy system and it for sure takes a few minutes (as few as 30 I have seen but never seems to be more then an hour) before it starts erroring. Once that http2 session is in an errored state, all comms to kinesis stop and its 100% errors only at that point until container restart. We are using pretty standard node:lts-slim (aka node 16.15.0) containers in fargate this is running in, and nothing really special code wise. |
This reverts commit 3fd2747.
@AllanZhengYP just looking at the node-http2-handler and the nodejs codebase, then only thing that makes sense is there is a session in the session cache that, under high load, is racing the destroy callback on the get. You may just need to guard clause the state when selecting a session from the cache (!session.destroyed). https://github.com/aws/aws-sdk-js-v3/blob/main/packages/node-http-handler/src/node-http2-handler.ts#L179 There could also be a leak in that cache cleanup somewhere in there too. |
@curtdept I find we didn't handle the server-side session close properly in our handler. See the linked PR above for more context. Can you try the latest version(will be later published today) and confirm it it fix the issue for you? |
@AllanZhengYP sure ill keep an eye out for it. |
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. |
Issue
Resolves: #1206
Description
Thanks to #3541, using HTTP/2 handler in service client is no longer blocked by weird socket timeout. This change removes hard-coding HTTP/2 clients but rely on the Smithy model.
This change enable us to use HTTP/2 in Kinesis client without breaking customer. Added integration test for it.
This change doesn't include
defaultConfigProvider
to the handler constructor because none of the default config is applicable to HTTP/2 handler for now.Testing
Integration test
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.