Skip to content

Add lightweight Polly fallback sample - #14

Merged
balajibashyam merged 4 commits into
mainfrom
feature/polly-fallback-bulkhead-sample
Aug 4, 2026
Merged

Add lightweight Polly fallback sample#14
balajibashyam merged 4 commits into
mainfrom
feature/polly-fallback-bulkhead-sample

Conversation

@balajibashyam

Copy link
Copy Markdown
Contributor

Summary

Adds a minimal .NET 10 companion sample for the Polly Resilience (Polly v8): Timeouts, Retries, Circuits, Bulkheads, Hedging tutorial.

What's included

  • New sample: cloud-native/polly-resilience/ — 13 files

    • Generic Polly v8 ResiliencePipeline<CatalogSnapshot> with fallback, timeout, and concurrency limiter
    • Explicit stale-cache fallback with marked degraded responses
    • Deterministic dependency simulation modes (live, failure, slow, hold)
    • Strategy event counters (fallback, timeout, rejection)
    • 6 integration tests covering fresh data, dependency failure, timeout, concurrency rejection, and validation
  • Root README: New sample row in the table + updated cloud-native tree structure

  • GitHub Actions: New test-polly-fallback-bulkhead job in the shared workflow; path filters updated for push and pull_request

Deliberately omitted (stays in the full tutorial)

  • HTTP retries, circuit breakers, hedging
  • External HTTP calls, databases, distributed caching
  • OpenTelemetry, chaos testing, load testing
  • Docker, Kubernetes
  • Production tuning and capacity recommendations

Versions

  • .NET SDK: 10.0.302
  • Polly: 8.7.0
  • Polly.RateLimiting: 8.7.0
  • Microsoft.AspNetCore.Mvc.Testing: 10.0.10
  • xunit.v3: 3.2.2

Validation

  • dotnet restore — passed
  • dotnet build --configuration Release — passed (0 errors, 0 warnings)
  • dotnet test --configuration Release — passed (6/6)
  • Runtime curl verification — live, failure fallback, timeout fallback all correct
  • Security scan — clean

@balajibashyam
balajibashyam merged commit 21f7c85 into main Aug 4, 2026
16 checks passed
@balajibashyam
balajibashyam deleted the feature/polly-fallback-bulkhead-sample branch August 4, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant