Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.

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.
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
HyperText Transfer Protocol (HTTP)
Application Layer-11 CSE401N: Computer Networks Lecture-4 Application Layer Overview HTTP.
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
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
1 Creating a network app Write programs that m run on different end systems and m communicate over a network. m e.g., Web: Web server software communicates.
9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Week 11: Application Layer1 Week 11: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
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.
2: Application Layer1 Chapter 2: Application Layer Our goals: r conceptual, implementation aspects of network application protocols m transport-layer service.
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
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.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Network access and physical media Internet structure and ISPs Delay & loss.
PL-IV- Group A HTTP Request & Response Header
2: Application Layer World Wide Web (WWW). Introduction 1-2 Internet protocol stack (recap) r application: supporting network applications m FTP,
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
2: Application Layer1 Chapter 2: Application Layer Chapter goals: r conceptual + implementation aspects of network application protocols m client server.
CS 3830 Day 7 Introduction : Application Layer 2 Processes communicating Process: program running within a host. r within same host, two processes.
FTP (File Transfer Protocol) & Telnet
Mail (smtp), VoIP (sip, rtp)
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
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,…
CS 372 – introduction to computer networks* Wednesday June 30
© 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,
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
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.
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.
CSx760 Computer Networks1 HTTP. CSx760 Computer Networks2 The Web: Some Jargon r Web page: m consists of “objects” m addressed by a URL r Most Web pages.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
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.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
Advance Computer Networks Lecture#05 Instructor: Engr. Muhammad Mateen Yaqoob.
1 Chapter 2: Application Layer Part A Introduction r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP.
3: Application Protocols: HTTP
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.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
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.
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
Lecture 2 Dr. Richard Spillman Fall 2009
Internet transport protocols services
Computer Communication & Networks
EEC-484/584 Computer Networks
لایه ی کاربرد مظفر بگ محمدی 2: Application Layer.
CS 5565 Network Architecture and Protocols
EEC-484/584 Computer Networks
Presentation transcript:

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application layer protocol client/server model –client: browser that requests, receives, “displays” Web objects –server: Web server sends objects in response to requests http1.0: RFC 1945 http1.1: RFC 2068 PC running Explorer Server running Apache Web server Mac running Navigator http request http response

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 2 The http protocol: more http: TCP transport service: client initiates TCP connection (creates socket) to server, port 80 server accepts TCP connection from client http messages (application-layer protocol messages) exchanged between browser (http client) and Web server (http server) TCP connection closed http is “stateless” server maintains no information about past client requests Protocols that maintain “state” are complex! past history (state) must be maintained if server/client crashes, their views of “state” may be inconsistent, must be reconciled aside

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 3 http example Suppose user enters URL www. School.edu/Department/home.index 1a. http client initiates TCP connection to http server (process) at www. School.edu. Port 80 is default for http server. 2. http client sends http request message (containing URL) into TCP connection socket 1b. http server at host www. School.edu waiting for TCP connection at port 80. “accepts” connection, notifying client 3. http server receives request message, forms response message containing requested object (Department/home.index), sends message into socket time (contains text, references to 10 jpeg images)

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 4 http example (cont.) 5. http client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of 10 jpeg objects 4. http server closes TCP connection. time

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 5 Non-persistent and persistent connections Non-persistent HTTP/1.0 server parses request, responds, and closes TCP connection 2 RTTs to fetch each object Each object transfer suffers from slow start Persistent default for HTTP/1.1 on same TCP connection: server, parses request, responds, parses new request,.. Client sends requests for all referenced objects as soon as it receives base HTML. Fewer RTTs and less slow start. But most 1.0 browsers use parallel TCP connections.

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 6 http message format: request two types of http messages: request, response http request message: –ASCII (human-readable format) GET /somedir/page.html HTTP/1.0 User-agent: Mozilla/4.0 Accept: text/html, image/gif,image/jpeg Accept-language:fr (extra carriage return, line feed) request line (GET, POST, HEAD commands) header lines Carriage return, line feed indicates end of message

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 7 http request message: general format

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 8 http message format: response HTTP/ OK Date: Thu, 06 Aug :00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data... status line (protocol status code status phrase) header lines data, e.g., requested html file

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 9 http response status codes 200 OK –request succeeded, requested object later in this message 301 Moved Permanently –requested object moved, new location specified later in this message (Location:) 400 Bad Request –request message not understood by server 404 Not Found –requested document not found on this server 505 HTTP Version Not Supported In first line in server->client response message. A few sample codes:

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 10 User-server interaction: cookies server sends “cookie” to client in response msg Set-cookie: client presents cookie in later requests cookie: server matches presented-cookie with server-stored info –authentication –remembering user preferences client server usual http request msg usual http response + Set-cookie: # usual http request msg cookie: # usual http response msg usual http request msg cookie: # usual http response msg cookie- spectific action cookie- spectific action

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 11 User-server interaction: conditional GET Goal: don’t send object if client has up- to-date stored (cached) version client: specify date of cached copy in http request If-modified-since: server: response contains no object if cached copy up-to- date: HTTP/ Not Modified client server http request msg If-modified-since: http response HTTP/ Not Modified object not modified http request msg If-modified-since: http response HTTP/ OK … object modified

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 12 Web Caches (proxy server) user sets browser: Web accesses via web cache client sends all http requests to web cache –if object at web cache, web cache immediately returns object in http response –else requests object from origin server, then returns http response to client Goal: satisfy client request without involving origin server client Proxy server client http request http response http request http response http request http response origin server origin server

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 13 Why Web Caching? Assume: cache is “close” to client (e.g., in same network) smaller response time: cache “closer” to client decrease traffic to distant servers –link out of institutional/local ISP network often bottleneck origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link institutional cache

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 14 Browsers Web Server Networks Content Delivery: motivation

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 15 Browsers Web Servers Routers Networks Content Delivery: congestion

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 16 Reduces load on server Avoids network congestion “Inverse” Web Caching Browsers Web Server Replicated content Router Content Source Content Sink Content Delivery: idea

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 17 ftp: the file transfer protocol transfer file to/from remote host client/server model –client: side that initiates transfer (either to/from remote) –server: remote host ftp: RFC 959 ftp server: port 21 file transfer FTP server FTP user interface FTP client local file system remote file system user at host

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 18 ftp: separate control, data connections ftp client contacts ftp server at port 21, specifying TCP as transport protocol two parallel TCP connections opened: –control: exchange commands, responses between client, server. “out of band control” –data: file data to/from server ftp server maintains “state”: current directory, earlier authentication FTP client FTP server TCP control connection port 21 TCP data connection port 20

Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 19 ftp commands, responses Sample commands: sent as ASCII text over control channel USER username PASS password LIST returns list of file in current directory RETR filename retrieves (gets) file STOR filename stores (puts) file onto remote host Sample return codes status code and phrase (as in http) 331 Username OK, password required 125 data connection already open; transfer starting 425 Can’t open data connection 452 Error writing file