Resources/HttpClient 429 + Retry-After package

HttpClient 429 + Retry-After package

A copy/paste handler that parses Retry-After (seconds and HTTP date) plus a 429 runbook and logging fields so throttling becomes bounded, observable, and non-amplifying in .NET.

FreeJan 30, 2026
Download

What you get (4 files):

📄 RetryAfterDelegatingHandler.cs: Backpressure-aware HttpClient handler

  • Correct parsing: Retry-After seconds and HTTP date
  • Boundaries: max delay cap and optional jitter
  • Integration hint: register with HttpClientFactory or wrap in your own client

429-retry-after-runbook.md: Operator runbook for sustained throttling

  • Confirm source: which dependency is actually returning 429
  • Contain: cap concurrency, shed low priority, slow down safely
  • Recover: validate reduction in retry amplification

📊 retry-after-logging-fields.md: Field list for queryable incident logs

  • Decision fields: wait, reason, attempt, budget, route
  • Correlation: correlate retries to request and job IDs
  • Queries: how to prove you honored backpressure

📋 README.md: Setup + guardrails

  • Where to put the handler
  • Defaults to start with
  • What not to retry (unsafe side effects)

Quick reference (inline preview):

text
Decision rule for 429
- If Retry-After present and within budget: delay-and-retry (bounded)
- If Retry-After missing: short bounded backoff + escalate if sustained
- If side effect is not idempotent: fail-fast and surface an actionable error

Newsletter

Get the .NET production reliability newsletter

Weekly runbooks, failure patterns, and practical fixes.

No spam. Practical updates only.

We respect your inbox. Unsubscribe anytime.

No spam. Unsubscribe anytime.

Need help implementing this?

I can help you apply this to your systems without the drama.

Work with me

Similar resources

More resources to help you succeed

View all
Canonical: https://matrixtrak.com/resources/httpclient-429-retry-after-playbook-dotnet