What is WebSocket? How it does it work in ServiceNow instance? For what purpose do we use WebSocket?Issue What is WebSocket? How can we disable the WebSocket protocol in ServiceNow Instance? How does ServiceNow use WebSocket?ReleaseMadrid and onwardsResolutionWebSocket is a protocol, providing full-duplex communication channels over a single TCP connection. Whereas, HTTP provides half-duplex communication.The information exchange model of WebSocket is bidirectional. This means, a server can push information to the client (which does not allow direct HTTP)In a ServiceNow instance, WebSocket protocol is only used by AMB and it helps with its performance since it's more efficient than "long-polling". If a WebSocket connection can't be established (because of firewall, proxy, etc.) it falls back to long-polling and everything will still function normally.The client makes a call to communicate over WebSocket with the server, if the client can't get an acknowledgment from the server, the client gets "Unexpected response code: 400". This is an error message visible in the browser console log: js_includes_concourse.jsx?v=05-01-2020_1402&lp=Sun_Jun_07_18_36_34_PDT_2020&c=38_1037:3084 WebSocket connection to 'wss://<instance_name>.service-now.com/amb' failed: Error during WebSocket handshake: Unexpected response code: 400(anonymous) @ js_includes_concourse.jsx?v=05-01-2020_1402&lp=Sun_Jun_07_18_36_34_PDT_2020&c=38_1037:3084 If the communication channel is blocked because of some reason (intermediary firewall, load balancer, VPN, proxy rules, etc.), the above error message will always be observed and it's expected. The client always makes its first call assuming the server supports WebSocket and the client immediately switches to long-polling (HTTP), if it's not available from the client-side.WebSocket protocol on ServiceNow instances is enabled by default. It can be turned off by setting (creating if needed) the system property "glide.cometd.websocket.enabled" to false, but this is not recommended.Clients can send messages on channels they have subscribed to. The server receives the message and publishes the message to clients which have subscribed to that channel.With the help of WebSocket and long-polling, AMB is powering chat, virtual task board, agent workspace, presence, etc.In order to test WebSocket connectivity from the client side, you can navigate to this page to run a simple diagnostic: https://<instance_name>.service-now.com/$websocket_test