how does http non persistent (parallel and serial) connections work?

Started by blueberry123, June 01, 2022, 11:09:47 AM

Previous topic - Next topic

blueberry123

This figure is the one given in not my textbook mentioned in syllabus but the local author book that many teachers use to follow while checking exam papers. If you don't write according to what is written in these books, they won't even give you 0.001 marks. So I want to learn this figure rather than others.

https://imgur.com/a/vBN9wtl

Here
-> first RTT for starting TCP connection,
-> second for requesting the base file with elements not loaded.


Why are multiple objects being received from just 1 request-response RTT? Should not just 1 object be received from it?
I am assuming that one RTT is to establish TCP connection yet again and another RTT is to request and get response. But why are there multiple objects being received in a single request response RTT, I don't get that and that's why the confusion for.
How does non persistent serial http connections work? (the slides that I've used are ambiguous so I am asking this question)

You can ignore the rest part of the question if you have answer to this already. It is all my unorganized thoughts about this topic, my hypothesis of how they should work etc.





My attempt at how non persistent parallel connections should work-:
I made this figure how I think non persistent parallel connection should be, can you verify it and if wrong help me make a new one?
https://imgur.com/a/hnsTz2R



Handmade figure is below which I hope is more clearer-:
https://imgur.com/a/6AFoCkV



explanations of this figure-:

1) initiate tcp connection for base file RTT happens

2) request-response RTT for base file happens

3) initiate tcp connection for element1 as soon as the base file RTT completes, then as soon as connection is set up, send request for element1-> then its response comes after some times.

4) initiate tcp connection for element2 as soon as tcp connection initiation for element1  starts , subsequently, send request for element2-> then its response comes.

5)then start closing tcp connections for base file, element1, then element2 consecutively.











HTTP Definitive guide figure discussion-:
What does connect-1 means in this figure below? Does it mean just starting the connection? Why is it not including the terminating of connection? Are we ignoring end of connection for each request-response in parallel connection?(If you watch the serial connection, it is ignoring tcp connection termination even in serial connections)
Source-: HTTP the definitive guide.
Both of the below figures I am assuming to be non persistent connections.
https://imgur.com/a/4QL4IZm














How non persistent(serial) connections should be working-:

But Isn't this how non persistent(serial) connections work?
-> tcp connection establishment 1 RTT
-> request response A 1 RTT
-> tcp connection close 1 RTT

Now for request response B
-> tcp connection establishment 1 RTT
-> request response B 1 RTT
-> tcp connection close 1 RTT

A source that confirms this-:
https://imgur.com/a/M1j3Ugs



But some sources are writing this-:

https://imgur.com/a/yZHjxpJ

So in this case there will be 1 less RTT for each file transfer i.e connection close RTT isn't considered. How is this alright? The first one that I said and this is totally different. As you can see for 2 objects, it will require just 2RTT+2 file transmission time

Now if i just calculate non persistent serial connection working(according to what I've understood from the slide just shown above)
-> 1 RTT to establish TCP connection
-> 1 RTT for request-response.
->file transfer time
-> 1 RTT for connection close
Again for second object same process happens. So it gives 6 RTTs+2*file transmission  time. Why isn't that the case in the slide shown there?The figures and explanations are from the same slides. (You can google kurose ross persistent non persistent http slides)

deanwebb

It's possible to do a bulk request, which can have a one-to-many relationship to responses.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

blueberry123

ah i see. things are more and more confusing. but how can 1 request give you multiple responses? what kind of request might that be?

deanwebb

Quote from: blueberry123 on June 03, 2022, 07:54:05 AM
ah i see. things are more and more confusing. but how can 1 request give you multiple responses? what kind of request might that be?

It would be a bulk request.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.