********************explanation behind 6 and 9 rtts***************************
For persistent HTTP with pipelining
Persistent HTTP – TCP Connection is Established only once and multiple files are transmitted in that single connection.
Pipelined – Pipelined means that a new HTTP request could be sent to server without receiving the Acknowledgment of previous request.
-------------------------------------------------------------------------------------------------------------------------------------------------
- The host will contact the DNS servers to Resolve the Domain Name and getting the IP address. This will take 3RTTs.
- Now, client Establishes TCP connection with the gate-2023.in server that will take 1RTT
*****The last Ack is sent on HTTP Request Packet (piggybakced) *****
- Client sends HTTP request to get the Base HTML file and receives it in 1RTT.
- Finally Client sends HTTP requests( PIPELINED ) for objects and receives all 10 objects in 1RTT .
Everything together :
3RTTs (dns) + 1RTT(TCP connection establishment) + 1RTT(Html Base file) + 1RTT(objects) = 6RTTs
For non-persistent HTTP with 5 Parallel connections
non-Persistent – TCP connection is made for each HTTP request and then closed.
5 parallel connections – 5 objects could be sent parallelly at same time.
- 3RTTs for DNS resolution.
- 1RTT for TCP connection establishment.
- 1RTT for getting HTML base file.
- 1RTT for establishing TCP Connection again.
- 1RTT for getting 5 objects parallelly ( 5 left ).
- 1RTT for establishing TCP connection again.
- 1RTT for getting remaining 5 objects.
Everything together:
3RTTs (dns) + 3RTTs (TCP connection establishment) + 1RTT (HTML Base file) + 2RTTs ( objects ) = 9RTTs