# 我应该使用传输层加速还是应用层加速？

选择使用传输层加速还是应用层加速取决于您的具体使用场景和性能需求。

传输层加速主要侧重于通过优化传输层协议（如 TCP 和 UDP）来提高网络性能。它可以通过优化网络连接、负载均衡和缓存来提高吞吐量并减少延迟。传输层加速通常用于需要高网络吞吐量和低延迟的应用，例如大文件传输和实时流媒体。

应用层加速则侧重于通过分析和优化应用层协议（如 HTTP、HTTPS 和 SSL/TLS）来提高应用性能。它可以通过优化应用负载、减少服务器响应时间和管理用户会话来提高应用性能。应用层加速通常用于需要高事务处理速率和低响应时间的 Web 应用和其他应用。

因此，如果您的应用主要关注网络性能和数据传输，传输层加速可能更为合适。如果您的应用侧重于优化应用性能和用户体验，那么应用层加速可能是更好的选择。


---

# 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-layer-4-or-layer-7-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.
