shotover / shotover-proxy

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

KafkaSinkCluster - routing error handling #1659

Closed rukai closed 3 months ago

rukai commented 3 months ago

The kafka cluster has a lot of state that shotover must keep track of for routing purposes. This includes things like which brokers are holding which partitions. Currently shotover populates its internal records of this state but it has no way to invalidate these records. This PR implements this missing invalidation.

To handle changes to the cluster we need to handle routing errors as these indicate that the cluster has changed.

This PR handles the 3 kinds of routing errors as follows:

This PR ensures that every request type that we perform routing also has a response handler that invalidates the routing state when we get a routing error.

codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #1659 will not alter performance

Comparing rukai:routing_error_handling (aa66e59) with main (caa3453)

Summary

✅ 38 untouched benchmarks