About non persistent (parallel and serial) http connections doubts-:

In summary, the figure given in the textbook mentioned in the syllabus but not the local author book that many teachers use is different. 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.
  • #1
shivajikobardan
674
54
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://lh3.googleusercontent.com/q7gtLMJUWUyEFvdyaQcsJsBYNB-AMh3lnv-P5HU_x7ujIzqFvI8Glgdxo6sCHB6thTCpXiAa1is1TR4SLOdrLyAZxGCv8zv66MvVAZR_caG2BBg3s6ibtIge29HhsbDBsWDdjxc3iBxKaf8Y8A
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://lh4.googleusercontent.com/wzKsFXIJkcMXgL3vELu24e1pw9faZMCcBjdjmmYBHfev3AXXl-GTvQZJzZBBRaWJH6WJCyAY8Cn83H122hAnudF-AvXhl_H47SD1GxQfcqiXX8cXVu1nWr4BMYz08v6beJDo3YAQytps6qsuPg
Handmade figure is below which I hope is more clearer-:
https://lh6.googleusercontent.com/GyP8EKizK-gQXbCJXmTCnPq0yEz6FY1G_qVEB4p4HUNhLxXCx8272_HnNsU2_IH7A-MiqiSNlQeDgoF97oPHGppDZYiE_IwKFWUj-tISeJfIlq8TiCzCJosZDEimm5J18lD7ZBPfQobmy5HNGQexplanations 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://lh5.googleusercontent.com/yVWsl18TmsWBrzBYuTBF8Gze54gRgX3qCWo3_bN1jfW7rcw9n7sppcSU-u98_53sYfsJX46Gs3BBRgvp2odTB_B9PIpv32krqB8UkW32H-cvB_YCOPQ05vCpWKobefNqXr8C3o6-IGMHR_SS8ghttps://lh3.googleusercontent.com/hnucLbLzG0FHN5_cv51H0a_mlSgdR738dHbL28gCgqb1HC4nUQPnB1vfvYJmr61GkZp4tI0I7MW8OkefuVO2LYevFC2MXb9hhxaDSDLx-7bOytEe4irK7ZKXN_e8yFBhUR1NqrRZSGt-2DaiKw
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://lh3.googleusercontent.com/0dLb6e7AbPV3e9V7UX1GpEZvCRakArt8-hUTmLCo4Eelth5P2U-WyrkcgzlNMrnj76gZxnnFY8FIw4w1NeSBEcM_mWGLYkPbAQIkacoH9LYbPo22FL6PaGvG8sDOWmbHA-L4TrEdOpkKLbSPowBut some sources are writing this-:
https://lh5.googleusercontent.com/55tF82JitPAd-xrz5ErAqctS9hEoBG-205MmsF0JLA4A-cM9Q_FXjnWYRwLBsHNC3wSlBeosE4AdWqRH1AxSsoz7bbkA5vt83DpKhawTYu8pQiSCxQmKA3kqWugwqXuHu4D83iKWt0z-NO90FA
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)
 
Technology news on Phys.org
  • #2
So my question is why is the first figure(slide) correct and not the one I am suggesting? Is it because of multiple objects being received from just 1 request-response RTT and that’s why the connection close RTT is being ignored? Why is this alright and not the other way I mentioned?
 

What are non persistent HTTP connections?

Non persistent HTTP connections refer to connections that are closed after a single request and response between a client and server. This means that for every new request, a new connection must be established.

What is the difference between parallel and serial HTTP connections?

In a parallel HTTP connection, multiple requests can be sent simultaneously over a single connection. In a serial connection, requests are sent one after the other, with each request waiting for a response before the next request can be sent.

What are the advantages of using parallel HTTP connections?

Parallel HTTP connections can improve the performance of web applications by allowing multiple requests to be sent at once, reducing the overall response time. This is especially beneficial for loading resources such as images, scripts, and stylesheets on a webpage.

What are the disadvantages of using non persistent HTTP connections?

One major disadvantage of non persistent HTTP connections is the overhead of establishing and closing connections for every request. This can impact the performance of a website, especially if there are a large number of requests to be made. Additionally, non persistent connections may not be suitable for large file transfers.

Can non persistent HTTP connections be used for all types of web applications?

No, non persistent HTTP connections may not be suitable for all types of web applications. Applications that require frequent, continuous communication between the client and server, such as real-time messaging or video streaming, may benefit from using persistent connections instead.

Similar threads

  • Programming and Computer Science
Replies
1
Views
594
  • Quantum Interpretations and Foundations
11
Replies
376
Views
10K
  • Introductory Physics Homework Help
Replies
3
Views
1K
  • Electrical Engineering
Replies
5
Views
3K
  • Special and General Relativity
3
Replies
75
Views
3K
  • General Discussion
Replies
4
Views
668
Replies
12
Views
2K
  • Beyond the Standard Models
Replies
11
Views
2K
  • STEM Academic Advising
Replies
13
Views
2K
Back
Top