Contents

About web sockets(3)

   Jul 31, 2023     1 min read

This is a post to learn and share about web sockets.

In About Web Sockets (2), we discussed why Web Sockets came into existence and the disadvantages of one-way communication. Today, we’ll discuss the disadvantages of Web Sockets (two-way communication).

Disadvantages

  • Complexity and difficulty maintaining: Two-way communication requires a constant connection between the client and server. This can increase the complexity of the application and make it difficult to maintain. Especially in large applications, it can require additional work to manage connections and handle errors.
  • Security and authentication issues: Because two-way communication requires a persistent connection, it requires more attention to security and authentication. Malicious users can abuse the connection, or there can be security weaknesses. Make sure you have appropriate security measures in place.
  • Server resource usage: Bi-directional communication can increase the resource usage of the server as it needs to maintain a continuous connection between the client and the server. If a large number of simultaneous connections occur, this can impact server load.
  • Compatibility issues: Because bi-directional communication is a feature that all clients must support, there can be compatibility issues with all browsers and platforms. In particular, older browsers or devices may not support bi-directional communication.
  • Network limitations: Because two-way communication requires a continuous connection between the client and server, it can be limited by the network environment. Sometimes network components, such as firewalls or proxies, can block two-way communication.

Conclusion

These disadvantages are things to consider when implementing bidirectional communication, and you should implement it in a way that is appropriate for your application’s needs and environment.