-
Notifications
You must be signed in to change notification settings - Fork 11
feat(agent-data-plane): added workaround for tls handshake timeout config option #1819
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
base: main
Are you sure you want to change the base?
Changes from all commits
dc7d606
afb324c
6c8f53f
43275bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,6 +161,7 @@ where | |
| let endpoints = config.build_routable_endpoints(live_config.clone())?; | ||
| let mut client_builder = HttpClient::builder() | ||
| .with_request_timeout(config.request_timeout()) | ||
| .with_tls_handshake_timeout(config.tls_handshake_timeout()) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Worth a follow up, since it would involve making a PR against the |
||
| .with_min_tls_version(config.min_tls_version()) | ||
| .with_http_protocol(config.http_protocol()) | ||
| .with_bytes_sent_counter(telemetry.bytes_sent().clone()) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,5 +79,6 @@ tokio-vsock = { workspace = true } | |
| http-body-util = { workspace = true } | ||
| proptest = { workspace = true } | ||
| rand_distr = { workspace = true } | ||
| saluki-metrics = { workspace = true, features = ["test"] } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this needed? I'm not seeing |
||
| tempfile = { workspace = true } | ||
| tokio-test = { workspace = true } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -171,6 +171,19 @@ impl HttpClientBuilder { | |||||
| self | ||||||
| } | ||||||
|
|
||||||
| /// Sets the timeout for completing the TLS handshake after a connection is established. | ||||||
| /// | ||||||
| /// Defaults to 10 seconds. | ||||||
| /// | ||||||
|
Comment on lines
+176
to
+177
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There is no default for this function that I can see 🤔 |
||||||
| /// This timeout is independent of the per-request timeout set by [`Self::with_request_timeout`]. | ||||||
| /// When a new connection is needed, both timers run concurrently and whichever fires first | ||||||
| /// determines the outcome. Setting a short request timeout does not bound the TLS handshake | ||||||
| /// if the connection pool decides to open a new connection before the request timer starts. | ||||||
| pub fn with_tls_handshake_timeout(mut self, timeout: Duration) -> Self { | ||||||
| self.connector_builder = self.connector_builder.with_tls_handshake_timeout(timeout); | ||||||
| self | ||||||
| } | ||||||
|
|
||||||
| /// Sets the HTTP protocol selection for client connections. | ||||||
| /// | ||||||
| /// Defaults to [`HttpProtocol::Auto`], which automatically negotiates HTTP/2 with HTTP/1.1 fallback. | ||||||
|
|
||||||
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.
I don't think we need the rename now that the field name matches.