Hi,
From a quick analysis of the proxy, there are already multiple rules to prevent issues with dead workers, which is great.
However, I think it could be improved with automatic fallback to a different worker on connection failure, transparent to the client.
Consider this:
Client connects
→ Proxy selects Worker-5
→ Connection to Worker-5 fails
→ Proxy automatically selects Worker-7 (or any different worker available in a loop, up to a certain limit)
→ Connection to Worker-7 succeeds ✅
→ Client never sees the error
Current behavior:
Client connects
→ Proxy selects Worker-5
→ Connection to Worker-5 fails
→ Return error to client ❌
→ Client has to retry manually
Thanks again