concourse / concourse/docker-image-resource

Implement ECR API retry/backoff logic when throttling is detected

Open
#115 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

efficiency
Dominant language
Go
Stars
162
Forks
250
PR merge metrics
No merged PRs in 30d

Description

Hello,

We have been running into throttling limits with AWS ECR, and AWS has requested that we do the following:

Implement a retry exception or exponential backoff on the API calls that you suspect that you are being throttled.

Since the majority of our ECR usage is due to concourse (many of our custom resources are hosted there, as well as the final build artifacts from our pipelines), we don't have much control over this behavior. AWS has requested that we implement the above before they will increase our API limits.

Is it possible to introduce some sort of retry logic with increasing wait timers when the throttling errors are detected? It seems like a 400 status with a specific message about throttling is returned from the API. Here is a sample error we found in another tool we use (image and tag removed):

Failed to query image details "<image>" "<tag>" ThrottlingException: Rate exceeded
status code: 400

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the AWS ECR API calls responsible for querying image details and inspect how throttling errors with status 400 and the message "Rate exceeded" are handled. Define the retry and increasing-wait behavior for the affected calls, then verify that throttled requests eventually recover without changing normal error handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go
Domain
api, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.