samply / beam

🌈 Federated, end-to-end-encrypted, efficient communication among strict network environments.
Apache License 2.0
25 stars 6 forks source link

Timeout improvements #206

Closed Threated closed 3 months ago

Threated commented 3 months ago

At some sites the status code returned by the proxy on timeout is 504 instead of 502 leading us to wait a minute before trying to reconnect. But because 502 might also indicate a permanent problem with the network we don't want to spam the proxy as fast as possible with requests which is why I introduced a counter which keeps track of how many times we hit such a status code and if its more than 10 times in the last minute we retry only every minute.