shotover / shotover-proxy

L7 data-layer proxy
https://docs.shotover.io
Apache License 2.0
82 stars 16 forks source link

KafkaSinkCluster: increment out_of_rack_requests metric for all out of rack requests #1639

Closed rukai closed 1 month ago

rukai commented 1 month ago

closes https://github.com/shotover/shotover-proxy/issues/1526

I thought the out_of_rack_requests metric would need to be reported at the routing stage. Which is why I left it for a follow up PR, I thought it was going to require modifications to all of our route_to_* methods. But it turns out its far simpler to just report it at the sending stage, which is what this PR does. We just compare the rack of the node we are about to send against shotover's rack and record the metric if there is a mismatch.

I left a tracing::debug at the previous location of self.out_of_rack_requests.increment(1); to help disambiguate why we are getting out of rack requests.

codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #1639 will not alter performance

Comparing rukai:kafka_out_of_rack_requests (e7700e7) with main (bb9f2b6)

Summary

✅ 37 untouched benchmarks