WS/WSS Protocol Support

Last updated: 2021-01-14 19:03:35


    Product Introduction

    Product Purchase

    Product Implementation

    What is WS/WSS?

    WebSocket (WS) is a protocol that provides full-duplex communication channels over a single TCP connection.
    WebSocket facilitates data exchange between the client and server, and allows proactive data push from the server to client. In WebSocket API, only one handshake is required between the browser and server to create a persistent connection and carry out bi-directional data transmission.

    [Back to Top]

    Why should I use WS/WSS?

    Without WebSocket, the client has to pull data from the server through polling.
    There are two shortcomings in this data exchange method:

    1. Low efficiency. To pull real-time data, the client has to frequently initiate the Ajax request.
    2. The server cannot push data proactively.
      WebSocket is designed to solve these problems. As a new protocol released when HTML5 was launched, WebSocket achieves full-duplex communication between the browser and server. It can transmit message-based text and binary data, solving HTTP problems at the protocol level.

    Key advantages of WebSocket:

    1. Less overhead. After the connection is established, the packet header used for control is small. Compared to an HTTP request that requires a complete header, WebSocket helps reduce the overhead.
    2. Real-time push. As a full-duplex protocol, WebSocket can achieve real-time data push from server to client.
    3. Persistent connection.

    [Back to Top]

    How does the WS/WSS billing work?

    CLB supports WS/WSS by default and charges no additional fees.

    [Back to Top]

    How to enable WS/WSS on CLB instances?

    WS/WSS is enabled by default and no additional configuration is required.
    If the listener listens to HTTP, WS is supported by default. If it listens to HTTPS, WSS is supported by default.
    When WSS is used, CLB will carry out SSL offloading.
    [Back to Top]

    Which regions support WS/WSS?

    Currently, WS/WSS protocols are supported in all regions.

    [Back to Top]

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help