> For the complete documentation index, see [llms.txt](https://www.axisnow.io/zh/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.axisnow.io/zh/docs/edge/endpoints/origin-address/best-practices.md).

# 最佳实践

源地址与健康检查的配置建议

* **多个域共用一个源地址**：回源到同一个源站的域引用同一个源地址，而不是各自填写地址。连接失败的判定共享、探测只做一份、改地址一处生效；各自填写会生成多个同样内容的源地址，各算各的。
* **至少两个地址**：只有地址数大于 1 时才会发生剔除。单台源站也可以用两个 IP 或一个解析出多个 IP 的域名；只有一个地址时故障靠[回源重试](/zh/docs/edge/policies/upstream-control/configuration.md#retry)兜底，重试不会让故障地址离开轮询。
* **开启主动探测**：真实流量监测没有恢复判定，剔除到期流量就回来，源站未恢复时每个剔除时长会放进一批失败请求再被剔除。开启探测后，剔除在源站恢复前保持，恢复后最快 30 秒回到轮询。探测端口填源站实际提供服务的端口；剔除时长不要低于 30 秒，否则探测来不及再次判定。
* **按流量调整阈值**：默认 120 秒内 10 次。流量很低的源地址几分钟都攒不到 10 次失败，减少次数；流量很大的源地址偶发超时也会凑够 10 次，增加次数或缩短窗口。
* **发布前移除地址**：维护某台源站时，编辑源地址删除该地址并保存，流量立即停止分配，不产生失败请求；完成后加回。只剩一个地址时它不再受健康检查约束。


---

# 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://www.axisnow.io/zh/docs/edge/endpoints/origin-address/best-practices.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.
