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 active 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.
Without WebSocket, the client has to pull data from the server through polling.
There are two shortcomings in this data exchange method:
Key advantages of WebSocket:
CLB supports WS/WSS by default and no additional fees will be charged.
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.
Currently, WS/WSS protocols are supported in all regions.