# Should I use Layer 4 or Layer 7 acceleration?

The decision to use layer 4 or layer 7 acceleration depends on your specific use case and performance needs.

Layer 4 acceleration is primarily focused on improving network performance by optimizing the transport layer protocols such as TCP and UDP. It can improve the throughput and reduce latency by optimizing network connections, load balancing, and caching. Layer 4 acceleration is typically used for applications that require high network throughput and low latency, such as large file transfers and real-time streaming.

Layer 7 acceleration, on the other hand, is focused on optimizing application performance by analyzing and optimizing application layer protocols such as HTTP, HTTPS, and SSL/TLS. It can improve application performance by optimizing the application payload, reducing server response times, and managing user sessions. Layer 7 acceleration is typically used for web applications and other applications that require high transaction rates and low response times.

So, if your application is mainly focused on network performance and data transfer, layer 4 acceleration may be more appropriate. If your application is focused on optimizing application performance and user experience, then layer 7 acceleration may be the better choice.


---

# 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/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.
