shotover / shotover-proxy

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

Scram over mtls phase3 - proper token wait #1627

Closed rukai closed 3 months ago

rukai commented 3 months ago

This PR replaces the hardcoded 4s wait with logic to check that all brokers have received the new delegation token. This is done by sending a DescribeDelegationToken request to all brokers until we receive a response that contains the delegation token we just created. This is done such that we confirm one node has received the token before moving onto the next node. This minimizes requests sent.

Alternatively we could wait until one node has received the token. (a node that isnt the node we created the token on) And then at that point send requests to all other nodes in parallel. This will cut off a bit of latency in token creation. If we need to improve latency in the future this would be useful to attempt, but I've left it out of this PR to keep this PR simple.

Further notes:

codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #1627 will not alter performance

Comparing rukai:scram_over_mtls_phase3 (01eb50a) with main (bafb058)

Summary

✅ 37 untouched benchmarks