Http Pull and Push

HTTP Pull

As we know that all the communications in a client server architecture begins with client sending a request to server and then server responding to that request.

This request is also called HTTP Pull where client keeps on making calls to server for updated information.

A disadvantage for this approach is that for any new information client has to always make a call to the server which increases the network utilization and costs money.

HTTP Push

To tackle issues with HTTP Pull, HTTP Push mechanism can be used.

In this mechanism the client sends the request to server for the first time, but after that any new updates for the same request is pushed by the server without a new call from client.

In HTTP Pull based mechanism clients use AJAX (Asynchronous Javascript and XML) to send requests to the server. Several other mechanisms for HTPP Push are:

  • Message Queues
  • HTML5 Event Source
  • Web Sockets
  • Streaming over HTTP