jeudi 1 janvier 2015

HTTP TCP AND WEB SOCKET


Please correct me if i am wrong. One of the advantage of using HTTP protocol in web application is to minimize the share of server resources between the clients. Even if there are thousands of simultaneous connections, the load on the server is greatly reduced because of this stateless nature of HTTP.


On the other hand if the connection was statefull (e.g TCP), then server would need to open and keep the connection alive for thousands requests causing a huge load on the server. So it makes a perfect sense why the HTTP was made stateless for working in web application.


My confusion is regarding the web socket, if web socket uses the TCP for real time communication between the clients an server, how can it be a good choice (considering the load on the server) for any web based real time application? How is the load for multiple connections handled by web socket server?


Thank you





Aucun commentaire:

Enregistrer un commentaire