Chapter 9 Application Layer, HTTP Professor Rick Han University of Colorado at Boulder

Slides:



Advertisements
Similar presentations
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Advertisements

HyperText Transfer Protocol (HTTP)
Lecture 3: Design Philosophy & Applications : Computer Networking Copyright © CMU,
15-441: Computer Networking The “Web” Thomas Harris (slides from Srini Seshan’s Fall ’01 course)
How the web works: HTTP and CGI explained
15-744: Computer Networking L-20 Applications. L -20; © Srinivasan Seshan, Application Networking HTTP APIs Assigned reading [BSR99] An Integrated.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 23 – Internet Applications Internet Directory.
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
Chapter 9 More on HTTP and DNS Professor Rick Han University of Colorado at Boulder
1 Computer Networks Application layer (Part 2). 2 Application layer protocols Last class –Application layer functions –Application protocols DNS ftp This.
15-744: Computer Networking L-20 Applications. L -20; © Srinivasan Seshan, Next Lecture: Application Networking HTTP Adaptive applications.
15-744: Computer Networking L-21 Applications. L -21; © Srinivasan Seshan, Next Lecture: Application Networking HTTP Adaptive applications.
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.
Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in CS105) Mike Freedman Teaching Assistants:
Application Layer. Domain Name System Domain Name System (DNS) Problem – Want to go to but don’t know the IP addresswww.google.com Solution.
Network Protocols: Design and Analysis Polly Huang EE NTU
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
DNS and HTTP CS 168. Domain Name Service Host addresses: e.g., – a number used by protocols – conforms to network structure (the “where”)
Web Server Design Week 5 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/10/10.
Java Technology and Applications
CS640: Introduction to Computer Networks Aditya Akella Lecture 18 - The Web, Caching and CDNs.
SMUCSE 4344 application layer. SMUCSE 4344 application vs. application-layer protocols application-layer protocol is just one piece –how the end hosts.
FTP (File Transfer Protocol) & Telnet
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.
2: Application Layer1 Internet apps: their protocols and transport protocols Application remote terminal access Web file transfer streaming multimedia.
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
Sistem Jaringan dan Komunikasi Data #9. DNS The Internet Directory Service  the Domain Name Service (DNS) provides mapping between host name & IP address.
CS640: Introduction to Computer Networks Aditya Akella Lecture 4 - Application Protocols, Performance.
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
Hui Zhang, Fall Computer Networking Web, HTTP, Caching.
Proxy Lab Recitation I Monday Nov 20, 2006.
1 CS 4396 Computer Networks Lab TCP/IP Networking An Example.
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.
CSE 461 HTTP and the Web. This Lecture  HTTP and the Web (but not HTML)  Focus  How do Web transfers work?  Topics  HTTP, HTTP1.1  Performance Improvements.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
Application layer (Part 2)
CSE 524: Lecture 4 Application layer protocols. Administrative ● Reading assignment Chapter 2 ● Mid-term exam may be delayed to 11/2/2004 – Mostly on.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
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.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Web Server Design Week 7 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/24/10.
HTTP Here, we examine the hypertext transfer protocol (http) – originally introduced around 1990 but not standardized until 1997 (version 1.0) – protocol.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
Overview of Servlets and JSP
Computer Networking Lecture 25 – The Web.
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.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
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.
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.
Ch 2. Application Layer Myungchul Kim
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Block 5: An application layer protocol: HTTP
Web Caching? Web Caching:.
Computer Communication & Networks
CSE 461 HTTP and the Web.
15-441: Computer Networking
EE 122: HyperText Transfer Protocol (HTTP)
Hypertext Transfer Protocol (HTTP)
CSCI-351 Data communication and Networks
Presentation transcript:

Chapter 9 Application Layer, HTTP Professor Rick Han University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Announcements Read Sections , Skip 9.3 HW #4 due April 16 Programming Assignment #3 soon… Midterm: hand back April 4 Next, Application Layer

Prof. Rick Han, University of Colorado at Boulder Recap of Previous Lecture Domain Name Service Translate/resolve a name to an IP address => Hierarchical name space Hierarchical name servers Root name servers – about a dozen Then,.edu,.com,.gov,.mil,.org,.net, … Local name server Authoritative name server – gives back final IP address Recursive vs. iterative queries Caching

Prof. Rick Han, University of Colorado at Boulder HyperText Transfer Protocol (HTTP) Basis for Web Application-layer protocol built on top of TCP Request-Response type of protocol Request: e.g. “GET URL HTTP_version_#” Response from server Requests and responses are encoded in text Stateless: after request and response, no further state maintained Cookies maintain session state outside of HTTP

Prof. Rick Han, University of Colorado at Boulder HTTP Request Request headers Authorization – authentication info Acceptable document types/encodings From – user If-Modified-Since  return page only if mod after date Referrer – what caused this page to be requested User-Agent – client software Blank line Body

Prof. Rick Han, University of Colorado at Boulder HTTP Request Example: GET 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

Prof. Rick Han, University of Colorado at Boulder HTTP Response Headers –Location – for redirection –Server – server software –WWW-Authenticate – request for authentication –Allow – list of methods supported (get, head, etc) –Content-Encoding – E.g x-gzip –Content-Length  # bytes in content –Content-Type  MIME type –Expires  when contents become stale –Last-Modified  time contents last mod by servr Blank-line Body

Prof. Rick Han, University of Colorado at Boulder 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  MIME Type …..

Prof. Rick Han, University of Colorado at Boulder HTTP 0.9/1.0 One HTTP 1.0 request/response per TCP connection –Simple to implement Disadvantages –Multiple connection setups  three-way handshake each time Several extra round trips added to transfer Netscape browser opens up to 4 parallel HTTP 1.0 connections –Multiple slow starts

Prof. Rick Han, University of Colorado at Boulder HTTP 1.0 Interaction With TCP 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 Courtesy: Srini Seshan

Prof. Rick Han, University of Colorado at Boulder More HTTP 1.0 & TCP Interaction Problems Lots of extra connections –Increases server state/processing Server also forced to keep TIME_WAIT connection state for dead TCP connections –Tends to be an order of magnitude greater than # of active connections, why?

Prof. Rick Han, University of Colorado at Boulder HTTP 1.1 Persistent Connection Solution Multiplex multiple requests onto one open TCP connection (& multiple responses in reverse direction) –Serialize transfers  client makes next request only after previous response –Reduce slow start latency –Reduce amount of TCP state at both endpoints –Reduce overhead HTTP 1.1 adds complexity because multiple requests (and responses) have to be multiplexed and demultiplexed

Prof. Rick Han, University of Colorado at Boulder HTTP 1.1 Persistent Connection Example 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 Courtesy: Srini Seshan

Prof. Rick Han, University of Colorado at Boulder Web Caching Proxies Place a Web caching proxy in the network between Web client and Web server –Reduces client response time HTTP GET only goes as far as intermediate cache, rather than all the way to server –Reduces network bandwidth usage HTTP GET doesn’t travel over wide area from caching proxy to server –Reduces server load HTTP GET never reaches server HTTP Caching Proxy HTTP Web Server HTTP Client/ Browser

Prof. Rick Han, University of Colorado at Boulder Web Proxies Used for Caching –Improved response time, etc. from previous slide –Provides a centralized coordination point to share cached information across all of a company’s client hosts Also used for security –Proxy for a company can be the only host that can access Internet –Administrators makes sure that it is secure Used for protocol translation –Translate HTTP 1.0 to/from HTTP 1.1. Enables old HTTP 1.0 clients to connect to HTTP 1.1 servers, and benefit from HTTP 1.1 performance boosts

Prof. Rick Han, University of Colorado at Boulder Designing Caching Proxies How much can/should be cached? –How large a cache is necessary? –On disk vs. in memory  typically on disk –What are the cache hit rates? If user behavior is uncorrelated, have to cache a lot of data to improve response time, resulting in small cache hit rate If user behavior is correlated, i.e. everyone visits only a few Web sites, then cache less data and still improve response time (high cache hit rate)

Prof. Rick Han, University of Colorado at Boulder Designing Caching Proxies (2) What can be cached? –Cache first-time unknown documents/objects –Non-cacheable documents CGI-scripts Personalized documents (cookies, etc) Encrypted data (SSL) –Document should no longer be cached if updated/expired before reuse

Prof. Rick Han, University of Colorado at Boulder Designing Caching Proxies (3) Performance: –How many TCP connections can the proxy handle? –How to efficiently index into database/cache? Early caches used file system to find file Metadata now kept in memory on most caches Prefetching – combine with caching to reduce response time –Proxy parses a Web page and prefetch its hyperlinked objects before the client asks for them Example: when a proxy fetches a Web page on behalf of a client, the proxy will parse and cache the Web page returned by the server, and then prefetch all links before client requests them –Not widely used due to poor hit rates?