What are the differences between persistent and non-persistent HTTP connections?
Explain it. If you want to get the 8 files from the server using persistent connections, what
would be the total file transmission time using RTT time? Explain and justify your answer.
Answer:
Non-persistent and persistent connections are used to connect the client with the webserver. Despite this, they have some differences which include:
•Non-persistent uses 1.0 connection type while persistent uses 1.1 connection type.
•The non-persistent connection time is of 2RTT+file transmission time. This means, it takes the first round-trip to establish the connection and second RTT is taken to request and return the resource/object. On the other hand, persistent connection uses 2RTT for connection and then transfers the objects as wanted.
•Non-persistent connection returns only one object over single connection while persistent connection returns multiple objects over a single connection.
•Non-persistent connection defines 16 status codes while persistent connection defines 24 status codes.
•Non-persistent connection only uses basic authentication, this makes passwords and usernames unencrypted. Also it has no time dependencies. For persistent connection, Digest Access Authentication is used. This makes secret information such as passwords and usernames encrypted on the fly.
•Non-persistent connection establishes a new connection for every request while persistent connection assumes a connection is kept open after transmission of a request and getting response. This solves the problem of making each request suffer the cost of setting up new TCP connection.
To get 8 files from server using persistent connection:
Total RTT time will be given by:
2 RTT (connection time) + 8RTT
= 10 RTT time. (NB: without pipelining).
Share To Friends Via:
More Questions For Networking and Data Communication: