shotover / shotover-proxy

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

#1665 Clear optional fetch response fields to avoid making clients try to bypass shotover #1677

Closed justinweng-instaclustr closed 3 weeks ago

justinweng-instaclustr commented 3 weeks ago

This PR clears the optional fields FetchResponse::node_endpoints, PartitionData::preferred_read_replica and PartitionData::current_leader in the Fetch 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 #1665

codspeed-hq[bot] commented 3 weeks ago

CodSpeed Performance Report

Merging #1677 will not alter performance

Comparing justinweng-instaclustr:1665-rewrite-fetch-responses-to-not-refer-to-real-brokers (228e594) with main (fdd7e6b)

Summary

✅ 39 untouched benchmarks