CSCI-351 Data communication and Networks

Slides:



Advertisements
Similar presentations
HTTP Reading: Section and COS 461: Computer Networks Spring
Advertisements

Chapter 9 Application Layer, HTTP Professor Rick Han University of Colorado at Boulder
How the web works: HTTP and CGI explained
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
Rensselaer Polytechnic Institute CSC-432 – Operating Systems David Goldschmidt, Ph.D.
Network Protocols: Design and Analysis Polly Huang EE NTU
CS640: Introduction to Computer Networks Aditya Akella Lecture 18 - The Web, Caching and CDNs.
HTTP Protocol Specification
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.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
Hui Zhang, Fall Computer Networking Web, HTTP, Caching.
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.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 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.
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
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
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.
What’s Really Happening
Application Layer Dr. Adil Yousif Lecture 2 CS.
Hypertext Transfer Protocol (HTTP)
Hypertext Transfer Protocol
Tiny http client and server
Block 5: An application layer protocol: HTTP
How HTTP Works Made by Manish Kushwaha.
Hypertext Transfer Protocol
HTTP – An overview.
Hypertext Transfer Protocol
The Hypertext Transfer Protocol
HTTP request message: general format
How does it work ?.
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
HTTP Protocol Specification
Hypertext Transfer Protocol
Hypertext Transport Protocol
Internet transport protocols services
Web Caching? Web Caching:.
TCP/IP Networking An Example
HTTP Protocol.
IS333D: MULTI-TIER APPLICATION DEVELOPMENT
Computer Communication & Networks
HTTP Hypertext Transfer Protocol
Lecture 6 – Web Optimizations
Net431:advanced net services
Hypertext Transfer Protocol
CSE 461 HTTP and the Web.
HTTP Request Method URL Protocol Version GET /index.html HTTP/1.1
Hypertext Transfer Protocol
Hypertext Transfer Protocol
CS 5565 Network Architecture and Protocols
HyperText Transfer Protocol
15-441: Computer Networking
EE 122: HyperText Transfer Protocol (HTTP)
Hypertext Transfer Protocol (HTTP)
William Stallings Data and Computer Communications
World Wide Web Uniform Resource Locator hostname [:port]/path
Hypertext Transfer Protocol
Kevin Harville Source: Webmaster in a Nutshell, O'Rielly Books
The HTTP Protocol COSC 2206 Internet Tools The HTTP Protocol

Web Server Design Week 5 Old Dominion University
HTTP Hypertext Transfer Protocol
Hypertext Transfer Protocol
Presentation transcript:

CSCI-351 Data communication and Networks Lecture 13: HTTP The slide is built with the help of Prof. Alan Mislove, Christo Wilson, and David Choffnes's class

cs.rit.edu/index.html Web and HTTP Web pages consist of objects Object can be HTML file, JPEG image, Java applet, etc. Each object is addressable by a URL DNS Host cs.rit.edu/index.html Domain name (host name) Path name (object) GET /index.html

HTTP Basics HTTP layered over bidirectional byte stream 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

HTTP Request Request line GET /foo/bar.html HTTP/1.1 Method GET – return URI HEAD – return headers only of GET response POST – send data to the server (forms, etc.) … URL (relative) E.g., /index.html HTTP version

HTTP Request Request headers (each ended with CRLF) Blank-line (CRLF) Acceptable document types/encodings Etag - Cache Identifier If-None-Match Referrer – what caused this page to be requested User-Agent – client software Cookie - previously stored information Content-Length - Size of data (only on POST) Blank-line (CRLF) Body

HTTP Request (visual)

HTTP Request Example GET /blah.html?foo=bar 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: www.intel-iris.net Connection: Keep-Alive Lecture 19: 2006-11-02

HTTP Response Status-line HTTP version 3 digit response code 1XX – informational 2XX – success 200 OK 3XX – redirection 301 Moved Permanently 303 Moved Temporarily 304 Not Modified (for etag) 4XX – client error 404 Not Found 5XX – server error 505 HTTP Version Not Supported Reason phrase

HTTP Response (cont.) Headers Blank-line Body 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 Content-Type Expires Last-Modified Blank-line Body Lecture 19: 2006-11-02

HTTP Response Example HTTP/1.1 200 OK Date: Tue, 27 Mar 2018 03:49:38 GMT Server: Apache/1.3.14 (Unix) Last-Modified: Mon, 29 Jan 2001 17: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 Cache-Control: private ...DATA...

Web pages Multiple (typically small) objects per page E.g., each image, JS, CSS, etc downloaded separately Single page can have 100s of HTTP transactions! File sizes Heavy-tailed Most transfers/objects very small Problem: Browser can’t render complete page until all downloaded

HTTP 0.9/1.0 One request/response per TCP connection Disadvantages Simple to implement Disadvantages Multiple connection setups  three-way handshake each time Several extra round trips added to transfer Multiple slow starts Now that you’ve seen TCP in the previous lectures, the overhead of one TCP connection per object is more clear.

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

More Problems Short transfers are hard on TCP Stuck in slow start Loss recovery is poor when windows are small SYN/ACK overhead is highest 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?

Persistent Connections Multiplex multiple transfers onto one TCP connection Client keeps connection open Can send another request after the first completes Must announce intention via a header Connection: keepalive Server must say how long response is, so client knows when done Content-Length: XXX

Persistent Connection Example Server 0 RTT DAT Client sends HTTP request for HTML Server reads from disk ACK DAT 1 RTT ACK Client parses HTML Client sends HTTP request for image DAT Server reads from disk ACK DAT 2 RTT Image begins to arrive

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 “etag” (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 Ask: What’s the problem with just using date for IMS queries? - Web servers may generate content per-client Examples: CGI scripts, things like google customized home, vary with cookies, client IP, referrer, accept-encoding, etc.

Example Cache Check Request GET / HTTP/1.1 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate If-Modified-Since: Mon, 29 Jan 2018 17:54:18 GMT If-None-Match: "7a11f-10ed-3a75ae4a" User-Agent: Mozilla/4.0 (compatible) Host: www.intel-iris.net Connection: Keep-Alive

Example Cache Check Response HTTP/1.1 304 Not Modified Date: Tue, 27 Mar 2018 03:50:51 GMT Server: Apache/1.3.14 (Unix) Connection: Keep-Alive Keep-Alive: timeout=15, max=100 ETag: "7a11f-10ed-3a75ae4a”

Content in today’s Internet Most flows are HTTP Web is at least 52% of traffic Median object size is 2.7K, average is 85K (as of 2007) HTTP uses TCP, so it will Be ACK clocked For Web, likely never leave slow start Is the Internet designed for this common case? Why?