DataDog / saluki

An experimental toolkit for building telemetry data planes in Rust.
Apache License 2.0
12 stars 2 forks source link

Override more defaults on the TLS client configuration when building HTTPS clients. #196

Closed tobz closed 3 weeks ago

tobz commented 1 month ago

Context

When examining some heap usage data for a recent SMP run of ADP, I noticed that rustls manages to allocate a decent amount of memory for things like the TLS root store, and TLS session resumption, and so on. Here is an example, where session resumption costs us like 64KB right out of the gate, when we talk to like five servers at most.

rustls has a good amount of configurability, and offers a lot of API methods for even providing shared versions of different resources (TLS root store and session resumption cache among them), which would be useful to use for not only reducing overly loosely default sizes and so on, but also sharing/reusing existing resources where possible.