EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.

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.
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.
Chapter 2: Application Layer
EEC-484/584 Computer Networks Discussion Session for HTTP and DNS Wenbing Zhao
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.
Application Layer Overview and Web/HTTP
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.
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.
Chapter 2 Application Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 4.
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.
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)
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.
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
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
Sockets process sends/receives messages to/from its socket
CS1652 September 5 th, 2013 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights.
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.
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.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Lecture 23 Application Layer ELEN E6761: Communication Networks Instructor: Javad Ghaderi Slides adapted from “Computer Networking: A Top Down Approach”
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 Application layer  Principles of network applications  Web and HTTP  FTP, TFTP  TELNET  Electronic Mail  SMTP, POP3, IMAP.
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.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
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.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
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
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
EEC-484/584 Computer Networks
Presentation transcript:

EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer Networking book )

2 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Second Session Issue 17 students initially indicated the availability at MW 2-3:50 timeslot –11 confirmed availability –2 couldn’t make it –1 dropped the class –3 not confirmed Currently, we have 39 students –At least 25 students would stay in original session

3 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Outline Mock quiz Web and HTTP

Large Scale Internet Application Architecture

5 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao The World Wide Web Creation of Tim Berners-Lee, in 1989 CERN nuclear physics research –Mosaic – first graphical interface, creation of Marc Andersson (and others), precursor to Netscape Uses a client-server architecture –Web server –Web browser Runs on HTTP over TCP

6 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Web and HTTP Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file,… Web page consists of base HTML-file which includes several referenced objects Each object is addressable by a URL The idea of having one page point to another is called hypertext –Invented by Vannevar Bush, a MIT EE professor, in 1945

7 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao URL – Uniform Resource Locater Example URL: URL encodes three types of information –What is the page called – local path name uniquely indicating the specific page –Where is the page located – Host name of the server on which the page is located –How can the page be accessed – protocol, e.g., http, ftp host name path name protocol name

8 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Some Common URLs

9 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao HTTP overview HTTP: HyperText Transfer Protocol Web’s application layer protocol client/server model HTTP 1.0: RFC 1945 HTTP 1.1: RFC 2068 PC running Explorer Server running Apache Web server Mac running Navigator HTTP request HTTP response

10 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao HTTP Overview Uses TCP: –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

11 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao HTTP Overview 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

12 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao HTTP Connections Nonpersistent HTTP At most one object is sent over a TCP connection HTTP/1.0 uses nonpersistent HTTP Persistent HTTP Multiple objects can be sent over single TCP connection between client and server HTTP/1.1 uses persistent connections in default mode

13 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Nonpersistent HTTP Suppose user enters URL 1a. HTTP client initiates TCP connection to HTTP server at on port HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDept/home.index 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, and sends message into its socket time (contains text, references to 10 jpeg images)

14 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Nonpersistent HTTP 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

15 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Non-Persistent HTTP: Response Time Definition of RTT: time to send a small packet to travel from client to server and back (Round Trip Time) time to transmit file initiate TCP connection RTT request file RTT file received time

16 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Non-Persistent HTTP: Response Time Response time: one RTT to initiate TCP connection one RTT for HTTP request and first few bytes of HTTP response to return file transmission time Total = 2RTT+transmit time

17 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Non-Persistent HTTP Issues Requires 2 RTTs per object OS overhead for each TCP connection Browsers often open parallel TCP connections to fetch referenced objects (to reduce response time)

18 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Persistent HTTP Server leaves connection open after sending response Subsequent HTTP messages between same client/server sent over open connection

19 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Persistent HTTP Persistent without pipelining: Client issues new request only when previous response has been received One RTT for each referenced object Persistent with pipelining: Default in HTTP/1.1 Client sends requests as soon as it encounters a referenced object As little as one RTT for all the referenced objects

20 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao HTTP Request Message Two types of HTTP messages: request, response HTTP request message: –ASCII (human-readable format) GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr (extra carriage return, line feed) request line (GET, POST, HEAD commands) header lines Carriage return, line feed indicates end of message

21 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao HTTP Request Message: General Format

22 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Uploading Form Input Post method: Web page often includes form input Input is uploaded to server in entity body URL method: Uses GET method Input is uploaded in URL field of request line:

23 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Method types HTTP/1.0 GET POST HEAD –Asks server to include only the header part in response HTTP/1.1 GET, POST, HEAD PUT –Uploads file in entity body to path specified in URL field DELETE –Deletes file specified in the URL field

24 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao HTTP Response Message HTTP/ OK Connection close 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

25 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao 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 Status code is in first line of the response message:

26 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Trying out HTTP 1. Telnet to your favorite Web server: Opens TCP connection to port 80 (default HTTP server port) at cis.poly.edu. Anything typed in sent to port 80 at cis.poly.edu telnet cis.poly.edu Type in a GET HTTP request: GET /~ross/ HTTP/1.1 Host: cis.poly.edu 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!

27 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao User-Server State: Cookies Many major Web sites use cookies Four components: 1) cookie header line in HTTP response message 2) cookie header line in HTTP request message 3) cookie file kept on user’s host, managed by user’s browser 4) back-end database at Web site

28 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao User-Server State: Cookies Example: –Susan access Internet always from same PC –She visits a specific e-commerce site for first time –When initial HTTP requests arrives at site, site creates a unique ID and creates an entry in backend database for ID

29 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Cookies: Keeping “State” client server usual http request msg usual http response + Set-cookie: 1678 usual http request msg cookie: 1678 usual http response msg usual http request msg cookie: 1678 usual http response msg cookie- specific action cookie- spectific action server creates ID 1678 for user entry in backend database access Cookie file amazon: 1678 ebay: 8734 Cookie file ebay: 8734 Cookie file amazon: 1678 ebay: 8734 one week later:

30 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Cookies What cookies can bring: authorization shopping carts recommendations user session state (Web ) How to keep “state”: Protocol endpoints: maintain state at sender/receiver over multiple transactions cookies: http messages carry state

31 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Performance Enhancement Caching –Save pages that have been requested in case they are used again –Client-side technique Server replication –Replicate server’s contents at multiple locations –Sometimes called mirroring Content delivery networks –Deliver contents for their providers to end users efficiently for a fee

32 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Web Caching user sets browser: Web accesses via proxy server browser sends all HTTP requests to proxy server –object in cache: returns cached object –else cache requests object from origin server, then returns object to client Goal: satisfy client request without involving origin server client Proxy server client HTTP request HTTP response HTTP request HTTP response origin server origin server

33 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao More about Web Caching Proxy server acts as both client and server Typically proxy server is installed by ISP (university, company, residential ISP) Why Web caching? Reduce response time for client request Reduce traffic on an institution’s access link Internet dense with caches: enables “poor” content providers to effectively deliver content

34 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Non-Caching Example Assumptions Average object size = 100,000 bits Avg. request rate from institution’s browsers to origin servers = 15/sec Delay from institutional router to any origin server and back to router = 2 sec origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link

35 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Non-Caching Example Consequences Utilization on LAN = 15% Utilization on access link = 100% Total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + milliseconds origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link

36 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Non-Caching Example Possible solution Increase bandwidth of access link to, say, 10 Mbps Consequences Utilization on LAN = 15% Utilization on access link = 15% Total delay = Internet delay + access delay + LAN delay = 2 sec + msecs + msecs Often a costly upgrade origin servers public Internet institutional network 10 Mbps LAN 10 Mbps access link

37 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Caching Example Install proxy server Suppose hit rate is 0.4 Consequence 40% requests will be satisfied almost immediately 60% requests satisfied by origin server Utilization of access link reduced to 60%, resulting in negligible delays (say 10 msec) Total avg delay = Internet delay + access delay + LAN delay =.6*(2.01) secs +.4*milliseconds < 1.4 secs origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link Institutional Proxy server

38 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Conditional GET Goal: don’t send object if cache is up-to-date Proxy server: specify date of cached copy in HTTP request If-modified-since: Origin server: response contains no object if cached copy is up-to-date: HTTP/ Not Modified Proxy server Origin 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

39 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Content Delivery Networks Starts with URL replacement so all contents point to a CDN serverStarts with URL replacement so all contents point to a CDN server On receiving client’s request, the request is redirected to the closest proxy serverOn receiving client’s request, the request is redirected to the closest proxy server

40 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Content Delivery Networks: URL Replacement Original Web page After transformation

41 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Content Delivery Networks: Request Redirection

42 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao HTTP Methods The built-in HTTP request methods –Method names are case sensitive!

43 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao HTTP Methods The status code response groups

44 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Internet Transport Protocols Services TCP service: connection-oriented: setup required between client and server processes reliable transport between sending and receiving process flow control: sender won’t overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum bandwidth guarantees

45 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Internet Transport Protocols Services UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee

46 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Internet Applications Application remote terminal access Web file transfer streaming multimedia Internet telephony Application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] proprietary (e.g. RealNetworks) proprietary (e.g., Vonage,Dialpad) Underlying transport protocol TCP TCP or UDP typically UDP