You are on page 1of 3

Written Assignment II

Solutions

I. Problem 7.5: DNS uses UDP instead of TCP. If a DNS packet is lost,
there is automatic recovery. (10 points)

 Does this cause a problem? The users wait longer to have


the name resolved.

 If this causes a problem, how is it solved?

Answer. DNS is idempotent. Operations can be


repeated without harm. When a process makes a DNS
request, it starts a timer. If the timer expires,
it just sends the request again.

II. Problem 7.39: An HTML page is as follows:

<html> <body>
<a href=”www.info-source.com/welcome.html”>
Click here for info </a>
</body> </html>

If the user clicks on the hyperlink, a TCP connection is opened and a


series of lines is sent to the server. List all the lines sent. (10 points)

Answer. After the TCP connection is opened, an HTML


request packet corresponding to the clicked
hyperlink is sent to the server.

GET /welcome.html HTTP/1.1\r\n


Host: www.info-source.com\r\n
\r\n

III. Problem 7.40: The If-Modified-Since header can be used to check


whether a cached page is still valid. Requests can be made for pages
containing images, sound, video, and so on, as well as HTML. Do you
think the effectiveness of this technique is better or worse for JPEG
images as compared to HTML? Think carefully about what
“effectiveness” means and explain your answer. (10 points)

Answer. The answer to this problem depends on how


we define “effectiveness”. Here are examples.
Definition 1: The effectiveness means the reduction
in the transmission bandwidth caused by the
validity of the cached objects.

With this definition, the effectiveness of the


technique is better for JPEG files. JPEG files are
usually much larger, but change less often than
HTML files. Therefore, not having to send one is a
big win.

Definition 2: The effectiveness is defined as the


amount of the new data fetched from the requests
sent to the server.

With this definition, the effectiveness of the


technique is better for HTML files. HTML pages
change more often than JPEG files. Therefore, it is
more likely to have updated HTML pages when sending
request packets to the server.

Note Some other acceptable definition may be


applied.

IV. Problem 7.42: Does it make sense for a single ISP to function as a CDN?
If so, how would that work? If not, what is wrong with the idea? (10
points)

Answer. The answer to this problem is a matter of


understanding the question.

Possibility 1: The question asks whether it makes


sense for an ISP to work as one of the servers of a
CDN.

With this understanding, it surely makes sense


for an ISP to function as one of the servers of a
CDN. The ISP goes to a number of content providers
and gets their permission to replicate the content
on the ISP’s site. The content provider might even
pay to the ISP for this. The disadvantage is that
it is a lot of work for the ISP to contact may
content providers. It is easier to let CDNs do
this.

Possibility 2: The question asks whether it makes


sense that a CDN replicates the content on only one
ISP site.
With this understanding, it does not make sense
for a CDN to place the content on a single ISP
site. This will cause a lot of problems. For
instance, the single ISP may not actually close to
the clients or reduce the delay experienced by the
clients as desired by the CDN; and the single ISP
becomes the bottleneck of the system.

V. Problem 7.43: Under what conditions is using a CDN a bad idea? (10
points)

Answer. It is a bad idea if the content changes


rapidly. Pages full of up-to-the second sports
results or stock quotes are not good candidates,
for example. Pages that are generated dynamically
are not suitable.

You might also like