Axiom Module: Retry Policy Kit (.NET + Polly)
When a dependency gets slow or starts failing, retries can turn a small incident into a full outage, thread pool pressure, socket exhaustion, synchronized retry storms, and cascading timeouts.
Retry Policy Kit is a practical, copy-ready toolkit for shipping safe, bounded resilience in .NET (Polly + HttpClient patterns), with the missing pieces teams usually discover the hard way: stop rules, budgets, telemetry, and rollout guidance.
What you get
- Production-ready retry rules (backoff + jitter + caps + stop rules)
- Timeouts-first guidance and “total time budget” templates
- Circuit breaker and bulkhead patterns to prevent amplification
- A policy registry approach so services converge on one standard
- Observability notes so on-call can answer “what waited?” quickly
- Operator-facing runbooks and checklists for incident response
Included files (Markdown + templates)
- 00-START-HERE.md
- 01-stop-retry-escalate-decision-tables.md
- 02-backoff-and-jitter-defaults.md
- 03-retry-budgets-and-caps.md
- 04-polly-templates.cs
- 05-httpclient-429-retry-after-template.cs
- 06-test-harness-checklist.md
- 07-retry-policy-registry-template.yaml
- 08-retry-event-logging-schema.json
- 09-query-pack.md
- 10-layered-retry-audit.md
- 11-cheat-sheet-one-page.md
- 12-circuit-breakers-and-bulkheads.md
- 13-implementation-notes-registry-and-telemetry.md
- PDF versions included (print/share with your team)
- pdf/00-START-HERE.pdf
- pdf/01-stop-retry-escalate-decision-tables.pdf
- pdf/02-backoff-and-jitter-defaults.pdf
- pdf/03-retry-budgets-and-caps.pdf
- pdf/06-test-harness-checklist.pdf
- pdf/09-query-pack.pdf
- pdf/10-layered-retry-audit.pdf
- pdf/11-cheat-sheet-one-page.pdf
- pdf/12-circuit-breakers-and-bulkheads.pdf
- pdf/13-implementation-notes-registry-and-telemetry.pdf
Formats
- Markdown (.md), C# (.cs), YAML (.yaml), JSON (.json), PDFs (.pdf)
Best for
- .NET / ASP.NET services calling flaky/slow dependencies
- Teams seeing 429s, timeouts, or periodic latency spikes
- Systems where multiple layers retry (SDK + HttpClient + queue + job runner)
Outcomes
- Fewer retry storms and “mystery latency” incidents
- Predictable failure modes (fast fail + escalate)
- Consistent policies across services (less bespoke guessing)
Requirements
- .NET (any recent version) and Polly (examples are Polly-oriented; concepts apply broadly)
License / usage
- License: Single-company internal use. You may use and adapt the templates in your organization’s production systems. Redistribution or resale (in whole or in part) is not permitted.
FAQ (optional)
- “Does this work for legacy .NET?” Yes; templates and patterns are designed to be incrementally adopted.
- “Does it include observability?” Yes; guidance for logging/metrics/spans and what to tag.
If retries have ever made an outage worse for you, this kit gives you a standard you can roll out confidently.