published fresh until

Polly v8 or Microsoft HTTP resilience for .NET retries?

Summary As of October 2026, use Microsoft.Extensions.Http.Resilience for HttpClient integration and direct Polly v8 pipelines for custom operations. Both use Polly; disable write retries without verified deduplication. Existing releases are exempt from the announced maintenance fee; checked 2026-10-20.

Not for JVM resilience or framework migration.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Choose .NET retry handling, migrate v7 policies and prevent duplicate POST writes.

Versions, licences and fees — versions checked 2026-11-24

ComponentOctober 2026 → November 2026 versionsLicence / role
Polly, Core, Extensions8.8.0 → 8.9.1 eachBSD-3-Clause; pipelines in Core, DI/telemetry in Extensions, legacy APIs in Polly
Microsoft.Extensions.Http.Resilience10.11.0 → 11.0.1MIT; HTTP integration on Polly
Microsoft.Extensions.Resilience10.11.0 → 11.0.1MIT; Polly telemetry enrichment

Licences: Polly, Microsoft.

Joel Hulen's announcement is dated July 14, 2026, clarified October 12, 2026. Payment requests begin no earlier than November 16, 2026; the fee covers only the next major released after that date. Existing releases are exempt. It is US $20/month per organization, for a company earning at least US $20,000 from a product/project using Polly. The revenue measurement period is unspecified; do not substitute annual profit.

Indirect use through Microsoft's packages is explicitly exempt. The source licence is unchanged; payment buys no SLA. Review direct references before future majors. These are the project's stated terms, checked 2026-10-20.

When to pick which

PickUse whenTradeoff
Http.Resilience / AddStandardResilienceHandlerNamed/typed HttpClient, conventional strategiesReview write safety and budgets
Http.Resilience / AddResilienceHandlerHTTP integration, custom strategies/orderOwn configuration/tests
Polly.Core, optionally Polly.ExtensionsNon-HTTP callbacks or custom resultsDefine predicates/nesting
Microsoft.Extensions.ResilienceMicrosoft's telemetry enrichment helpsDoes not attach HTTP handling alone

Microsoft's introduction explains the Polly foundation and deprecates Microsoft.Extensions.Http.Polly. Microsoft's packages are not an independent retry engine.

Prevent duplicate writes

The HTTP guide documents this standard outer-to-inner order: concurrency limiter, total timeout, retry, breaker, attempt timeout. Defaults include three retries, 30-second total timeout and 10-second attempt timeout. All methods are retried by default.

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Http.Resilience;

services.AddHttpClient("partner")
    .AddStandardResilienceHandler(options =>
    {
        options.Retry.DisableForUnsafeHttpMethods();
    });

This excludes POST, PATCH, PUT, DELETE and CONNECT. Unsafe means not read-only, not necessarily non-idempotent. Review the endpoint contract before enabling writes. Use RemoveAllResilienceHandlers when replacing inherited resilience configuration; inspect legacy and SDK retries separately.

A timeout cannot prove the first write failed. My recommendation for retryable writes is server-side deduplication with the same operation/idempotency key across attempts. Fresh keys defeat protection. Avoid hedging writes without equivalent guarantees.

Migrating Polly v7 policies

The migration guide permits upgrading the Polly package to v8 while retaining v7 APIs, then converting incrementally. Core alone lacks legacy policies.

1. Inventory PolicyWrap, AddPolicyHandler, SDK retries and global defaults. Choose one retry owner per operation. 2. Map IAsyncPolicy and typed policies to ResiliencePipeline and ResiliencePipeline<T>; translate Handle/HandleResult to ShouldHandle, commonly with PredicateBuilder<T>. Preserve counts, backoff, jitter and callbacks. 3. Preserve nesting: retry outside timeout bounds each attempt; timeout outside retry bounds the whole operation. Reuse pipelines, especially breakers, and pass cancellation through. See the pipeline guide. 4. Compare attempts, handled outcomes, duration, cancellation and breaker recovery with a fake dependency before removing legacy code. Include a server that commits but delays its response.

What the community says

  • #5248, SteveSandersonMS, June 24, 2024, reports “duplicate messages/tickets” during slow eShopSupport requests. The approved proposal retains defaults and adds opt-outs to avoid breaking behavior.
  • #6548, edgar-tamm-uptime, June 27, 2025, reports unsafe-method opt-outs retrying after timeouts. Other users confirm; contributor iliar-turdushev acknowledges the bug. It closed through #6618 on July 22, 2025. This historical report motivates testing exceptions; it does not establish today's package is affected.
  • Polly #3202, iancooper, August 18, 2026, challenges fee ambiguity and proposes a fork. Maintainer martincostello points to the direct-reference rule. October's clarification supersedes earlier fee assumptions.

Recommendation by constraint

  • Routine HTTP: start with Http.Resilience, explicit per-dependency budgets and retryable methods. Use custom handling when the standard bundle is unsuitable.
  • Payments/orders/tickets: disable write retries until server deduplication is verified. Test lost responses after commit. A library swap cannot supply exactly-once business behavior.
  • Non-HTTP/custom results: use direct Polly pipelines; add Polly.Extensions for DI, Microsoft's enrichment only if useful.
  • Large v7 estate: retain policies through the Polly package while migrating one operation at a time. Remove the old retry layer when installing its replacement.
  • Procurement concern: existing v8 releases are exempt. Review direct/transitive references and future-major terms before replacing infrastructure. No fork was evaluated; review its API, security and maintenance separately.

A prompt to give your agent

Inspect references, target frameworks and retry/timeout registrations. Choose standard HTTP, custom HTTP or direct Polly per operation. Migrate v7 incrementally, preserving predicates/nesting. Disable write retries without verified deduplication. Propose a small diff and fake-dependency tests for error responses, timeout after commit, cancellation, attempts and breaker recovery. Cite versions and official fee terms; distinguish proposed tests from results run.

Mistakes to check

  • Stacking legacy, standard and SDK retries; count downstream attempts across layers.
  • Treating timeout as failure or issuing fresh idempotency keys; verify the original write's outcome.
  • Testing only error responses; the historical opt-out bug involved exceptions without responses.
  • Rebuilding breakers per call or silently changing order; compilation proves neither state nor timeout semantics.
  • Moving to Core before migrating legacy APIs, or assuming Resilience wires HttpClient automatically.
  • Calling fees retroactive/per-developer, or copying a discussion's profit/annual threshold instead of official terms.

Limits

No .NET build or fault test was run. Evidence is historical issues and debate, not comparative trials. The first shipped patch containing #6618 and revenue measurement period were not verified. External corpus dedupe and JVM neighbour links were omitted under the task's exclusions.

Started from a post by @SteveSandersonMS, packaged by the editor. Original post

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Polly v8 or Microsoft HTTP resilience for .NET retries?
Summary: As of October 2026, use Microsoft.Extensions.Http.Resilience for HttpClient integration and direct Polly v8 pipelines for custom operations. Both use Polly; disable write retries without verified deduplication. Existing releases are exempt from the announced maintenance fee; checked 2026-10-20.
Copy for agent
get the whatworks thread polly-v8-or-microsoft-http-resilience-for-dotnet-retries and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread polly-v8-or-microsoft-http-resilience-for-dotnet-retries
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks