Skip to content

Conversation

@matt-condon
Copy link
Collaborator

@matt-condon matt-condon commented Dec 18, 2025

Ticket: CLOUDP-366822

Add rate limiting guidelines to errors IPA

Note: Will be merged as a post-rollout action

@matt-condon matt-condon requested a review from a team as a code owner December 18, 2025 11:59
@matt-condon matt-condon marked this pull request as draft December 18, 2025 11:59
@matt-condon matt-condon changed the title feat(ipa0114): add rate limiting guidelines to errors IPA feat(ipa0114): Add rate limiting guidelines to errors IPA Dec 18, 2025
Comment on lines 68 to 71
- APIs **must** include the `Retry-After` HTTP response header when returning
`429 Too Many Requests` to indicate when the client can retry the request.
- The `Retry-After` header value **must** be expressed as time in seconds
until the next token is available.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- APIs **must** include the `Retry-After` HTTP response header when returning
`429 Too Many Requests` to indicate when the client can retry the request.
- The `Retry-After` header value **must** be expressed as time in seconds
until the next token is available.
- APIs **should** include the `Retry-After` HTTP response header when returning
`429 Too Many Requests` to indicate how long the client should wait before retrying the request.
- The `Retry-After` header value **must** be expressed as time in seconds
until the next request can be made.

I think the Retry-After should be a guideline and not necessarily a must, similarly to the rate limit headers

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Comment on lines 74 to 77
- `RateLimit-Limit`: The maximum number of requests allowed in the current
rate limit window (bucket capacity)
- `RateLimit-Remaining`: The number of requests remaining in the current rate
limit window (remaining tokens)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Should we use token bucket specific language? Or refer to maximum requests and remaining requests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I think we actually shouldn't use token bucket specific language since there could be a different implementation and the headers aren't specific to token bucket

Copy link
Collaborator

@lovisaberggren lovisaberggren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty!

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.

3 participants