WebSocket vs REST API usages

Hello Developers,

Good day, I’ve a question, If I use Socket.IO instead of REST API is it good practice?I know I cant do everything using Socket.IO but 90% work, I can. What is the drawback and what is the advantages?If it is a good practice why most people doesn’t use it ?

It has specific use cases. It is meant for bidirectional real-time stuff. It uses WebSocket or polling. That is not something that is needed with most REST APIs. I would imagine some overhead, resource consumption, and cross-device compatibility are some of the downsides.

I’m sure if you search for this question you will find Stack Overflow posts and articles going more in-depth.

Yeah I find out the solutions. Thank you

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.