Exponential Backoff vs Request Batching: Choosing the Right Strategy for Azure DevOps API Throttling
0 reputation · 22 Nov 2023, 18:53 UTC
Goal
Minimize latency spikes that appear only when Azure DevOps REST APIs or pipeline agents receive concurrent requests.
Constraints & Uncertainty
Azure DevOps imposes rate limits that trigger throttling, but documentation only recommends exponential backoff for retried requests. It provides no clear guidance on when to switch to request batching, a technique that groups multiple calls into a single payload. Concurrent pipeline triggers also exhibit queue latency that is not evident in single‑threaded runs. The trade‑off between backoff and batching remains unresolved, and no official benchmark exists for different concurrency patterns.
Specific Questions
- At what request concurrency thresholds should we consider batching over exponential backoff to reduce overall latency?
- How does batching impact throughput and error rates compared to backoff under typical Azure DevOps rate limits?
- Which telemetry (e.g., X‑RateLimit‑Remaining, Retry‑After, queue wait times) best informs the decision between the two strategies?