Skip to content

Request budgets and throttling #40

Closed

Description

@somethingwithproof

Summary

Collection never exceeds a provider's rate limit or the operator's ceiling.

Requirements

  • REQ-BUDGET-001 Before each run the collector MUST compute the requests it needs per account and compare them with the account's share of the provider limit and its monthly ceiling.
  • REQ-BUDGET-002 Over budget, it MUST read in a fixed order up to the budget and mark the rest unknown with reason budget.
  • REQ-BUDGET-003 It MUST honor rate-limit headers and Retry-After, and stop the account for the run after a throttling response.
  • REQ-BUDGET-004 The DigitalOcean default share MUST be 50 percent of the per-token limit and configurable per account.

Acceptance criteria

  • A 500-Droplet fixture stays within the per-minute and per-hour limits.
  • A 429 fixture stops the account and records the reason.

References

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: collectionCollector job, discovery, and the observation cachearea: costRequest budgets, provider pricing, and estimatesphase: 1 coreCore and DigitalOceanpriority: blockerStops its milestone until resolvedtype: requirementA testable behavior the plugin must have

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions