EEC484584 Computer Networks Lecture 6 Wenbing Zhao wenbingieee
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao wenbing@ieee. org Spring Semester 2007 EEC-484/584: Computer Networks
2 Outline • Reminder: – Feb 19, no class due to President’s Day – Feb 21, quiz#1 (Ch. 1 & Ch. 7) • Lecture 1 -6; lab 1 -2 – Feb 26, 3 pm: CSU Data center tour • 10 th floor of Rhodes Tower – Feb 26, 6 -8 pm: Java Tutorial #1 • Web Caching • DNS Resource Records • In-class Exercises Spring Semester 2007 EEC-484/584: Computer Networks 2
3 Web Caching Goal: satisfy client request without involving origin server • user sets browser: Web accesses via proxy server • browser sends all HTTP requests to proxy server – object in cache: returns cached object – else cache requests object from origin server, then returns object to client Spring Semester 2007 origin server HT client. HTTP TP req Proxy server ues t res pon se t s ue q re P nse o T p HT es r TP T H client EEC-484/584: Computer Networks est u q e Pr T nse o p HT res P T HT origin server 3
4 More about Web Caching • Proxy server acts as both client and server • Typically proxy server is installed by ISP (university, company, residential ISP) Spring Semester 2007 Why Web caching? • Reduce response time for client request • Reduce traffic on an institution’s access link • Internet dense with caches: enables “poor” content providers to effectively deliver content EEC-484/584: Computer Networks 4
5 Non-Caching Example origin servers Assumptions • Average object size = 100, 000 bits • Avg. request rate from institution’s browsers to origin servers = 15/sec • Delay from institutional router to any origin server and back to router = 2 sec Spring Semester 2007 public Internet 1. 5 Mbps access link institutional network EEC-484/584: Computer Networks 10 Mbps LAN 5
6 Non-Caching Example origin servers Consequences • Utilization on LAN = 15% • Utilization on access link = 100% • Total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + milliseconds Spring Semester 2007 public Internet 1. 5 Mbps access link institutional network EEC-484/584: Computer Networks 10 Mbps LAN 6
7 Non-Caching Example origin servers Possible solution • Increase bandwidth of access link to, say, 10 Mbps public Internet Consequences • Utilization on LAN = 15% • Utilization on access link = 15% • Total delay = Internet delay + access delay + LAN delay = 2 sec + msecs • Often a costly upgrade Spring Semester 2007 10 Mbps access link institutional network EEC-484/584: Computer Networks 10 Mbps LAN 7
8 Caching Example origin servers Install proxy server • Suppose hit rate is 0. 4 Consequence • 40% requests will be satisfied almost immediately • 60% requests satisfied by origin server public Internet • Utilization of access link reduced to 60%, resulting in negligible delays (say 10 msec) institutional network • Total avg delay = Internet delay + access delay + LAN delay =. 6*(2. 01) secs +. 4*milliseconds < 1. 4 secs Spring Semester 2007 EEC-484/584: Computer Networks 1. 5 Mbps access link 10 Mbps LAN Institutional Proxy server 8
9 Type A RR • Type A DNS records map a host name to an IPv 4 address Spring Semester 2007 EEC-484/584: Computer Networks 9
10 Type NS RR • Type NS records within the zone file are authoritative records for the zone's name servers Spring Semester 2007 EEC-484/584: Computer Networks 10
11 Type CNAME RR • A Type CNAME record maps an alias or nickname to the real or Canonical name Spring Semester 2007 EEC-484/584: Computer Networks 11
12 Type MX RR • Type MX records Specifies the name and relative preference of mail servers for the zone Spring Semester 2007 EEC-484/584: Computer Networks 12
13 DNS Protocol, Messages Name, type fields for a query RRs in response to query records for authoritative servers additional “helpful” info that may be used Spring Semester 2007 EEC-484/584: Computer Networks 13
14 Layered Protocols • Q 1. If the unit exchanged at the data link level is called a frame and the unit exchanged at the network level is called a packet, do frames encapsulate packets or do packets encapsulate frames? Explain your answer. Spring Semester 2007 EEC-484/584: Computer Networks 14
15 Layered Protocols • Q 2. A system has an n-layer protocol hierarchy. Applications generate messages of length M bytes. At each of the layers, an h-byte header is added. What fraction of the network bandwidth is filled with headers? Spring Semester 2007 EEC-484/584: Computer Networks 15
16 Reliable Communication • Q 3. When a file is transferred between two computers, two acknowledgement strategies are possible. In the first one, the file is chopped up into packets, which are individually acknowledged by the receiver, but the file transfer as a whole is not acknowledged. In the second one, the packets are not acknowledged individually, but the entire file is acknowledged when it arrives. Discuss these two approaches. Spring Semester 2007 EEC-484/584: Computer Networks 16
17 URL • Q 4. Imagine that someone in the CS Department at Stanford has just written a new program that he wants to distribute by FTP. He puts the program in the FTP directory ftp/pub/freebies/newprog. c. What is the URL for this program likely to be? Spring Semester 2007 EEC-484/584: Computer Networks 17
18 HTTP and Caching • Q 5. 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? Spring Semester 2007 EEC-484/584: Computer Networks 18
19 Web and Caching • Q 6. Consider an institutional network connected to the internet. Suppose that the average object size is 900, 000 bits and that the average request rate from the institution’s browsers to the origin servers is 1. 5 requests per second. The bandwidth of the access link is 1. 5 Mbps. 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 in two 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 institution router) and the average Internet delay. (continued on next slide) Spring Semester 2007 EEC-484/584: Computer Networks 19
20 Web and Caching • Q 6 (cont’d) For the average access delay, use D/(1 -Db), where D is the average time required to send an object over the access link and b is the arrival rate of objects to the access link. – Find the total average response time. – Now suppose a cache is installed in the institutional LAN. Suppose the high rate is 0. 4. Find the total response time. Spring Semester 2007 EEC-484/584: Computer Networks 20
21 DNS • Q 7. DNS typically uses UDP instead of TCP. If a DNS packet is lost, there is no automatic recovery. Does this cause a problem, and if so, how is it solved? Spring Semester 2007 EEC-484/584: Computer Networks 21
22 DNS • Q 8. Although it was not mentioned in the text, an alternative form for a URL is to use the IP address instead of its DNS name. An example of using an IP address is http: //192. 31. 231. 66/index. html. How does the browser know whether the name following the scheme is a DNS name or an IP address. Spring Semester 2007 EEC-484/584: Computer Networks 22
23 DNS, Web, HTTP • Q 9. 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 look-up is necessary to obtain the IP address. Suppose that n DNS servers are visited before your host receives the IP address from DNS; the successive visits incur an RTT of RTT 1, …, RTTn. Further suppose that the Web page associated with the link contains exactly one object, consisting of a small amount of HTML text. Let RTT 0 denote the RTT between the local host and the server containing the object. Assuming 0 transmission time of the object, how much time elapses from when the client clicks on the link until the client receives the object? Spring Semester 2007 EEC-484/584: Computer Networks 23
- Slides: 23