> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/cn/elastic-compute/ddos-protection/08-best-practices.md).

# 最佳实践

## 尽可能在已部署 DDoS 防护的地区进行部署

对于对 DDoS 攻击敏感的工作负载，请选择已部署 DDoS 防护的地区。BGP 转发和清洗流水线提供的防御能力远强于单纯的基于阈值的拦截。当前可用地区列表请参阅[地区可用性](/welcome/cn/elastic-compute/ddos-protection/02-ddos-protection.md#regional-availability)。

## 在需要之前验证阈值

默认阈值针对通用工作负载进行了校准——并非针对您的工作负载进行调优。如果您的应用程序日常运行接近这些限制（持续高 BPS 的媒体服务器、高 PPS 的游戏服务器），一次流量峰值就可能导致误触发拦截。请主动检查您的峰值流量指标与当前阈值，并提前进行调整。导航至[弹性 IPv4](https://console.zenlayer.com/zec/elastic-ip) 页面，点击操作列中的 **⋯** 菜单，然后选择**更改拦截阈值**。

## 认真对待 OutCPS 拦截

OutCPS 触发的拦截通常意味着某个实例正以异常速率发起出站连接——这是被入侵的常见迹象。当您看到此类情况时，在重新启用互联网访问之前，请检查该实例是否存在异常进程或连接。

## 使用 DDoS 防护策略进行主动防御

利用指纹规则、地理拦截和 IP 允许/拦截列表主动缩小攻击面，而不是仅依赖被动的基于阈值的拦截。有关设置说明，请参阅[配置指南](/welcome/cn/elastic-compute/ddos-protection/09-configuration-guide.md)。

## 为拦截情况设计弹性架构

拦截默认持续 2 小时。如果正常运行时间至关重要，请不要为每个服务仅依赖单个 EIP——使用多个 EIP 配合负载均衡，这样某个 EIP 被拦截时不会导致整个服务中断。

## 了解清洗生命周期

清洗事件经历定义的状态（清洗中 → 清洗结束，或清洗中 → 封禁路由 → 封禁路由结束）。如果您频繁看到升级至封禁路由的情况，请在[管理控制台](https://console.zenlayer.com/zec/ddos/policy)中检查并优化您的 DDoS 策略。详细信息请参阅[清洗事件生命周期](/welcome/cn/elastic-compute/ddos-protection/02-ddos-protection.md#cleaning-event-lifecycle)。

***

## 故障排除

**我的 EIP 被拦截，无法访问我的实例**

您的 EIP 可能因阈值超限而被封禁路由。前往 [DDoS 防护事件页面](https://console.zenlayer.com/zec/ddos/attack)查看状态并手动解除封禁路由。

**正常流量峰值期间我被拦截了**

您的阈值可能对您的工作负载来说过低。导航至[弹性 IPv4](https://console.zenlayer.com/zec/elastic-ip) 页面，点击受影响 EIP 上的 **⋯** 菜单，然后选择**更改拦截阈值**。

**我的实例正在发送我未发起的出站流量**

OutCPS 拦截意味着您的实例可能已被入侵。在重新启用互联网访问之前，请调查正在运行的进程和连接。


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/welcome/cn/elastic-compute/ddos-protection/08-best-practices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
