Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk committed Sep 18, 2023
1 parent 52889c8 commit 96f18fd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 42 deletions.
68 changes: 28 additions & 40 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,45 @@
# Polly Documentation
# Meet Polly: The .NET resilience library

Polly is a .NET resilience and transient-fault-handling library that allows developers to express resilience strategies such as Retry, Circuit Breaker, Hedging, Timeout, Rate Limiter and Fallback in a fluent and thread-safe manner.
![Polly logo](https://raw.github.com/App-vNext/Polly/main/Polly-Logo.png)

We are a member of the [.NET Foundation](https://www.dotnetfoundation.org/about)!
Polly is a powerful library for .NET that helps you handle transient faults and improve the resilience of your applications. With Polly, you can easily define and apply strategies such as Retry, Circuit Breaker, Hedging, Timeout, Rate Limiter and Fallback to handle failures and slowdowns in a fluent and thread-safe way.

![Polly logo](https://raw.github.com/App-vNext/Polly/main/Polly-Logo.png)
Polly is part of the [.NET Foundation](https://www.dotnetfoundation.org/about)!

## What can Polly do for you?

Polly lets you express different resilience strategies to cope with various scenarios, such as:
Polly lets you use and combine different resilience strategies to cope with various scenarios, such as:

- [Retry](strategies/retry.md): Automatically retry failed requests after a short delay. Useful for transient errors that may self-correct.
- [Circuit Breaker](strategies/circuit-breaker.md): Fail fast and stop making requests when a system is overloaded or unhealthy. Useful for protecting a system from further damage and giving it time to recover.
- [Timeout](strategies/timeout.md): Set a maximum time limit for a request and abort it if it takes too long. Useful for avoiding indefinite waits and freeing up resources.
- [Rate Limiter](strategies/rate-limiter.md): Control the rate of requests to a system and reject or queue them if they exceed the limit. Useful for managing load and preventing throttling or overloading.
- [Fallback](strategies/fallback.md): Provide an alternative response or action in case of failure. Useful for degrading gracefully and maintaining user experience.
- [Hedging](strategies/hedging.md): Execute parallel requests when a system is slow and take the fastest one. Useful for reducing latency and improving responsiveness.
- [Retry](strategies/retry.md): Try again if something fails. This can be useful when the problem is temporary and might go away.
- [Circuit Breaker](strategies/circuit-breaker.md): Stop trying if something is broken or busy. This can benefit you by avoiding wasting time and making things worse. It can also support the system to recover.
- [Timeout](strategies/timeout.md): Give up if something takes too long. This can improve your performance by freeing up space and resources.
- [Rate Limiter](strategies/rate-limiter.md): Limit how many requests you make or accept. This can enable you to control the load and prevent problems or penalties.
- [Fallback](strategies/fallback.md): Do something else if something fails. This can improve your user experience and keep the program working.
- [Hedging](strategies/hedging.md): Do more than one thing at the same time and take the fastest one. This can make your program faster and more responsive.

You can learn more about each strategy and how to configure it in the [resilience strategies](strategies/index.md) section.
You can learn more about each strategy and how to use them [resilience strategies](strategies/index.md) section.

## Getting started
## How to get started with Polly?

Polly is easy to install and use. You can follow the [getting started](getting-started.md) guide to set up Polly in your project and start applying resilience strategies in your projects.
Polly is easy to install and use. You can follow the [getting started](getting-started.md) guide to add Polly to your project and use it for your requests.

## Articles
## Where to find more information?

- [Introduction](index.md): General information about the project and its goals.
- [Getting started](getting-started.md): A guide to help you get started with the project.
- Resilience strategies: A collection of strategies for improving the resilience of your system.
- [Timeout](strategies/timeout.md): A strategy for setting a maximum time limit for a request.
- [Retry](strategies/retry.md): A strategy for retrying failed requests.
- [Rate limiter](strategies/rate-limiter.md): A strategy for limiting the rate of requests.
- [Hedging](strategies/hedging.md): A strategy for hedging against long request times.
- [Fallback](strategies/fallback.md): A strategy for providing a fallback response in case of failure.
- [Circuit breaker](strategies/circuit-breaker.md): A strategy for breaking the circuit when a system is down.
- Resilience pipelines: Understanding the use of resilience pipelines.
- [Resilience pipeline registry](pipelines/resilience-pipeline-registry.md): Exploring the registry that stores resilience pipelines.
- vanced topics: A collection of advanced topics for further learning.
- [Telemetry and monitoring](advanced/telemetry.md): Insights into telemetry generated by resilience pipelines and strategies.
- [Chaos engineering](advanced/simmy.md): Get to know chaos engineering via the project's capabilities.
- [Dependency injection](advanced/dependency-injection.md): How the project integrates with Dependency Injection.
- Community and resources: A collection of resources and community contributions.
- [Polly-Contrib projects and libraries](community/polly-contrib.md): Learn how to contribute to and extend the project ecosystem.
- [Libraries and contributions](community/libraries-and-contributions.md): Find out which libraries the project depends on and who contributes to its development.
- [Useful resources and links](community/resources.md): Browse through blogs, podcasts, courses, e-books, and other community resources.
- [API](api/index.md): The API documentation for the project.
Polly has a rich documentation that covers various topics, such as:

## Articles (previous Polly versions)
- [Resilience strategies](strategies/index.md): A collection of strategies for improving the resilience of your system.
- [Resilience pipelines](pipelines/index.md): How to combine and reuse strategies in a flexible and modular way.
- [Telemetry and monitoring](advanced/telemetry.md): How to access and analyze the data generated by Polly strategies and pipelines.
- [Dependency injection](advanced/dependency-injection.md): How to integrate Polly with dependency injection frameworks and containers.
- [Extensibility](advanced/extensibility.md): How to create and use custom strategies and extensions for Polly.
- [Chaos engineering](advanced/simmy.md): How to use Polly to inject faults and test the resilience of your system.

- [Extensibility (v7)](v7/extensibility.md): Learn how you can extend Polly with new policies.

## Samples
You can also find many resources and community contributions, such as:

- [Samples](https://github.com/App-vNext/Polly/tree/main/samples): Samples in this repository that serve as an introduction to Polly.
- [Polly-Samples](https://github.com/App-vNext/Polly-Samples): Contains practical examples for using various implementations of Polly. Please feel free to contribute to the Polly-Samples repository in order to assist others who are either learning Polly for the first time, or are seeking advanced examples and novel approaches provided by our generous community.
- [Practical Samples](https://github.com/App-vNext/Polly-Samples): Practical examples for using various implementations of Polly. Please feel free to contribute to the Polly-Samples repository in order to assist others who are either learning Polly for the first time, or are seeking advanced examples and novel approaches provided by our generous community.
- [Polly-Contrib](community/polly-contrib.md)): Community projects and libraries that extend and enhance Polly's functionality and ecosystem.
- [Libraries and contributions](community/libraries-and-contributions.html): Dependencies and contributors that make Polly possible and awesome.
- Microsoft's [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers): Sample project demonstrating a .NET Microservices architecture and using Polly for resilience.

You can browse the documentation using the sidebar or visit the [API](api/index.md) section for the reference documentation.
1 change: 1 addition & 0 deletions docs/migration-v8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Migration guide from v7 to v8
6 changes: 4 additions & 2 deletions docs/strategies/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ Polly categorizes resilience strategies into two main groups:
- **Reactive**: These strategies handle specific exceptions that are thrown, or results that are returned, by the callbacks executed through the strategy.
- **Proactive**: Unlike reactive strategies, proactive strategies do not focus on handling errors by the callbacks might throw or return. They can make proactive decisions to cancel or reject the execution of callbacks (e.g., using a rate limiter or a timeout resilience strategy).

## Built-in strategies

| Strategy | Reactive | Premise | AKA | How does the strategy mitigate?|
| ------------- | --- | ------------- |:-------------: |------------- |
|[Retry](retry.md) |Yes|Many faults are transient and may self-correct after a short delay.| *Maybe it's just a blip* | Allows configuring automatic retries. |
|[Circuit Breaker](circuit-breaker.md) |Yes|When a system is seriously struggling, failing fast is better than making users/callers wait. <br/><br/>Protecting a faulting system from overload can help it recover. | *Stop doing it if it hurts* <br/><br/>*Give that system a break* | Breaks the circuit (blocks executions) for a period, when faults exceed some pre-configured threshold. |
|[Circuit-breaker](circuit-breaker.md) |Yes|When a system is seriously struggling, failing fast is better than making users/callers wait. <br/><br/>Protecting a faulting system from overload can help it recover. | *Stop doing it if it hurts* <br/><br/>*Give that system a break* | Breaks the circuit (blocks executions) for a period, when faults exceed some pre-configured threshold. |
|[Timeout](timeout.md)|No|Beyond a certain wait, a success result is unlikely.| *Don't wait forever* |Guarantees the caller won't have to wait beyond the timeout. |
|[Rate Limiter](rate-limiter.md)|No|Limiting the rate a system handles requests is another way to control load. <br/><br/> This can apply to the way your system accepts incoming calls, and/or to the way you call downstream services. | *Slow down a bit, will you?* |Constrains executions to not exceed a certain rate. |
|[Fallback](fallback.md)|Yes|Things will still fail - plan what you will do when that happens.| *Degrade gracefully* |Defines an alternative value to be returned (or action to be executed) on failure. |
|[Hedging](hedging.md)|Yes|Things can be slow sometimes, plan what you will do when that happens.| *Hedge your bets* | Executes parallel actions when things are slow and waits for the fastest one. |

## Usage

Extensions for adding resilience strategies to the builders are provided by each strategy. Depending on the type of strategy, these extensions may be available for both `ResiliencePipelineBuilder` and `ResiliencePipelineBuilder<T>` or just one of them. Proactive strategies like timeout or rate limiter are available for both types of builders, while specialized reactive strategies are only available for `ResiliencePipelineBuilder<T>`. Adding multiple resilience strategies is supported.
Extensions for adding resilience strategies to e builders are provided by each strategy. Depending on the type of strategy, these extensions may be available for both `ResiliencePipelineBuilder` and `ResiliencePipelineBuilder<T>` or just one of them. Proactive strategies like timeout or rate limiter are available for both types of builders, while specialized reactive strategies are only available for `ResiliencePipelineBuilder<T>`. Adding multiple resilience strategies is supported.

Each resilience strategy provides:

Expand Down
3 changes: 3 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- name: Getting started
href: getting-started.md

- name: Migrate to v8
href: migration-v8.md

- name: Resilience strategies
href: strategies/index.md
expanded: true
Expand Down

0 comments on commit 96f18fd

Please sign in to comment.