pitch-foundation / hourglass-sdk

Hourglass SDK
https://pitch-foundation.github.io/hourglass-sdk/
0 stars 1 forks source link

Handle retry count / backoff for reconnections in providers #17

Open bam4564 opened 7 months ago

bam4564 commented 7 months ago

Right now, the current behavior for reconnection to sockets will cause an infinite loop of retrying connections if the server goes down. To mitigate issues like this, our providers should support some sort of strategy that uses a combination of

  1. maximum retry connection count
  2. backoffs to delay requests to re-connect using some strategy (linear or exponential)
alex-hourglass commented 7 months ago

https://github.com/pitch-foundation/hourglass-sdk/pull/7/commits/f2388359b7b5a9aeb5a36a7ea6a18bca3d633e98