Discuss Non-Persistent and Persistent Connections with HTTP.

Discuss Non-Persistent and Persistent Connections with HTTP

Answer:-

HTTP with Non-Persistent Connections

Let’s walk through the steps of transferring a Web page from server to client for the case
of non- persistent connections.

Further suppose the URL for the base HTML file is http://www.someSchool.edu/someDepartment/home.index

Here is what happens: 

  1. The HTTP client process initiates a TCP connection to the server www.someSchool.edu on port number 80, which is the default port number for HTTP. Associated with the TCP connection, there will be a socket at the client and a socket at theserver. 
  2. The HTTP client sends an HTTP request message to the server via its socket. The request message includes the path name /someDepartment/home.index. 
  3. The HTTP server process receives the request message via its socket, retrieves theobject 
  4. /someDepartment/home.index from its storage (RAM or disk), encapsulates the object in an HTTP response message, and sends the response message to the client via its socket. 
  5. The HTTP server process tells TCP to close the TCPconnection. 
  6. The HTTP client receives the response message. The TCP connection terminates. The message indicates that the encapsulated object is an HTML file. The client extracts the file from the response message, examines the HTML file, and finds references to the 10 JPEG objects. 
  7. The first four steps are then repeated for each of the referenced JPEGobjects. 

HTTP with Persistent Connections 

Non-persistent connections have some shortcomings. 

  1. A brand-new connection must be established and maintained for each requested object. For each of these connections, TCP buffers must be allocated and TCP variables must be kept in both the client and server. This can place a significant burden on the Web server, which may be serving requests from hundreds of different clientssimultaneously. 
  1. Each object suffers a delivery delay of two RTTs— one RTT to establish the TCPconnection and one RTT to request and receive anobject. 

Leave a Reply

Your email address will not be published. Required fields are marked *