# When should I consider using Layer 7 WebSockets

Layer 7 WebSockets should be used when real-time, bi-directional, and persistent communication between the client and the server is required. This is because WebSockets allow for efficient and low-latency communication by maintaining a persistent connection between the client and the server, avoiding the overhead of setting up and tearing down a new connection for every request.

Some common use cases for WebSockets include:

1. Online gaming: WebSockets can be used to create real-time multiplayer games that require low-latency communication between players and the server.
2. Chat applications: WebSockets can be used to create chat applications that require real-time messaging and notifications.
3. Collaborative editing: WebSockets can be used to enable real-time collaboration between multiple users, such as in document editing applications.
4. Real-time monitoring and notifications: WebSockets can be used to provide real-time updates and notifications for events such as stock prices, weather updates, or social media feeds.


---

# 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/when-should-i-consider-using-layer-7-websockets.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.
