Skip to content

Instantly share code, notes, and snippets.

@Eibwen
Last active January 2, 2019 19:30
Show Gist options
  • Save Eibwen/7c6a13afea0c670b1eb9193869cc86bb to your computer and use it in GitHub Desktop.
Save Eibwen/7c6a13afea0c670b1eb9193869cc86bb to your computer and use it in GitHub Desktop.

Policy Parameters

Here is a simple table to help determine the basic information you should consider for all Polly Policies you configure

Policy
CircuitBreaker Exception Type Exception Count Allowed Time period
Retry Exception Type Retry Count Retry Delays
Timeout Timeout Time Will it be Pessimistic? (avoid)
Bulkhead Isolation maxParallelization maxQueuingActions onRejection
Cache CacheProvider Length/Policy
Fallback Exception Type With Retry? Default action

Order

If (and only if?) you would want one policy to handle failures of another (such as a Fallback after a Timeout, or deciding if requests that Timeout should be counted toward a CircuitBreaker), the order that you Policy .Wrap them will be important

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment