Section 3 - Networks
Section 3 - Networks
Section 3 - Networks
Faculty of Engineering
www.someschool.edu/someDept/pic.gif
* Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/
Transport Layer: 3-5
HTTP response status codes
▪ status code appears in 1st line in server-to-client response message.
▪ some sample codes:
200 OK
• request succeeded, requested object later in this message
301 Moved Permanently
• requested object moved, new location specified later in this message (in
Location: field)
400 Bad Request
• request msg not understood by server
404 Not Found
• requested document not found on this server
505 HTTP Version Not Supported
Transport Layer: 3-6
Sheet 2: Question 11
Consider the following string of ASCII characters that were captured when the browser sent an
HTTP GET message (i.e., this is the actual content of an HTTP GET message). Answer the
following questions, indicating where in the HTTP GET message below you find the answer.
GET /cs453/index.html HTTP/1.1<cr><lf> a. What is the URL of the document requested by the
Host: gaia.cs.umass.edu<cr><lf> browser?
User-Agent: Mozilla/5.0 (Windows;U; Windows NT 5.1; en-US; b. What version of HTTP is the browser running?
rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)<cr><lf>
c. Does the browser request a non-persistent or a
Accept:ext/xml, application/xml, application/xhtml+xml,
text/html;q=0.9, persistent connection?
text/plain;q=0.8,image/png,*/*;q=0.5<cr><lf> d. What is the IP address of the host on which the
Accept-Language: en-us,en;q=0.5<cr><lf> browser is running?
AcceptEncoding: zip,deflate<cr><lf> e. What type of browser initiates this message? Why is
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7<cr><lf> the browser type needed in an HTTP request message?
Keep-Alive:300<cr><lf>
Connection:keep-alive<cr><lf><cr><lf>
Sheet 2: Question 11 (Continued)
gaia.cs.umass.edu/cs453/index.html
B- Now consider persistent HTTP. Do you expect significant gains over the non-
persistent case? Justify and explain your answer.
Sheet 2: Question 15 (Continued)
• Multiple parallel downloads using non-persistent HTTP connections .
• each downloaded object can be completely put into one data packet (100Kbits)
• Parallel downloads would allow 10 connections to share the 150 bits/sec
bandwidth, giving each just 15 bits/sec.
• Thus, the total time needed to receive all objects is given by:
(200/150+dprop + 200/150 +dprop + 200/150+ dprop + 100,000/150+ dprop)
+ (200/(150/10)+dprop + 200/(150/10) +dprop + 200/(150/10)+dprop + 100,000/(150/10)+ dprop)
= 7377 + 8*dprop (seconds)
Introduction: 1-18
Web caches (aka proxy servers)
Goal: satisfy client requests without Why Web caching?
involving origin server ▪ reduce response time for client
request (cache is closer to client)
client
Web ▪ reduce traffic on an institution’s
cache access link
origin
server ▪ enables “poor” content providers to
more effectively deliver content
▪ We would calculate the expected value for the amount of rain to be:
▪ Expected value = 0.2*1 + 0.7*2 + 0.1*3 = 1.9 inches
Introduction: 1-20
Sheet 2: Question 14
In the shown figure, there is an institutional network connected to the Origin servers
Internet. Suppose that the average object size is 850,000 bits and that
the average request rate from the institution’s browsers to the origin
servers is 16 requests per second. Also suppose that the amount of
public
time it takes from when the router on the Internet side of the access Internet
link forwards an HTTP request until it receives the response is three
seconds on average. Model the total average response time as the sum
of the average access delay (that is, the delay from Internet router to 15 Mbps
institution router) and the average Internet delay. For the average access link
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. 100 Mbps LAN
a. Find the total average response time. institutional
b. Now suppose a cache is installed in the institutional LAN. network
Suppose the miss rate is 0.4. Find the total response time.
Sheet 2 Q14: (a) without a Web Cache origin
servers
▪ Avg. 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 : 3 sec
▪ Avg. object size: 850,000 bits
public
▪ average request rate from browsers to origin servers: 16 req/sec Internet
Web caching can bring the desired content “closer” to the user, perhaps to the
same LAN to which the user host is connected.
Web caching can reduce the delay for all objects, even objects that are not
cached, since caching reduces the traffic on links.
Sheet 3: Question 14
In the shown figure, there is an institutional network connected to the Origin servers
Internet. Suppose that the average object size is 1,000,000 bits and that
the average request rate from the institution’s browsers to the origin
servers is 16 requests per second. Also suppose that the amount of
public
time it takes from when the router on the Internet side of the access Internet
link forwards an HTTP request until it receives the response is three
seconds on average. Model the total average response time as the sum
of the average access delay (that is, the delay from Internet router to 15 Mbps
institution router) and the average Internet delay. For the average access link
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. 100 Mbps LAN
a. Find the total average response time. institutional
b. Now suppose a cache is installed in the institutional LAN. network
Suppose the miss rate is 0.4. Find the total response time.
Conditional GET
client server