How app-vnext/polly works
Main Components / Layers
• Extensions Module: Capture extensions for dependency injection and telemetry, which are found in Polly.Extensions. This component interacts with the core engine by configuring policies and also routes telemetry events.
• Rate Limiting: Highlight the specialized module (Polly.RateLimiting) that integrates with system-level rate limiting approaches, including components based on concurrency and sliding-window algorithms.
• Testing and Benchmarks: Although not part of the runtime architecture, separate modules (Polly.Testing, the “bench” directory, and extensive test projects) indicate how the library is validated. Optionally, you may show these as a “Supporting Infrastructure” layer.
• Samples and Documentation: Illustrate that there is a separate “Samples” folder to help consumers understand integration details.
• Legacy API Support: Optionally denote that a “Polly” package exists to provide backward compatibility (legacy API) relative to the new v8 API.
Component Relationships and Interactions
• An interaction between the Extensions module (DI integration) and the core engine. Indicate that the service collection (IServiceCollection) binds and retrieves named resilience pipelines.
• How the registry/lookup mechanism (in namespaces like Registry) provides dynamic access to pipelines – for example, a “Policy Registry” component.
Technologies and Frameworks
• .NET Platform: Specify that the library targets .NET and uses asynchronous and thread-safe patterns.
• NuGet Packages: Identify the main NuGet packages (Polly.Core, Polly.Extensions, Polly.RateLimiting, Polly.Testing) and show that they aggregate into the overall service.
• Simmy Integration: Mark the chaos engineering support (Simmy) as an integrated part of the Polly core, enabling chaos fault injection and latency simulation.