sozu-proxy / sozu

Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome!
https://www.sozu.io/
GNU Affero General Public License v3.0
3.12k stars 194 forks source link

Produce access logs in a binary format #1040

Closed Keksoj closed 7 months ago

Keksoj commented 1 year ago

For now, access logs are produced by formatting diverse pieces of data, like socket addresses, tags, and so on. std::fmt::Display is implemented for those types, however, calling to_string() on those is CPU-consuming.

It would be beneficiary to produce access logs in a binary format, in order to reduce both formatting time and memory footprint.

Ideally, the binary format would be defined in a protobuf form, like most other types used outside of Sōzu, but this poses the challenge of expressing types like std::net::Socketddr in protobuf.

Keksoj commented 7 months ago

done in #1069