Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce exponential backoff strategy for starting Connection to RabbitMQ #49

Open
jollopre opened this issue Oct 13, 2024 · 0 comments

Comments

@jollopre
Copy link
Owner

jollopre commented Oct 13, 2024

The existing approach to retry initial connection pauses 1 second before retrying. In the event of RabbitMQ being already distress, simultaneous retries from several processes might contribute to further degradation. In order to prevent that to happen, we'd like to introduce exponential backoff strategy so that clients wait progressively longer between retries.

The solution implemented has to consider the following:

  • Using a base for which retry intervals do not grow considerably as the number of retries increases. For instance, choosing a base below 2
  • Incorporating jitter, so that avoids collision retrying a connection through simultaneous clients
  • This resilience pattern should be only applied when harmoniser is the server, i.e. is the main process running
  • This pattern has to be removed for declaring topology and publisher connection.

The existing implementation is implemented here

jollopre added a commit that referenced this issue Oct 27, 2024
* Remove SignalException from connection using Thread::Queue
jollopre added a commit that referenced this issue Oct 27, 2024
* Remove SignalException from connection using Thread::Queue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant