Question 4 20 points HTTP has two types nonpersistent HTTP a
Question 4 (20 points): HTTP has two types: non-persistent HTTP and persistent HTTP. Non-persistent HTTP has two types: without parallel TCP connection and with parallel TCP connections. Persistent HTTP has two types: without pipelining and with pipelining.
Suppose a client tries to access 3 objects in a server. Please calculate the time between when client initiates the TCP and it receives the last object, in all four types. Assume a small packet takes RTT time to travel from client to server and back. 3 objects are equal sized, so server takes equal amount of time, which is T, to transmit each.
a-Non-persistent HTTP without parallel TCP connection.
b-(3 points) Non-persistent HTTP with parallel TCP connection, with the browser configured for 2 parallel connections.
c-(4 points) Persistent HTTP without pipelining. (4 points)
d-Persistent HTTP with pipelining. (4 points)
Solution
The problems with HTTP can best be understood by looking at the network traffic generated by a typical HTTP transaction. This example was generated by using Van Jacobsen\'s tcpdump program to monitor a client at UNC fetching a copy of the NCSA Home page. This page is 1668 bytes long, including response headers. The client at UNC was a Sun Sparcstation 20/512, running Solaris 2.3. The server at NCSA was a Hewlett Packard 9000/735 running HP-UX.
The headers used in the request shown were captured from an xmosaic request. The headers consisted of 42 lines totaling around 1130 bytes; of these lines, 41 were \"Accept\".
Stage 1: Time = 0
The trace begins with the client sending a connection request to the http port on the server
.00000 unc.32840 > ncsa.80: S 2785173504:2785173504(0) win 8760 <mss 1460> (DF)
Stage 2: Time = 0.077
The server responds to the connect request with a connect response. The client acknowledges the connect response, and send the first 536 bytes of the request.
.07769 ncsa.80 > unc.32840: S 530752000:530752000(0) ack 2785173505 win 8192
.07784 unc.32840 > ncsa.80: . ack 1 win 9112 (DF)
.07989 unc.32840 > ncsa.80: P 1:537(536) ack 1 win 9112 (DF)
Stage 3: Time = 0.35
The server acknowledges the first part of the request. The client then sends the second part, and without waiting for a response, follows up with the third and final part of the request.
.35079 ncsa.80 > unc.32840: . ack 537 win 8192
.35092 unc.32840 > ncsa.80: . 537:1073(536) ack 1 win 9112 (DF)
.35104 unc.32840 > ncsa.80: P 1073:1147(74) ack 1 win 9112 (DF)
Stage 4: Time = 0.45
The server sends a packet acknowledging the second and third parts of the request, and containing the first 512 bytes of the response. It follows this with another packet containing the second 512 bytes. The client then sends a message acknowledging the first two response packets.
.45116 ncsa.80 > unc.32840: . 1:513(512) ack 1147 win 8190
.45473 ncsa.80 > unc.32840: . 513:1025(512) ack 1147 win 8190
.45492 unc.32840 > ncsa.80: . ack 1025 win 9112 (DF)
Stage 5: Time = 0.53
The server sends the third and fourth response packet. The fourth packet also contains a flag indicating that the connection is being closed. The client acknowledges the data, then sends a message announcing that it too is closing the connection. From the point of view of the client program, the transaction is now over.
.52521 ncsa.80 > unc.32840: . 1025:1537(512) ack 1147 win 8190
.52746 ncsa.80 > unc.32840: FP 1537:1853(316) ack 1147 win 8190
.52755 unc.32840 > ncsa.80: . ack 1854 win 9112 (DF)
.52876 unc.32840 > ncsa.80: F 1147:1147(0) ack 1854 win 9112 (DF)
Stage 6: Time = 0.60
The server acknowledges the close.
.59904 ncsa.80 > unc.32840: . ack 1148 win 8189

