# 集成检查清单 (/zh-CN/realtime-media/cloud-recording/build/optimize-and-operate/checklist)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

参考以下表格，快速确认每条检查项是否符合集成要求，以保证云端录制服务的可靠性。

:::warning[注意]
声网 RESTful API 仅支持 HTTP 1.1 和 HTTP 2.0 协议。如果使用 HTTPS 连接，请确保使用 TLS 1.0、1.1 或 1.2 版本进行加密通信。使用其他协议版本可能导致连接失败。
:::

| 编号 | 重要程度 | 检查项 | 检查内容 |
| --- | --- | --- | --- |
| 1 | 必选 | 开通服务 | 确保已[开通](/zh-CN/realtime-media/cloud-recording/build/setup-and-access/enable-service)云端录制服务。 |
| 2 | 必选 | 请求方式 | [checklist-html-0-2-3 details](#table-slot-checklist-html-0-2-3) |
| 3 | 必选 | 申请录制服务器资源 | [checklist-html-0-3-3 details](#table-slot-checklist-html-0-3-3) |
| 4 | 必选 | 频道场景 | 确保频道场景（`channelType`）与声网 RTC SDK 的设置一致。 |
| 5 | 必选 | 录制参数 | [checklist-html-0-5-3 details](#table-slot-checklist-html-0-5-3) |
| 6 | 必选 | 确认录制服务已成功启动 | [checklist-html-0-6-3 details](#table-slot-checklist-html-0-6-3) |
| 7 | 必选 | PCW 和 QPS 限制 | [checklist-html-0-7-3 details](#table-slot-checklist-html-0-7-3) |
| 8 | 可选 | 使用回调服务 | [checklist-html-0-8-3 details](#table-slot-checklist-html-0-8-3) |
| 9 | 可选 | 使用双域名 | 使用主域名（`api.agora.io`）发起请求失败时，先用主域名重试一次；如再次失败，则切换至副域名（`api.sd-rtn.com`）再次发送请求。 |
| 10 | 可选 | 超时逻辑 | 设置合理的 `maxIdleTime`，推荐设置为 300 秒。 |

<a id="table-slot-checklist-html-0-2-3"></a>

**checklist-html-0-2-3 details**

- 确保除 `query`（查询录制状态）使用 GET 外，其余均使用 POST 请求方式。
- 确保所有的请求 URL 和请求 Body 内容都是区分大小写的。

<a id="table-slot-checklist-html-0-3-3"></a>

**checklist-html-0-3-3 details**

- 传入的 `uid` 不能与当前频道内的任何用户 ID 重复。
- 对于页面录制，确保一个 `appid` + `cname` + `uid` 对应一个 Resource ID。
- 确保一个 Resource ID 只用于一次云端录制服务。
- 确保获得 Resource ID 后，在 2 秒内调用 `start` 方法开始录制。

<a id="table-slot-checklist-html-0-5-3"></a>

**checklist-html-0-5-3 details**

- 确保开始录制时传入的所有参数类型、大小写和取值范围正确，且必填的参数均已填写；否则返回错误码 `2`。
- 参考[设置合流布局](/zh-CN/realtime-media/cloud-recording/build/recording-modes/mix-mode/set-composite-layout)和[录制码率对照表](/zh-CN/realtime-media/cloud-recording/reference/api-reference)设置合流录制的布局和视频码率。

<a id="table-slot-checklist-html-0-6-3"></a>

**checklist-html-0-6-3 details**

- 确保 `start` 请求成功，即成功获得 `sid`（录制 ID）。
- 确保获得 `sid` 之后的 90 秒内 `status` 为 `4` 或 `5`。

<a id="table-slot-checklist-html-0-7-3"></a>

**checklist-html-0-7-3 details**

- 确保每个 App ID 每秒钟的请求数（QPS）不超过 10 次。
- 确保国内最大并发任务数（PCW）不超过 1000，其他地区 PCW 不超过 300。如需提升 QPS 和 PCW 限制，请联系技术支持。

<a id="table-slot-checklist-html-0-8-3"></a>

**checklist-html-0-8-3 details**

开通[云端录制回调服务](/zh-CN/realtime-media/cloud-recording/build/monitor-events/enable-ncs)并订阅以下事件作为监控录制服务状态的辅助手段：

- `40 recorder_started`：录制服务已启动。
- `11 session_exit`：录制服务结束任务并退出。
- `1 cloud_recording_error`：录制服务发生错误。
- `12 session_failover`：录制启用高可用机制。
- `31 uploaded`：所有录制文件已上传至指定的第三方云存储。
