Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Round Trip Time Http on non persistent, persistent, persistent with pipelining

networking is my final course in my Masters degree. I do have a question regarding how to calculate Round Trip Time of http on non persistent, persistent and persistent with pipelining.

After spending countless hours reading regarding the issue, downloading notes from other unis and even searching for youtube videos i was unable to sort this out.

In order to understand how RTT is calculated let's just say that a client asks for an HTML page that contains 10 images. [ Let's keep Propagation delay at zero.]

Please follow my logic

First of all the 3 way handshake that TCP connection does counts as 1 RTT. So does when TCP connection closes.

1) In non Persistent HTTP , we have to make the TCP connection so it's 1 RTT so far. Since we have 10 objects we will have 2*10=20 RTT's. This leads to 1RTT +20 RTT's = 21 RTT's. [ A different way this can be calculated is by saying that since it opens new connections each time, for 10 objects it will need 3 RTT's so it will 30 RTT's.]

2) In persistent HTTP, we need one 1RTT for the connection and 1 for each object. This leads to 1RTT+10RTT's= 11 RTT's. [ Should i add an RTT for closing connection thus leading to 12 RTT's? In my understanding it will time out by it self after a while.]

3) In Persistent HTTP with pipelining, we will need one RTT to open the TCP connection, one RTT to send 10 objects and one RTT to close the connection. This leads to 1RTT+1RTT+1RTT=3 RTT's.

Any help on this matter would be highly appreciated!

like image 204
James.D Avatar asked Jan 06 '23 19:01

James.D


1 Answers

I know this is late, but I'll answer some of this to help those that may come across this thread on Google at some point.

So, we want to get 10 objects from a page. This is our goal.

There are a couple things we need to do to reach our goal, first.

Step 1 We need to find the address of the page in the first place. We do this by visiting multiple DNS servers until we find the desired address. This comes out to RTT1 + RTT2 + ... + RTTn.

Step 2 Now that we have the address of the page, we need to ask it for the references to the 10 objects. Since this is a non-persistent TCP connection, we do RTT to initialize the connection, and RTT to request and retrieve the references. This comes out to 2RTT.

Step 3 Finally, we can get all 10 objects. Since this is non-persistent connection, every time we need an object, we need to initialize the connection, and then request and retrieve the object. We do this 10 times. 10(2RTT)

Total them up!

Total Time = (2RTT) + 10(2RTT) + (RTT1 + RTT2 + ... + RTTn)
       = 11(2RTT) + (RTT1 + RTT2 + ... + RTTn)
       = 22RTT + (RTT1 + RTT2 + ... + RTTn)

I hope this helps clarify things for you in regards to non-persistent TCP connection!

like image 91
TheWhalePhail Avatar answered Apr 06 '23 03:04

TheWhalePhail