Wednesday, June 25, 2014

Part 3 Http Unrevealed- Connections

Parallel Connection-

Initially it is like one user agent-web browser can establish two connection with host webserver. Just imagine we have two files that needs to be requested therefore browser makes two requests and establish two connection to download the files.

IE6 used to have this 2 connection setup.

* Approach 1:
We keep files in different server in that case user agent can opens parallel connections to host server. In that sense, we states two connections is directly proportional to host and not IP addresses of the host. So we conclude two connection is dependent on host but independent of IP address.

* Approach 2:
With case of IE8 where it applies heuristics logics and it establish 6 concurrent connections w.r.t host.
Persistent Connections:-
 Connection: keep-alive
This is a state where we keep the socket opened or maintain persistent connection even it server one request response transaction for given user agent. It persist the connection between user agent and host and consume same socket opened for communication. With this there is no overhead on memory consumption, cpu utilization, less network congestion, less latency, more throughput and improves response time of given request.

The only demerits about this type of connection is falling prey of security vulnerability. Longer period of open connections can pose threat to security compromise. Some webserver close connections when idle even we can configure
user agent or webserver to close connection when idle for certain threshold limit.

HTTP/1.1 200 OK
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Connection: close

This close header indicates that connection will be closed as soon request is served with response and hence no subsequent request on same socket is available.

Pipelined Connections-

It opens up multiple connections and queue the requests into efficient packets. But this is not widely used.
Post a Comment