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

perf(dgw): re-use TLS client config #433

Merged
merged 1 commit into from
May 8, 2023
Merged

Conversation

CBenoit
Copy link
Member

@CBenoit CBenoit commented May 8, 2023

As of rustls 0.21, it’s possible to disable the TLS resumption that is not supported by some services such as CredSSP.

This allow us to reuse the same TLS client config and connector for all proxy-based TLS connections.
(TlsConnector is just a wrapper around the config providing the connect method.)

Making one of these can be expensive, and should be once per process
rather than once per connection.

source

@CBenoit CBenoit requested a review from a team May 8, 2023 19:05
@CBenoit CBenoit enabled auto-merge (squash) May 8, 2023 19:05
@CBenoit CBenoit disabled auto-merge May 8, 2023 19:06
As of rustls 0.21, it’s possible to disable the TLS resumption that is
not supported by some services such as CredSSP.

This allow us to reuse the same TLS client config and connector for
all proxy-based TLS connections.
(TlsConnector is just a wrapper around the config providing the
`connect` method.)

> Making one of these can be expensive, and should be once per process
> rather than once per connection.

[source](https://docs.rs/rustls/0.21.1/rustls/client/struct.ClientConfig.html)
@CBenoit CBenoit force-pushed the optimize-tls-connect branch from 37eaa50 to 6b43551 Compare May 8, 2023 19:07
@CBenoit CBenoit enabled auto-merge (squash) May 8, 2023 19:07
@CBenoit CBenoit merged commit b6ebb01 into master May 8, 2023
@CBenoit CBenoit deleted the optimize-tls-connect branch May 8, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants