shotover / shotover-proxy

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

#1664 Clear optional produce response fields to avoid making clients try to bypass shotover #1678

Closed justinweng-instaclustr closed 2 weeks ago

justinweng-instaclustr commented 3 weeks ago

This PR clears the optional fields ProduceResponse::node_endpoints and PartitionProduceResponse::current_leader in the Produce response processed by the KafkaSinkCluster process_responses() function . This is to avoid passing these values to the client which will make the client try to bypass shotover and connect to Kafka brokers directly.

Closes https://github.com/shotover/shotover-proxy/issues/1664

codspeed-hq[bot] commented 3 weeks ago

CodSpeed Performance Report

Merging #1678 will not alter performance

Comparing justinweng-instaclustr:1664-rewrite-produce-responses-to-not-refer-to-real-brokers (a1066fe) with main (f239e53)

Summary

✅ 39 untouched benchmarks