Tutorial 4 Solution

Tutorial 4 Solution
NON-PERSISTENT HTTP W AND W/O PARALLEL CONNECTIONS VS. PERSISTENT
HTTP
TASK A
Suppose within your Web browser you click on a link to obtain a Web page. Further suppose that the Web
page associated with the link contains an HTML file that references eight very small objects on the same
server.
Let the RTT denote the (Round-Trip Time) between the local host and the server containing the object.
Neglecting transmission times, how much time elapses with
a. Non-persistent HTTP with no parallel TCP connections?
b. Non-persistent HTTP with the browser configured for 5 parallel connections?
c. Persistent HTTP with all objects fitting into a single TCP segment?
SOLUTION
For each of the above three cases, the beginning is the same.
When you click on a hyperlink, this causes the browser to initiate a TCP connection between the browser and
the Web server. This TCP connection involves a three-way handshake; the client sends a small TCP segment to
the server, the server acknowledges and responds with a small TCP segment, and finally, the client
acknowledges back to the server.
The first two parts of the three-way handshake take one RTT. After completing the first two parts of the
handshake, the client sends the HTTP request message combined with the third part of the three-way
handshake (the acknowledgment) into the TCP connection. Once the request message arrives at the server,
the server sends the base HTML file into the TCP connection. This HTTP request/response eats up another
RTT.
As such, the total response time to request and receive the base HTML file is two RTTs plus the transmission
time at the server of the HTML file. However, since the question asks to neglect transmission times, the total
time elapsed to request and receive the base HTML file is 2 RTT , as illustrated in the figure below.
a. In non-persistent HTTP, one separate TCP connection is required per requested object.
Time elapsed = 2 RTT + 8 * (1 RTT to set up TCP connection + 1 RTT to request and receive referenced object)
= 2 RTT + 8 * (2 RTT ) = 18 RTT
b. In part a, there were no parallel connections, which means that the eight referenced objects would have to
requested and received one at a time; that is, serially.
With five parallel connections, at most five referenced objects can be requested and received simultaneously.
However, there are eight referenced objects in total. As such, two RTTs are required; the first for the first five
objects, and the second for the remaining three objects.
Time elapsed = 2 RTT + 2 * (2 RTT ) = 6 RTT
c. In persistent HTTP, one TCP connection is required for all objects to be requested from a specific server.
Since the base HTML file and all 8 objects reside on the same server, one TCP connection is required for all
of them. Since all 8 objects fit into a single TCP segment, the objects are requested and received within the
same RTT.
Time elapsed = 2 RTT +RTT = 3 RTT
Check your understanding (TASK B) : TRUE OR FALSE
a. A user requests a Web page that consists of some text and three images. For this page, the client will send
one request message and receive four response messages.
b. Two distinct Web pages (for example, www.mit.edu/research.html and www.mit.edu/students.html) can be
sent over the same persistent connection.
c. With non-persistent connections between browser and origin server, it is possible for a single TCP segment
to carry two distinct HTTP request messages.
d. The Date: header in the HTTP response message indicates when the object in the response was last
modified.
e. HTTP response messages never have an empty message body.
SOLUTION
a. True
b. False
c. False
d. False
e. True
Midterm 2015 Problem 4i:
Consider a Network for which there is an institutional LAN network connected to the Internet. The
access link to the Internet has a rate of 8 Mbps and the institutional LAN rate is 100 Mbps. Suppose
that the average web page size is 500,000 bits composed of 10 objects. The average request
rate from the institution’s browsers to the origin servers is 10 web page requests per second. Also
suppose that the amount of time it takes from when the router on the Internet side of the access
link forwards an HTTP request until it receives the response is 2 seconds on average.
The total average response time for any objects is modeled as the sum of the average access
delay (that is, the delay from Internet router to institution router) and the average Internet delay
and the average LAN delay.
- For the average access delay, use Δ / (1 – Δβ), where Δ is the average time required to
send an object over the access link and β is the arrival rate of objects to the access
link.
- For the LAN delay assume that it is equal to the transmission time of an object
(20 Marks)
i. In order to download one web page, what would be the average download time if Nonpersistent HTTP with no parallel TCP connections?
LAN
HTTP Client
Internet
LAN
Router
Download Time for
One Object
Internet
Router
HTTP Server
Internet Delay
Access Delay
LAN Transmission
Time
𝑭𝒐𝒓 𝑬𝒂𝒄𝒉 𝑶𝒃𝒋𝒆𝒄𝒕 𝑫𝒐𝒘𝒏𝒍𝒐𝒂𝒅 𝑻𝒊𝒎𝒆 = 𝟐 × 𝑰𝒏𝒕𝒆𝒓𝒏𝒆𝒕 𝑫𝒆𝒍𝒂𝒚 + 𝑨𝒄𝒄𝒆𝒔𝒔 𝑫𝒆𝒍𝒂𝒚 + 𝑳𝑨𝑵 𝑻𝒓𝒂𝒏𝒔𝒎𝒊𝒔𝒔𝒊𝒐𝒏 𝑻𝒊𝒎𝒆
𝑰𝒏𝒕𝒆𝒓𝒏𝒆𝒕 𝑫𝒆𝒍𝒂𝒚 = 𝟐 𝒔𝒆𝒄
𝑨𝒄𝒄𝒆𝒔𝒔 𝑫𝒆𝒍𝒂𝒚 =
𝚫
𝟏 − 𝚫𝜷
𝑶𝒃𝒋𝒆𝒄𝒕 𝑺𝒊𝒛𝒆 = 𝟓𝟎, 𝟎𝟎𝟎 𝒃𝒊𝒕
𝜟=
𝟓𝟎, 𝟎𝟎𝟎
= 𝟔. 𝟐𝟓 𝒎𝒔
𝟖 × 𝟏𝟎𝟔
𝜷 = 𝟏𝟎𝟎 𝑶𝒃𝒋𝒆𝒄𝒕𝒔/𝒔𝒆𝒄
𝑨𝒄𝒄𝒆𝒔𝒔 𝑫𝒆𝒍𝒂𝒚 =
𝑳𝑨𝑵 𝑫𝒆𝒍𝒂𝒚 =
𝟔. 𝟐𝟓 × 𝟏𝟎−𝟑
= 𝟏𝟔. 𝟔𝟕 𝒎𝒔
𝟏 − 𝟏𝟎𝟎 × 𝟔. 𝟐𝟓 × 𝟏𝟎−𝟑
𝟓𝟎, 𝟎𝟎𝟎
= 𝟎. 𝟓 𝒎𝒔
𝟏𝟎𝟎 × 𝟏𝟎𝟔
𝑶𝒃𝒋𝒆𝒄𝒕 𝑫𝒐𝒘𝒏𝒍𝒐𝒂𝒅 𝑻𝒊𝒎𝒆 = 𝟒 + 𝟎. 𝟎𝟏𝟔𝟔𝟕 + 𝟎. 𝟎𝟎𝟎𝟓 = 𝟒. 𝟎𝟏𝟕𝟐 𝒔𝒆𝒄
𝑾𝒆𝒃𝒑𝒂𝒈𝒆 𝑫𝒐𝒘𝒏𝒍𝒐𝒂𝒅 𝑻𝒊𝒎𝒆 = 𝟒𝟎. 𝟏𝟕𝟐 𝒔𝒆𝒄