# 我应该使用 TCP 选项地址 (TOA) 还是代理协议进行网络加速？

TCP 选项地址 (TOA) 和代理协议都用于网络加速和负载均衡，但它们有不同的应用场景和考虑因素。

TOA 是一种在 TCP 报头中添加额外地址信息（包括对象地址和集群 ID）的技术，这使得网络设备能够更高效地路由和负载均衡流量。TOA 通常与负载均衡器或应用交付控制器 (ADC) 配合使用，以优化流量并提高性能。TOA 对应用程序是透明的，不需要对应用程序或服务器进行任何修改。

另一方面，代理协议是一种第 4 层协议，它在转发请求的头部添加有关传入客户端连接的元数据。这些元数据包括客户端 IP 地址、协议和端口信息，使后端服务器即使在连接被负载均衡器或代理终止的情况下也能看到原始客户端信息。代理协议用于负载均衡器或代理需要终止 SSL/TLS 连接，或者后端服务器需要看到原始客户端信息的情况。

\\


---

# Agent Instructions: 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/global-accelerator/faq/should-i-use-tcp-option-address-toa-or-proxy-protocol-for-network-acceleration.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.
