> For the complete documentation index, see [llms.txt](https://docs.zongsoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zongsoft.com/documentation/en/framework/externals/projects/polly.md).

# Polly (polly)

Polly project's capability scope, deployment products, integration entry points and usage boundaries.

Use retries, timeouts, circuit breaking, rate limiting and fallback integration [Core](https://github.com/Zongsoft/framework/tree/main/Zongsoft.Core) execution pipeline to handle temporary failures encountered in an operation.

| Item                  | value                                                                                         |
| --------------------- | --------------------------------------------------------------------------------------------- |
| source code directory | `externals/polly`                                                                             |
| main bag              | `Zongsoft.Externals.Polly`                                                                    |
| Companion theme       | [Task Scheduling and Resilient Execution](/documentation/en/framework/externals/execution.md) |

## Deployment and Usage Portal

Append the main package to the existing host's [Deployment checklist](/documentation/en/references/deploy-files.md), and retain the plugin list, assembly and ancillary running resources in the package:

{% code title="Application.deploy (append fragment)" %}

```ini
[plugins zongsoft externals polly]
nuget:Zongsoft.Externals.Polly
```

{% endcode %}

The pipeline builder is bound to the executor through the plugin tree, and the strategy is expressed using the corresponding features of [Core](https://github.com/Zongsoft/framework/tree/main/Zongsoft.Core). Strategies and their sequence of combinations should be decided for specific operations.

## Integration Steps

1. Confirm that the actuator actually passes through the configuration pipeline with a controlled short operation.
2. Verify the number of retries, timeout cancellation, circuit breaking recovery or rate limiting rejection item by item, and then combine the strategies.
3. Compare the final error and total time consumption with business expectations before integrating external calls.

For specific configuration, calling examples and related basic concepts, see [Task Scheduling and Resilient Execution](/documentation/en/framework/externals/execution.md).

## Project Boundaries

{% hint style="info" %}
💡 Deployment of the plugin will not make all HTTP or database calls automatically obtain the policy. Retries require operations to be replayable; when combined with Hangfire job retries, the total number of attempts and total time budget should be calculated.
{% endhint %}

## Further Reading

[Browse extensions by project](/documentation/en/framework/externals/projects.md) · [Task Scheduling and Resilient Execution](/documentation/en/framework/externals/execution.md) · [source code and project description](https://github.com/Zongsoft/framework/tree/main/externals/polly)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zongsoft.com/documentation/en/framework/externals/projects/polly.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
