> 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/multi-edge/services/routing/probing.md). Agents can also search and read this documentation through its [MCP server](https://www.axisnow.io/zh/docs/~gitbook/mcp).

# 拨测

CDN 拨测配置：HTTP 与 TCP 拨测的区别和适用场景、可用性判定规则、拨测组，以及拨测 URL 的最佳实践

拨测由 AxisNow 的拨测点直接请求每一家边缘的接入地址（CNAME），不经过服务 CNAME 的调度。因此各家边缘被独立测量，域名切换到 AxisNow 之前即可观察数据。

拨测的配置分两层：

<table data-search="false"><thead><tr><th width="150">层级</th><th width="220">内容</th><th>说明</th></tr></thead><tbody><tr><td>服务</td><td>拨测 URL、异常条件、阈值</td><td>一个服务一套，所有路由规则共用。创建默认规则时首次配置，之后在 <strong>流量调度</strong> 标签页的 <strong>拨测设置</strong> 中修改</td></tr><tr><td>路由规则</td><td>拨测组</td><td>每条规则各自选择，应与规则覆盖的访客处于同一地区或运营商网络</td></tr></tbody></table>

<figure><img src="https://3062891322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKDgGNU6JXG7cqYCk2aCz%2Fuploads%2Fgit-blob-a6bd9618d5233361ede4b48797a9a09d5540ce9e%2Frouting-probe-settings.png?alt=media" alt="拨测设置：拨测 URL、异常条件和判定阈值"><figcaption></figcaption></figure>

{% hint style="warning" %}
拨测设置属于服务，修改后对该服务的所有路由规则生效。
{% endhint %}

## 拨测方式 <a href="#probe-type" id="probe-type"></a>

拨测有 HTTP 和 TCP 两种方式，由是否填写拨测 URL 决定：

<table data-search="false"><thead><tr><th width="150"></th><th>HTTP 拨测</th><th>TCP 拨测</th></tr></thead><tbody><tr><td>拨测 URL</td><td>已填写</td><td>留空</td></tr><tr><td>拨测动作</td><td>向每家边缘发送该 URL 的 HTTP 请求，Host 取自 URL 中的域名</td><td>与每家边缘的 443 端口建立 TCP 连接，不发送请求</td></tr><tr><td>对边缘的要求</td><td>URL 中的域名已在规则内的每一家边缘上配置完成</td><td>无</td></tr><tr><td>能发现的故障</td><td>连接失败、响应过慢、5xx 响应</td><td>连接失败、连接过慢。发现不了 HTTP 层的故障</td></tr><tr><td>质量评分依据</td><td>TTFB</td><td>TCP 连接时间</td></tr><tr><td>适用场景</td><td>多数站点。需要在边缘或源站返回 5xx、响应变慢时切换的业务必须使用</td><td>各家边缘上没有一个统一可访问的 URL；规则内有边缘尚未配置该域名；只需要按网络连通性和连接延迟调度</td></tr></tbody></table>

## 可用性判定 <a href="#availability-judgment" id="availability-judgment"></a>

判定分三层，括号内为默认值：

1. **单次拨测异常**：命中异常条件。HTTP 拨测为返回 5xx、首字节时间超过 2 秒，或连接时间超过 3 秒；TCP 拨测只有连接时间超过 3 秒一条。
2. **一轮失败**：本轮异常的拨测点占比达到单轮异常比例（50%）。每 60 秒一轮。
3. **不可用与恢复**：连续失败 3 轮判定为不可用，连续正常 3 轮判定为恢复。

## 拨测组 <a href="#probe-groups" id="probe-groups"></a>

拨测点由平台内置并按地区、运营商和大洲编成拨测组，规则选择的是拨测组，不能单独选择某个拨测点。为特定范围创建规则时，控制台按范围推荐拨测组：中国运营商规则推荐对应运营商的拨测组，中国规则推荐中国的 BGP 多线拨测组，其他大洲或国家的规则推荐该大洲的拨测组。默认规则的拨测组需要按访客来源自行选择。

## 最佳实践 <a href="#probing-best-practices" id="probing-best-practices"></a>

### 拨测 URL <a href="#probe-url-practices" id="probe-url-practices"></a>

* **指向一个会被各家边缘缓存的静态资源**。这样 TTFB 比较的是各家边缘到访客的网络质量，见[质量优选的评分](https://www.axisnow.io/zh/docs/multi-edge/services/routing.md#quality-score)。首页常常不缓存，不适合直接作为拨测 URL。
* **业务以动态内容或 API 为主、希望比较含回源在内的全链路耗时时**，可以有意选择不缓存的路径。此时拨测结果包含源站的表现，会干扰调度决策：源站变慢会同时拉低每一家边缘的评分，评分差距不再反映边缘本身的优劣；源站故障会使各家同时被判定为不可用。
* **直接返回 200，不要重定向**。一次重定向的响应不代表目标内容的响应情况。
* **不要被访问控制、限速或质询规则拦截**。默认只有 5xx 算异常，被拦截的拨测返回 403 或质询页，会被当作正常，但测到的已不是业务的真实表现。
* **域名必须已在规则内的每一家边缘上配置**。否则这家边缘拒绝请求，拨测全部异常。

### 响应大小 <a href="#probe-response-size" id="probe-response-size"></a>

拨测对象用一个很小的文件即可。TTFB 不包含响应体的下载时间，大文件不会让评分更准确，只会增加拨测产生的流量：每个拨测点每轮都会向规则内的每一家边缘请求一次。

### 拨测组与阈值 <a href="#probe-groups-and-thresholds" id="probe-groups-and-thresholds"></a>

* **拨测组与规则覆盖的访客保持一致**。例如中国电信规则选电信的拨测组；从其他地区测得的可用性和延迟不代表这些访客的体验。
* **默认阈值下，从故障发生到判定不可用约需 3 分钟**（3 轮，每轮 60 秒）。调低轮数可以更快切换，但更容易受瞬时抖动影响。


---

# 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/multi-edge/services/routing/probing.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.
