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

Performance optimisation #1140

Open Wonshtrum opened 1 month ago

Wonshtrum commented 1 month ago

Some recent analysis of flame graphs and call graphs have revealed some inefficiencies that could be greatly improved:

It also revealed some broader problems. Here are the ones that stand out with the percentage of total time execution in an highly optimized build with no logs nor access logs:

Wonshtrum commented 1 month ago

Related note even if it doesn't impact performances noticeably, the port is still separated from the authority on the Sozu size rather than kawa's. It is also done redundantly and with two different methods: once in frontend_from_request with hostname_and_port and once in log_request with split_once.