Skip to content

MPT-21087 – Reduce cloud API rate-limit failures and improve their visibility#882

Open
ffaraone wants to merge 1 commit into
hystax:integrationfrom
softwareone-platform:MPT-21087_tenant_concurrency_limit_and_429_warning
Open

MPT-21087 – Reduce cloud API rate-limit failures and improve their visibility#882
ffaraone wants to merge 1 commit into
hystax:integrationfrom
softwareone-platform:MPT-21087_tenant_concurrency_limit_and_429_warning

Conversation

@ffaraone
Copy link
Copy Markdown
Contributor

@ffaraone ffaraone commented May 21, 2026

Description

Problem

When a tenant has multiple cloud accounts (e.g. several Azure subscriptions under the same tenant), their billing imports run in parallel and share the same cloud-provider API rate-limit quota. Under load, this causes cascading HTTP 429 errors that exhaust all retry attempts, leaving imports in a failed state and surfacing an ERROR event in the organisation's event log, even though the failure is transient and automatically retried.

What changed

  • Parallel imports per tenant are now bounded. Accounts that share a rate-limit quota (identified by a common parent account) are imported with a configurable maximum concurrency instead of all at once. This significantly reduces the chance of hitting provider rate limits in the first place. The limit is tunable via the /diworker/max_tenant_import_workers configuration key (default: 1).
  • Rate-limit failures are no longer reported as errors. When an import fails solely because the cloud provider throttled the requests, the event log now records a WARNING ("was throttled by the cloud provider") rather than an ERROR ("failed"). Genuine billing API failures are unchanged and still appear as errors.

Related issue number

Special notes

Checklist

  • The pull request title is a good summary of the changes
  • Unit tests for the changes exist
  • New and existing unit tests pass locally

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.

1 participant