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

Adding retries to AWS API calls #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Adding retries to AWS API calls #1

wants to merge 3 commits into from

Conversation

epytka
Copy link
Owner

@epytka epytka commented Aug 6, 2021

Proposed Changes

Since 3.8.18, RabbitMQ AWS peer discovery (https://www.rabbitmq.com/cluster-formation.html) mechanism no longer uses randomized delays to avoid the inherent race condition during initial cluster formation (https://www.rabbitmq.com/cluster-formation.html#initial-formation-race-condition). Instead it relies on an internal distributed locking mechanism available in modern Erlang releases (23.2 and newer).

Currently, AWS does not support SDK for Erlang; hence calling AWS service APIs are done with a simple implementation that wraps the httpc Erlang module. It constructs HTTP requests for AWS service queries and send to AWS service endpoints. Upon receiving responses, it parses response body for expected data. The existing implementation does not support any retry mechanism yet. As a good practice, AWS service clients should retry on transient network issues or service errors (5xx) received from AWS services.

That being said, a simple fix for this lock/unlock issue is to retry when transient network issues.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

@epytka epytka changed the title Adding retries to AWS API calls WIP: Adding retries to AWS API calls Aug 6, 2021
@epytka epytka changed the title WIP: Adding retries to AWS API calls Adding retries to AWS API calls Aug 6, 2021
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

Successfully merging this pull request may close these issues.

2 participants