Hui Zhang, Fall 2012 1 15-441 Computer Networking Web, HTTP, Caching.

Slides:



Advertisements
Similar presentations
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Advertisements

EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
HyperText Transfer Protocol (HTTP)
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
Application Layer-11 CSE401N: Computer Networks Lecture-4 Application Layer Overview HTTP.
Chapter 9 Application Layer, HTTP Professor Rick Han University of Colorado at Boulder
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 2: Application Layer
EEC-484/584 Computer Networks Discussion Session for HTTP and DNS Wenbing Zhao
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
HTTP and Web Content Delivery COS 461: Computer Networks Spring 2011 Mike Freedman
Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in CS105) Mike Freedman
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Web, HTTP and Web Caching
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in CS105) Mike Freedman Teaching Assistants:
2: Application Layer World Wide Web (WWW). Introduction 1-2 Internet protocol stack (recap) r application: supporting network applications m FTP,
Network Protocols: Design and Analysis Polly Huang EE NTU
CS640: Introduction to Computer Networks Aditya Akella Lecture 18 - The Web, Caching and CDNs.
CS 3830 Day 7 Introduction : Application Layer 2 Processes communicating Process: program running within a host. r within same host, two processes.
Mail (smtp), VoIP (sip, rtp)
HTTP Reading: Section and COS 461: Computer Networks Spring
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Application Layer 2 Figures from Kurose and Ross
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP.
2: Application Layer1 Internet apps: their protocols and transport protocols Application remote terminal access Web file transfer streaming multimedia.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
Introduction 1 Lecture 6 Application Layer (HTTP) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
2: Application Layer1 Web and HTTP First some jargon Web page consists of base HTML-file which includes several referenced objects Object can be HTML file,
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
CS640: Introduction to Computer Networks Aditya Akella Lecture 4 - Application Protocols, Performance.
Sockets process sends/receives messages to/from its socket
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
HyperText Transfer Protocol (HTTP) RICHI GUPTA CISC 856: TCP/IP and Upper Layer Protocols Fall 2007 Thanks to Dr. Amer, UDEL for some of the slides used.
Application Layer 2-1 Chapter 2 Application Layer 2.2 Web and HTTP.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
CSE 524: Lecture 4 Application layer protocols. Administrative ● Reading assignment Chapter 2 ● Mid-term exam may be delayed to 11/2/2004 – Mostly on.
Dr. Philip Cannata 1 The Web and HTTP. Dr. Philip Cannata 2 Application Layer 2-2 Chapter 2 Application Layer Computer Networking: A Top Down Approach.
Application Layer 2-1 Lecture 4: Web and HTTP. Web and HTTP First, a review… web page consists of objects object can be HTML file, JPEG image, Java applet,
Important r There will be NO CLASS on Friday 1/30/2015! r Please mark you calendars 1.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
Advance Computer Networks Lecture#05 Instructor: Engr. Muhammad Mateen Yaqoob.
Computer Networking Lecture 25 – The Web.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
1 COMP 431 Internet Services & Protocols HTTP Persistence & Web Caching Jasleen Kaur February 11, 2016.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Computer Networking The Web. 2 Web history 1945: Vannevar Bush, “As we may think”, Atlantic Monthly, July, describes the idea of a distributed.
HyperText Transfer Protocol (HTTP) Deepti Kulkarni CISC 856: TCP/IP and Upper Layer Protocols Fall 2008 Acknowledgements Professor Amer Richi Gupta.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Lecture 5 Internet Core: Protocol layers. Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP 
2: Application Layer 1 Chapter 2 Application Layer These ppt slides are originally from the Kurose and Ross’s book. But some slides are deleted and added.
Block 5: An application layer protocol: HTTP
Internet transport protocols services
Computer Communication & Networks
Lecture 6 – Web Optimizations
EEC-484/584 Computer Networks
Hypertext Transfer Protocol (HTTP)
EEC-484/584 Computer Networks
CSCI-351 Data communication and Networks
Presentation transcript:

Hui Zhang, Fall Computer Networking Web, HTTP, Caching

Hui Zhang, Fall Web history  Vannevar Bush, “As we may think”, Atlantic Monthly, July, describes the idea of a distributed hypertext system. -a “memex” that mimics the “web of trails” in our minds.  Tim Berners-Lee (CERN) writes internal proposal to develop a distributed hypertext system -connects “a web of notes with links”. -intended to help CERN physicists in large projects share and manage information  Tim BL writes graphical browser for Next machines.

Hui Zhang, Fall Web history (cont)  NCSA server released -26 Web servers worldwide  Marc Andreessen releases first version of NCSA Mosaic Mosaic version released for (Windows, Mac, Unix). -Web (port 80) traffic at 1% of NSFNET backbone traffic. -Over 200 Web servers worldwide.  Andreessen and colleagues leave NCSA to form "Mosaic Communications Corp" (Netscape).

Hui Zhang, Fall Design the Web  Three components -HTML -HTTP -Browser (and the Web Server)  How would a computer scientist do it?  What are the important considerations? -What are NOT important?  What should be the basic architecture? -What are the components? -What are the interfaces of components?

Hui Zhang, Fall Basic Concepts  Client/server model -client: browser that requests, receives, “displays” Web objects -server: Web server sends objects in response to requests  HTTP -HTTP 1.0: RFC HTTP 1.1: RFC 2068 PC running Explorer Server running Apache Web server Mac running Navigator HTTP request HTTP response

Hui Zhang, Fall Basic Concepts  Web page consists of objects  Web page consists of base HTML-file which includes several referenced objects  Object can be HTML file, JPEG image, Java applet, audio file,…  Each page or object is addressable by a URL

Hui Zhang, Fall Overview of Concepts in This Lecture  HTTP  Interaction between HTTP and TCP  Persistent HTTP  Caching  Content Distribution Network (CDN)

Hui Zhang, Fall HTTP Basics  HTTP layered over bidirectional byte stream -Almost always TCP  Interaction -Client sends request to server, followed by response from server to client -Requests/responses are encoded in text  Stateless -Server maintains no information about past client requests

Hui Zhang, Fall HTTP Request

Hui Zhang, Fall HTTP Request Example GET / HTTP/1.1 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Host: Connection: Keep-Alive

Hui Zhang, Fall HTTP Response Example HTTP/ OK Date: Tue, 27 Mar :49:38 GMT Server: Apache/ (Unix) (Red-Hat/Linux) mod_ssl/2.7.1 OpenSSL/0.9.5a DAV/1.0.2 PHP/4.0.1pl2 mod_perl/1.24 Last-Modified: Mon, 29 Jan :54:18 GMT ETag: "7a11f-10ed-3a75ae4a" Accept-Ranges: bytes Content-Length: 4333 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html …..

Hui Zhang, Fall Outline  Web intro, HTTP  Persistent HTTP  HTTP caching

Hui Zhang, Fall Typical Workload (Web Pages)  Multiple (typically small) objects per page  File sizes -Heavy-tailed Pareto distribution for tail Lognormal for body of distribution  Embedded references -Number of embedded objects = pareto – p(x) = ak a x -(a+1)

Hui Zhang, Fall HTTP 0.9/1.0  One request/response per TCP connection -Simple to implement  Disadvantages -Multiple connection setups  three-way handshake each time Several extra round trips added to transfer -Multiple slow starts

Hui Zhang, Fall Single Transfer Example Client Server SYN ACK DAT FIN ACK 0 RTT 1 RTT 2 RTT 3 RTT 4 RTT Server reads from disk FIN Server reads from disk Client opens TCP connection Client sends HTTP request for HTML Client parses HTML Client opens TCP connection Client sends HTTP request for image Image begins to arrive

Hui Zhang, Fall More Problems  Short transfers are hard on TCP -Stuck in slow start -Loss recovery is poor when windows are small  Lots of extra connections -Increases server state/processing  Server also forced to keep TIME_WAIT connection state -Why must server keep these? -Tends to be an order of magnitude greater than # of active connections, why?

Hui Zhang, Fall Persistent Connection: Keep TCP Connection Option for Multiple GETs Client Server ACK DAT ACK 0 RTT 1 RTT 2 RTT Server reads from disk Client sends HTTP request for HTML Client parses HTML Client sends HTTP request for image Image begins to arrive DAT Server reads from disk DAT

Hui Zhang, Fall Persistent HTTP Nonpersistent HTTP issues:  Requires 2 RTTs per object  OS must work and allocate host resources for each TCP connection  But browsers often open parallel TCP connections to fetch referenced objects Persistent HTTP  Server leaves connection open after sending response  Subsequent HTTP messages between same client/server are sent over connection Persistent without pipelining:  Client issues new request only when previous response has been received  One RTT for each referenced object Persistent with pipelining:  Default in HTTP/1.1  Client sends requests as soon as it encounters a referenced object  As little as one RTT for all the referenced objects

Hui Zhang, Fall Outline  Web Intro, HTTP  Persistent HTTP  Caching  Content distribution networks

Hui Zhang, Fall Web Proxy Caches  User configures browser: Web accesses via cache  Browser sends all HTTP requests to cache -Object in cache: cache returns object -Else cache requests object from origin server, then returns object to client client Proxy server client HTTP request HTTP response HTTP request HTTP response origin server origin server

Hui Zhang, Fall Example Assumptions  Average object size = 100,000 bits  Avg. request rate from institution’s browser to origin servers = 15/sec  Delay from institutional router to any origin server and back to router = 2 sec Consequences  Utilization on LAN = 15%  Utilization on access link = 100%  Total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + milliseconds origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link

Hui Zhang, Fall Strawman Solution Possible solution  Increase bandwidth of access link to, say, 10 Mbps  Often a costly upgrade Consequences  Utilization on LAN = 15%  Utilization on access link = 15%  Total delay = Internet delay + access delay + LAN delay = 2 sec + msecs + msecs origin servers public Internet institutional network 10 Mbps LAN 10 Mbps access link

Hui Zhang, Fall Solution Based on Cache Install cache  Suppose hit rate is 40% Consequence  40% requests will be satisfied almost immediately (say 10 msec)  60% requests satisfied by origin server  Utilization of access link reduced to 60%, resulting in negligible delays  Weighted average of delays =.6*2 sec +.4*10msecs < 1.3 secs origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link institutional cache

Hui Zhang, Fall HTTP Caching  Clients often cache documents -Challenge: update of documents -If-Modified-Since requests to check HTTP 0.9/1.0 used just date HTTP 1.1 has an opaque “entity tag” (could be a file signature, etc.) as well  When/how often should the original be checked for changes? -Check every time? -Check each session? Day? Etc? -Use Expires header If no Expires, often use Last-Modified as estimate

Hui Zhang, Fall Example Cache Check Request GET / HTTP/1.1 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate If-Modified-Since: Mon, 29 Jan :54:18 GMT If-None-Match: "7a11f-10ed-3a75ae4a" User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Host: Connection: Keep-Alive

Hui Zhang, Fall Example Cache Check Response HTTP/ Not Modified Date: Tue, 27 Mar :50:51 GMT Server: Apache/ (Unix) (Red-Hat/Linux) mod_ssl/2.7.1 OpenSSL/0.9.5a DAV/1.0.2 PHP/4.0.1pl2 mod_perl/1.24 Connection: Keep-Alive Keep-Alive: timeout=15, max=100 ETag: "7a11f-10ed-3a75ae4a"

Hui Zhang, Fall Sources for Web Caching Misses  Capacity -Relative size of the cache with respect to total “working set” How big is the working set of the Web? How many documents are shared by multiple users? Is it possible to have multiple misses for the same document?  Compulsory -First time access to document -Non-cacheable documents CGI-scripts Personalized documents (cookies, etc) Encrypted data (SSL)  Consistency -Document has been updated/expired before reuse