In: Computer Science
Suppose an HTML file references 4 very small objects (therefore total of 5 objects including the HTML file).
The HTML file and the referenced objects are stored in a different server i.e. One server that has the HTML file and another server that contains all the referenced objects.
Neglecting transmission times, home much would have elapsed for all the objects to be loaded/received in
Part 1 (5 points): Persistence connection scenario
Part 2 (5 points): Non- persistence connection scenario
Assume that the round-trip delay is 40ms for each back and forth communication (even for establishing TCP connection). It is the same for both the servers.
The Hypertext Transfer Protocol (HTTP) is an application-level protocol that uses TCP as an underlying transport and typically runs on port 80. HTTP is a stateless protocol i.e. server maintains no information about past client requests.
1.persistent
2.Non-persistent
RTT-> Time for a small packet to travel from client to server and back.
RTT= 2*propagation time
In persistent Lower CPU and memory usage because there are less number of connections,Allows HTTP pipelining of requests and responses, Reduced network congestion (fewer TCP connections), Reduced latency in subsequent requests (no handshaking).
In Non-persistent It requires connection setup again and again for each object to send.
according to Given,
persistence connection scenarion
Time taken=2RTT(connection time)+2*4RTT
=2*40+2*4*40
=80+320
=400ms
Non-persistence connection scenarion
Time Taken=2 RTT(connection time)+4
RTT=2*40+4*40
=80+160
240ms