$30
CS118 Homework 2
1. 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 (e.g. www.ucla.edu/research.html and
www.ucla.edu/students.html) can be sent over the same persisten
connection.
c. With nonpersistent connections between browser and origin server, it is
possible for a single TCP segment two 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.
2. Suppose you wanted to do a transaction from a remote client to a server as fast as
possible. Would you use TCP or UDP? Why? (Book: Chapter 2, Question 6)
3. Suppose within your Web browser you click on a link to obtain a Web page. The
IP address for the associated URL is not cached in your local host, so a DNS
lookup is necessary to obtain the IP address. Suppose that n DNS servers are
visited before your host receives the IP address from the DNS; the successive
visits incur a RTT of RTT1,…,RTTn. Further suppose that the Web page
associated with link contains exactly one object, consisting of a small amount of
HTML text. Let RTT0 denote the RTT between the local host and the server
containing the object. Assuming zero transmission time of the object, how much
time elapses from when the client clicks on the link until the client receives the
object? (Book: Chapter 2, Problem 7)
4. Referring to the previous problem, suppose the HTML file references eight very
small objects on the same server. Neglecting transmission times, how much time
elapses with (Book: Chapter 2, Problem 7)
a. Non-persistent HTTP with no parallel TCP connections?
b. Non-persistent HTTP with the browser configured for 5 parallel
connections?
c. Persistent HTTP?
5. Consider a short, ten-meter link over which a sender can transmit at a rate of 150
bits/sec in both directions. Suppose that packets containing data are 100,000 bits
long, and packets containing only control (e.g. ACK or handshaking) are 200 bits
long. Suppose that N parallel connections get 1/N of the link bandwidth. Now
consider the HTTP protocol and suppose that each downloaded object is 100Kbits
long, and that the initial downloaded file contains 10 referenced objects from the
same sender. Would parallel downloads via parallel instances of non-persistent
HTTP make sense in this case? Now consider persistent HTTP. Do you except
significant gains over the non-persistent case? Justify and explain your answer.
(Book: Chapter 2, Problem 10)