Non-persistent vs. Persistent HTTP

Non-persistent and persistent are the two types of HTTP connections used to connect the client with the webserver. The non-persistent connection has connection type 1.0, while the persistent connection has connection type 1.1.

Non-persistent

The non-persistent connection takes a total time of 2RTT + file transmission time. It takes the first RTT (round-trip time) to establish the connection between the server and the client. The second RTT is taken to request and return the object. This case stands for a single object transmission.

After the client receives the object in non-persistent, the connection is immediately closed. This is the basic difference between persistent and non-persistent. The persistent connection ensures the transfer of ​multiple objects over a single connection.

Persistent

A persistent connection takes 1 RTT for the connection and then transfers as many objects, as wanted, over this single connection.

RTT stands for the round-trip time taken for an object request and then its retrieval. In other words, it is the time taken to request the object from the client to the server and then retrieve it from the server back to the client.

Sample problem

Suppose 10 images need to be downloaded from the HTTP server. The total time taken to request and download 10 images in a non-persistent and persistent connection is:

Non-persistent

2 RTT (Connection time) + 2 * 10 RTT= 22RTT22 RTT

Persistent

2 RTT (Connection time) + 10 RTT= 12RTT12 RTT

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved