-
Notifications
You must be signed in to change notification settings - Fork 898
adding tcp_user_timeout setting for aws components #3653
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
adding tcp_user_timeout setting for aws components #3653
Conversation
|
52f0343
to
5ecff0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alextreichler, just a few comments, the docs look great. One thing we'd need to be careful of is the possibility of other fields in future also wanting to override the HTTP client. We could be proactive here and refactor this setting to be more of a general purpose HTTP customization function that other fields could contribute to, something like httpClientFromConfig(p *service.ParsedConfig)
so it's more clear that all HTTP client fields go there.
3978c73
to
2b55138
Compare
Based on Ash's earlier mention, I create an http_client.go file that is used to create the custom http client, which is called within the session.go file. |
2b55138
to
9e7ab00
Compare
Could we have it not limited to AWS? I wonder could we perhaps have a We should have a dedicated library component that decorates / creates net.Dialer. Possibly event this should be part of benthos? |
79f0fb7
to
0b199a4
Compare
Based on Michal M, comment - I ended up changing this PR to "draft" and I added a PR in benthos framwork to add a new package called "netclient" in order for other components to use that within their project. So, this is why I switched it to draft as the other one needs to be reviewed first. |
0b199a4
to
794b632
Compare
Update internal/impl/aws/session.go Co-authored-by: Ashley Jeffs <ash@jeffail.uk>
794b632
to
092b258
Compare
Closing this as work moved to Benthos. |
In certain situations it is possible where a connection is ESTABLISHED, but for some reason, such as a network disconnect, the data is still sending to an aws service such as
sqs
ordynamodb
, but those services are not responding back. Typically in this case, it will continue to retry sending the data up to the number set by the kernel setting fortcp_retries2
, typically 15, which means it takes ~ 15-16mins before the connection is terminated.This can cause the
input
, such as consumers to stop consuming from a topic/partition from Redpanda until that connection is killed and redpanda connect re-establishes a new connection.Instead of modifying a systemwide kernel setting, it is possible to pass a value on the application level using
TCP_USER_TIMEOUT
. This will take president over thetcp_retries2
. This will make sure users don't have to modify a systemwide kernel setting and have more control specifically for redpanda connect in these cases.