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.

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)
HTTP – HyperText Transfer Protocol
Web basics HTTP – – URI/L/Ns – HTML –
Hypertext Transfer Protocol Kyle Roth Mark Hoover.
Chapter 2: Application Layer
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
How the web works: HTTP and CGI explained
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 23 – Internet Applications Internet Directory.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Know how HTTP accesses data on the WWW Objectives.
1 HTTP - Hypertext Transfer Protocol Arthur : Yigal Eliaspur Date :
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
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.
Hypertext Transport Protocol CS Dick Steflik.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
COMP3016 Web Technologies Introduction and Discussion What is the Web?
FTP (File Transfer Protocol) & Telnet
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Mail (smtp), VoIP (sip, rtp)
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
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.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
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,…
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
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,
Sistem Jaringan dan Komunikasi Data #9. DNS The Internet Directory Service  the Domain Name Service (DNS) provides mapping between host name & IP address.
IT Engineering Instructor: Rezvan Shiravi
Web HTTP Hypertext Transfer Protocol. Web Terminology ◘Message: The basic unit of HTTP communication, consisting of structured sequence of octets matching.
Hui Zhang, Fall Computer Networking Web, HTTP, Caching.
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.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
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.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
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,
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)
Advance Computer Networks Lecture#05 Instructor: Engr. Muhammad Mateen Yaqoob.
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.
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):
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.
Hypertext Transfer Protocol (HTTP)
Hypertext Transfer Protocol
Block 5: An application layer protocol: HTTP
Hypertext Transfer Protocol
The Hypertext Transfer Protocol
Hypertext Transport Protocol
Internet transport protocols services
Hypertext Transfer Protocol (HTTP)
CSCI-351 Data communication and Networks
Presentation transcript:

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 in this presentation Thanks to Madhusri Nayak for some of the slides used in this presentation

Motivation ?  Single informational network  Light protocol  Speed Tim-Berners Lee Director of the W3C 2 HTTP Versions Format : HTTP/.  HTTP/0.9 – No RFC  HTTP/1.0 – RFC 1945  HTTP/1.1 – RFC

Position of HTTP in the TCP/IP Protocol suite HTTP TCP Application-layer Transport layer Network layer Data link layer Physical layer IGMPICMP ARPRARP IP Underlying LAN or WAN 3

Request –Response Protocol Origin Server URL User-Agent (browser/client) HTTP response DNS response HTTP request DNS Server DNS query TCP connection optional TCP connections 4

A-PDU format Request Line A Blank Line Body Entity Headers Request Headers General Headers Request Message Status Line A Blank Line Body Entity Headers Response Headers General Headers Response Message Note: Each line ends with ‘cr lf ‘ control characters. 5

GET, HEAD, POST, PUT, TRACE, CONNECT, OPTION URL HTTP version space Request Line Request Type Header Name Header format : Header Value General Header Date, Pragma, Cache control,Connection, MIME-version, Upgrade, Transfer encoding space Request Header From, Referer, User-agent, Authorization, If-Modified-Since, Accept * Entity HeaderContent-length, Content-type, Content- encoding, Last-modified, Expires, Upgrade Response Header Location, Age, Retry-after, Server A-PDU format (cont’d) 6

1xx: Informational Continue (100), Switching Protocols(101) 2xx: Success - action was successfully received, understood, and accepted Created (201), Accepted (202), No Content (204), OK (200) 3xx: Redirection - further action needed to complete request Moved Permanently (301), Moved Temporarily (302), Not Modified (304) 4xx: Client Error - request contains bad syntax or cannot be fulfilled Bad Request (400), Unauthorized (401), Forbidden (403), Not Found (404) 5xx: Server Error - server failed to fulfill an apparently valid request Internal Server Error (500), Not Implemented (501), Bad Gateway (502), Service Unavailable (503) Status Code Status Phrase HTTP Version Status Line space A-PDU format Cont’d… 7

Example Of Request/Response Note: Headers are in ascii format. 8

4 variations of HTTP  Nonpersistent with one connection  Nonpersistent with parallel connections  Persistent without pipelining  Persistent with pipelining

Nonpersistent (HTTP /1.0 default)

SYN SYN-ACK ACK ClientServer GET web page HTTP/1.0 OK Web page transferred 3-way handshake Connection close Get web page Web page Client parses HTML web page FIN 1.Found referenced object “Image 1” 2. Found referenced object “Image 2” Ack Data 11 ACK FIN

Nonpersistent (cont’d) Ack Data 12 SYN SYN-ACK ACK Client Server GET image1 HTTP/1.0 OK FIN Image 1 Transferred Connection close 3-Way Handshake Get image1 FIN ACK Image1 SYN SYN-ACK ACK Client Server GET image2 HTTP/1.0 OK FIN Image 2 Transferred Connection close 3-Way Handshake Get image2 FIN ACK Image2

Key points 13  Connection does not persist for other objects  Connections are sequential

Rough calculation for number of RTTS ClientServer Delay due to connection request/handshake Delay Due to HTML Page Request Delay Due to Object Request Time delay in RTTs = 6 Can we reduce the number of RTTS? Web Page Image 1 Image 2 14

Nonpersistent with parallel connections ( browser dependent) 15

Ack Data 16 Parallel connections SYN SYN-ACK ACK Client Server GET web page HTTP/1.0 OK FIN Web page Transferred Connection close 3-Way Handshake Get web page FIN ACK Web page SYN SYN-ACK ClientServer GET image1 HTTP/1.0 OK FIN Image 1 Transferred Connection close 3-Way Handshake Get image1 FIN ACK Image1 SYN SYN-ACK ACK Client Server GET image2 HTTP/1.0 OK FIN Image 2 Transferred Connection close 3-Way Handshake Get image2 FIN ACK Image2 Client parses HTML web page 1. Referenced object “Image 1” 2. Referenced object “Image 2”

Rough calculation ClientServer Time delay in RTTs = 4 Delay due to connection request/handshake Delay due to HTML page request Delay due to object request 17 Web page Image1 & Image2

Disadvantages:  overhead of multiple TCP connections  A busy server could end up with lots of connections in the ‘TIME- WAIT’ state  Seldom does each connection get past the ‘slow-start’ region  failure to use the full end-to-end available bandwidth  extra time opening connections increases user-perceived latency Can HTTP be further improved? 18

Persistent without pipelining

20 FIN Connection close ACK FIN ACK Time Out Ack Data 20 SYN SYN-ACK ClientServer GET web page HTTP/1.1 OK Web page Transferred 3-Way Handshake Get web page Web page GET image2 HTTP/1.1 OK Image 2 Transferred Get image2 Image2 GET image1 HTTP/1.1 OK Image 1 Transferred Get image1 Image1 Note: 1) Requests are sequential 2) Timer is at application layer Timer started

Rough calculation 21 ClientServer Time delay in RTTs = 4 Delay due to connection request/handshake Delay due to HTML page request Delay due to object request Web page Image1 Image2

Persistent with pipelining 22

Client parses web page; Gets Image 1 Gets Image 2 FIN Connection close FIN ACK Back to back requests Ack Data 23 SYN SYN-ACK ClientServer GET webpage HTTP/1.1 OK Web page Transferred 3-Way Handshake Get web page Web page Image 2 OK Image 2 Get image1 Get image2 GET image1 HTTP/1.1 GET image2 HTTP/1.1 ACK Image 1 OK Time Out Timer started

Rough calculation ClientServer 24 Time delay in RTTs = 3 24 Delay due to connection request/handshake Delay due to HTML page request Delay due to object request Web page Image1 & Image2

Advantages:  fewer connections Reduced network traffic CPU time is saved in routers and hosts  Reduced perceived latency on subsequent requests Either client or server can close the connection Disadvantages:  Connections stay open longer at the server 25

FTP vs HTTP 26 1 RTT control-channel OPEN 0.5 RTT send request on control-channel 1 RTT file- channel OPEN 0.5 RTT file starts to arrive on file-channel Ftrans time to transmit the file RTT + Ftrans = time to get first ftp file 1 RTT channel OPEN 0.5 RTT send request 0.5 RTT file starts to arrive Ftrans time to transmit the file RTT + Ftrans = time to get a file in HTTP

Figure 6-1: Latencies for a remote server, image size = 2544 bytes Experimental Results (NP HTTP/1.0) without parallel connections Number of in lined images Network Latency (seconds) 27 (Persistent without pipelining) (Persistent with pipelining)

Figure 6-2: Latencies for a remote server, image size = bytes Experimental Results (cont’d) Number of in lined images Network Latency (seconds) 28 (Persistent without pipelining) (Persistent with pipelining) (NP HTTP/1.0) without parallel connections

Cache  Eliminate the need to send requests to origin servers reduces the number of network round-trips expiration mechanism  Eliminate the need to send full responses reduces network bandwidth requirements validation mechanism Proxy Servers Origin Server Client 1 Client 2 HTTP Request HTTP Response (MISS) HTTP Response(HIT) HTTP Request (MISS) HTTP Response 29

Expiration Model  Explicit expiration times (expires / max-age directive ).  Heuristic expiration times Validation model  Cache validators (e.g Last-Modified Dates )  Server attaches validator with full response  user agent or proxy cache includes the associated validator in request  The server then checks the validator  Special status code (304 (Not modified))  Full response 30

What Clients control  max-age: age is no greater than the specified.  min-fresh: fresh for at least the specified number of seconds  max-stale: exceeded its expiration time by no more than the specified number of seconds. 31  Cachable/non-cachable object  Cachable at proxy  Cached object expiration time  Operations performed on copy What servers control

Content negotiation  Multiple representations (variants) of a single resource  The process of selecting the best representation for a given response Types:  Server-driven Negotiation: Selection algorithm located at server  Agent-driven Negotiation Selection done by the user agent from the list of available representations within header fields or entity-body of initial response This negotiation is performed in 2 steps  Transparent Negotiation Combination of both server-driven and agent-driven negotiation 32

Messages for GET / HTTP/1.1 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: ) Gecko/ Firefox/ Host: Accept:text/xml,application/xml,application/xhtml+xml;text/html;q=0.9,text/plain;q=0.8,image/png,*/ *;q=0.5 Accept-Language: en,en-us;q=0.5;q=0.5 Accept-Encoding: none Accept-Charset: ISO ,utf-8;q=0.7,*;q=0.7 Connection: Keep-Alive Request Header HTTP/ OK Cache-Control: private Content-Type: text/html; charset=UTF-8 Set-Cookie: PREF=ID=b77cac251a771420:TM= :LM= :S=rI0Vm3o4ZErGKlM8; expires=Fri, 09-Oct :47:59 GMT; path=/; domain=.google.com Server: gws Content-Length: 5471 Date: Wed, 10 Oct :47:59 GMT Response Header 33

Summary: 4 variations of HTTP  Nonpersistent with 1 connection One TCP connection at a time Server initiates connection close  Nonpersistent with parallel connections More than one TCP connection at a time Server initiates connection close  Persistent without pipelining One TCP connection at a time Sequential requests of embedded web page objects Server or client initiates connection close  Persistent with pipelining One TCP connection at a time Back to back requests for embedded web page objects Server or client initiates connection close

Questions? 35 Do you know? IE will only open 2 parallel HTTP connections to a named server by default Do you know? Firefox will open 4 parallel HTTP connections to a named server by default Do you know? Pipelining is implemented entirely at the browser end. Thanks