In: Computer Science
Referring to Problem 2 above, suppose the HTML file references ten very small objects on the same server. Neglecting transmission time, how much time elapses with a. Non-persistent HTTP with no parallel TCP connections? b. Non-persistent HTTP with the browser configured for 3 parallel connections? c. Persistent HTTP? (Assume that pipelining is used.)
Answer:
a)Non persistent HTTP with no parallel TCP connection
In non Persistent HTTP connection is immediately closed after a transfer of an object.
Hence for each object transfer, we have to establish a connection first.
To establish a connection (between server and client) we need 1 RTT and 1 RTT to request and transfer an object. (Ignoring all other delay like Transmission delay, processing delay)
To transfer an object we need a reference to the file also. To get a file we need also a 2 RTT because 1 for connection and 1 for transfer a file (TCP connection).
Hence total time = DNS query RTT + file transfer time+ 10 object transfer time
DNS query = RTT1+ RTT2+….+ RTTn
File transfer= 2RTT0
10 object transfer time =10*2RTT0 (because in non persistent HTTP 2 RTT are required for each object transfer, 1 for Connection and 1 for object transfer)
Hence Total= RTT1+ RTT2+….+ RTTn+2RTT0+(10*2)RTT0
Total=22*RTT0 + RTT1+ RTT2+….+ RTTn
b)Non-Persistent HTTP with the browser configured for 3 parallel connections:
2 RTT0forreceiving the HTML file and the 3 parallel connection for 3 objects would take another 2RTT0and for the another 3 objects would take another 2 RTT0 and the another 3 objects would take another 2 RTT0 and the remaining one object would take 2 RTT0 total time now would be =2 RTT0+ 2 RTT0+2 RTT0+2 RTT0+1*2 RTT0 +RTT1+ RTT2+ RTT3+ RTT4+…. +RTTn
In total = 10RTT0+RTT1+ RTT2+ RTT3+ RTT4+…. +RTTn
c)Persistent HTTP with pipeline.
In Persistent HTTP only 1 time connection establishment is needed. No need to establish a connection for successive transmission.
In persistent HTTP with pipeline
We need 2 RTT for web page (1 for connection and 1 for page transfer (TCP connection))
And to transfer 10 objects we need only 1 RTT.
Hence
Total=2 RTT0+1 RTT0+( RTT1+ RTT2+….+ RTTn)
Total=3 RTT0+RTT1+RTT2+.....+RTTn