WebSocket
If you have added whole site acceleration domain names to CDN to meet requirements such as on-screen commenting, collaborative session, market data broadcast, sports live update, online education, and IoT connectivity, you can configure WebSocket to implement long-term bidirectional data transmission.
Background
WebSocket is a protocol providing full-duplex communication channels over a single TCP connection. It allows a server to proactively push data to clients, simplifying data exchange between the clients and server. A persistent connection can be established between a browser and the server after one handshake and bidirectional data transmission can be performed, saving server resources and bandwidth.
Precautions
- This function applies only to domain names whose service type is whole site acceleration.
- This function is in OBT and is available for free trial.
- The maximum timeout interval is 300 seconds. If no message is transferred within the specified interval, the connection is closed.
- You cannot configure WebSocket for domain names with special configurations.
- Do not enable both WebSocket and HTTP/2. Otherwise, your domain name cannot be accessed.
Procedure
-
Log in to Huawei Cloud console. Choose .
The CDN console is displayed.
- In the navigation pane, choose .
- In the domain list, click the target domain name or click Configure in the Operation column.
- Click the Advanced Settings tab.
- In the WebSocket Settings area, click Edit. Figure 1 WebSocket Settings
- Enable Status, set a proper timeout interval (1s to 300s), and click OK.
Last Article: Smart Compression
Next Article: Request Rate Limiting
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.