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.

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.
2: Application Layer1 Chapter 2: Application Layer Our goals: r conceptual, implementation aspects of network application protocols m transport-layer service.
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.
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.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
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.
CS 6204 Cloud Environments Godmar Back. Announcements Please sign up for Piazza CS 6204 Choose first topic from list CS 6204 Spring 2014.
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,
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
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,
2: Application Layer1 Chapter 2 Application Layer Part 2: Web & HTTP These slides derived from Computer Networking: A Top Down Approach, 6 th edition.
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
2: Application Layer1 Chapter 2 outline r 2.1 Principles of app layer protocols r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail r 2.5 DNS r 2.6 Socket.
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.
Content distribution networks (CDNs) r The content providers are the CDN customers. Content replication r CDN company installs hundreds of CDN servers.
Outline r Introduction to App Layer Protocols r Brief History of WWW r Architecture r HTTP Connections r HTTP Format r Web Performance r Cookies.
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.
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.
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.
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.
© 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 
Network Applications: HTTP/1.0
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
CS 5565 Network Architecture and Protocols
The Application Layer: HTTP
Presentation transcript:

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 consist of: m base HTML page, and m several referenced objects. r URL has three components: host name, port number and path name: r User agent for Web is called a browser: m MS Internet Explorer m Netscape Navigator r Server for Web is called Web server: m Apache (public domain) m MS Internet Information Server snowball.cs.uga.edu:80/~cs6760/index.html

CSx760 Computer Networks3 The Web: the HTTP Protocol HTTP: hypertext transfer protocol r Web’s application layer protocol r client/server model m client: browser that requests, receives, “displays” Web objects m server: Web server sends objects in response to requests r http1.0: RFC 1945 r http1.1: RFC 2068 Windows running Explorer Server running Apache Web server Linux running Navigator http request http response

CSx760 Computer Networks4 The HTTP Protocol: Message Flow HTTP: TCP transport service: r client initiates TCP connection (creates socket) to server, port 80 r server accepts TCP connection from client r http messages (application- layer protocol messages) exchanged between browser (http client) and Web server (http server) r TCP connection closed http is “stateless” r server maintains no information about past client requests Protocols that maintain “state” are complex! r past history (state) must be maintained r if server/client crashes, their views of “state” may be inconsistent, must be reconciled r When is “state” desired? aside

CSx760 Computer Networks5 HTTP Example Suppose user enters URL 1a. http client initiates TCP connection to http server (process) at 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 waiting for TCP connection at port 80. “accepts” connection, notifying client 3. http server receives request message, forms response message containing requested object ( index.html ), sends message into socket (the sending speed increases slowly, which is called slow-start) time

CSx760 Computer Networks6 HTTP Example (cont.) 5. http client receives response message containing html file, parses html file, finds embedded image 6. Steps 1-5 repeated for each of the embedded images 4. http server closes TCP connection. time

CSx760 Computer Networks7 HTTP Request Message: General Format

CSx760 Computer Networks8 The HTTP Protocol: Message Format r Two types of HTTP messages: request, response r HTTP request message: m ASCII (human-readable format) GET /~cs6760/index.html HTTP/1.1 Host: snowball.cs.uga.edu Connection: close User-agent: Mozilla/4.0 Accept: text/html, image/gif, image/jpeg Accept-language: en (extra carriage return, line feed) request line (GET, POST, HEAD commands) header lines Carriage return, line feed indicates end of message

CSx760 Computer Networks9 HTTP Message Format: Response HTTP/ OK Date: Sun, 06 Aug :00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Wed, 2 Oct 2002 …... 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

CSx760 Computer Networks10 HTTP Response Status Codes 200 OK m request succeeded, requested object later in this message 301 Moved Permanently m requested object moved, new location specified later in this message (Location:) 400 Bad Request m request message not understood by server 404 Not Found m requested document not found on this server 505 HTTP Version Not Supported In first line in server->client response message. A few sample codes:

CSx760 Computer Networks11 More about Message Format r Why encode HTTP message in ASCII, why not use binary? r Loss a few encoding bytes on the wire, and in RAM … r But human-readable format is very important for high level network protocols m typing interactively to the system or sending scripts directly into the system is.

CSx760 Computer Networks12 Trying out HTTP (client side) for yourself 1. Telnet to your favorite Web server: Opens TCP connection to port 80 (default http server port) at Anything typed in sent to port 80 at telnet Type in a GET http request: GET /index.html HTTP/1.0 By typing this in (hit carriage return twice), you send this minimal (but complete) GET request to http server 3. Look at response message sent by http server!

CSx760 Computer Networks13 Response time modeling Definition of RTT: time to send a small packet to travel from client to server and back. Web Response time: r one RTT to initiate TCP connection r one RTT for HTTP request and first few bytes of HTTP response to return r file transmission time total = 2RTT+transmit time time to transmit file initiate TCP connection RTT request file RTT file received time

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

CSx760 Computer Networks15 Pipelining Persistent without pipelining: r client issues new request only when previous response has been received r one RTT for each referenced object Persistent with pipelining: r default in HTTP/1.1 m “It is unfortunately not well supported by many web servers and proxies”, therefore Mozilla (and probably all other browers disable it by default) r client sends requests as soon as it encounters a referenced object r as little as one RTT for all the referenced objects

CSx760 Computer Networks16 User-Server Interaction: Authentication Authentication goal: control access to server documents r stateless: client must present authorization in each request r authorization: typically name, password  Authorization: header line in request m if no authorization presented, server refuses access, sends WWW-authenticate: header line in response client server usual http request msg 401: authorization req. WWW-authenticate: usual http request msg + Authorization:line usual http response msg usual http request msg + Authorization:line usual http response msg time Browser caches name & password so that user does not have to repeatedly enter it.

CSx760 Computer Networks17 User-server Interaction: Cookies r server sends “cookie” to client in response msg Set-cookie: r client presents cookie in later requests Cookie: r server matches presented-cookie with server-stored info m authentication m remembering user preferences, previous choices 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

CSx760 Computer Networks18 HTTPS r Secure Socket Layer (SSL) r Certification Authority (CA) r Symmetric Key Cryptography r Asymmetric Key Cryptography m Public Key & Private Key r What if m Sniffing? m Replaying? clientserver https request msg (cryptographic preferences) Cryptographic preference, public key, and CA certificate time If the client has the CA’s public key, then the client can verify the CA certificate Client generates a random symmetric key, encrypts it using the server’s public key Server extracts the symmetric key and encrypt further communication with it

CSx760 Computer Networks19 Certification Example r A digital certificate contains the name of a company, web site or individual, along with a cryptographic key that can be used to encrypt information that must be sent to that individual r A list of CAs is pre-loaded in your browser

CSx760 Computer Networks20 User-Server Interaction: Conditional GET r Goal: don’t send object if client has up-to-date stored (cached) version r client: specify date of cached copy in http request If-modified-since: r 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

CSx760 Computer Networks21 Web Caches (Proxy Server) r user sets browser: Web accesses via web cache r client sends all http requests to web cache m if object at web cache, web cache immediately returns object in http response m else requests object from origin server, then returns http response to client r Why do we need proxy? 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

CSx760 Computer Networks22 Why Web Caching? Assume: cache is “close” to client (e.g., in same network) r smaller response time: cache “closer” to client r decrease traffic to distant servers m 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

CSx760 Computer Networks23 Content distribution networks (CDNs) r The content providers are the CDN customers. Content replication r CDN company installs hundreds of CDN servers throughout Internet m in lower-tier ISPs, close to users r CDN replicates its customers’ content in CDN servers. When provider updates content, CDN updates servers origin server in North America CDN distribution node CDN server in S. America CDN server in Europe CDN server in Asia

CSx760 Computer Networks24 CDN example origin server r r distributes HTML r Replaces: with h ttp:// HTTP request for DNS query for HTTP request for Origin server CDNs authoritative DNS server Nearby CDN server CDN company r cdn.com r distributes gif files r uses its authoritative DNS server to route redirect requests

CSx760 Computer Networks25 Content Distribution Networks BBB.COM client server surrogate B B B B B B cache A A A A A A AAA.COM C C C C C C CCC.COM redirector

CSx760 Computer Networks26 Partial Replication on CDN BBB.COM client server surrogate B B B B A A A A AAA.COM C C C BB A A C C C CCC.COM redirector

CSx760 Computer Networks27 Partial Replication on CDN BBB.COM client server surrogate B B B B A A A A AAA.COM C C C C CCC.COM redirector

CSx760 Computer Networks28 Factors Affecting Redirection r Goals m Increase system throughput under load m Reduce response latency perceived by clients r Server load m Pick least loaded server r Network proximity m Pick closest server r Cache locality m Pick server just served the object What’s the tradeoff across different loads? Often conflict

CSx760 Computer Networks29 More about CDNs routing requests r CDN creates a “map”, indicating distances from leaf ISPs and CDN nodes r when query arrives at authoritative DNS server: m server determines ISP from which query originates m uses “map” to determine best CDN server not just Web pages r streaming stored audio/video r streaming real-time audio/video m CDN nodes create application-layer overlay network

CSx760 Computer Networks30 Summary r HTTP m Stateless application layer protocols m HTTP/1.1 Persistent connection & pipeline m Authentication, Cookies, and HTTPS m HTTP is not limited to web server/browser m Proxy and CDN for performance improvement