shotover / shotover-proxy

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

Detect offline shotover nodes for KafkaSinkCluster #1762

Closed justinweng-instaclustr closed 1 month ago

justinweng-instaclustr commented 1 month ago

After introducing ShotoverNodeState to ShotoverNode in https://github.com/shotover/shotover-proxy/pull/1758, we should add a task to detect down shotover nodes and set ShotoverNodeState accordingly.

This PR adds a background task check_shotover_peers looping over peer shotover nodes and trying to open a TCP connection to each peer shotover node. If the connection cannot be established within connect_timeout_ms, the peer node is marked as down.

The next PR will change metadata rewrites to exclude down shotover nodes.

codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #1762 will degrade performances by 11.83%

Comparing justinweng-instaclustr:handle-offline-shotover-nodes (b1e7742) with main (2b11e0c)

Summary

❌ 1 regressions ✅ 38 untouched benchmarks

:warning: Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main justinweng-instaclustr:handle-offline-shotover-nodes Change
encode_system.local_result_v5_no_compression 93.1 µs 105.6 µs -11.83%
justinweng-instaclustr commented 1 month ago

The regression benchmark encode_system.local_result_v5_no_compression is for Cassandra and hence a noise.