CSE534 – Fundamentals of Computer Networks Lecture 11: HTTP/Web (The Internet’s first killer app) Based on slides from Kurose + Ross, and Carey Williamson.

Slides:



Advertisements
Similar presentations
HTTP Cookies. CPSC Application Layer 2 User-server state: cookies Many major Web sites use cookies Four components: 1) cookie header line of HTTP.
Advertisements

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.
CSE 390 – Advanced Computer Networks Lecture 11: HTTP/Web (The Internet’s first killer app) Based on slides from Kurose + Ross, and Carey Williamson (UCalgary).
HyperText Transfer Protocol (HTTP)
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
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
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
HTTP and TCP: A Review Carey Williamson iCORE Chair and Professor Department of Computer Science University of Calgary.
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
Google App Engine Chien-Chung Shen
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
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.
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.
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,…
© 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,
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
CS 3214 Computer Systems Godmar Back Lecture 25. Announcements Project 5 due Dec 8 Exercise 10 due Nov 29 CS 3214 Fall 2010.
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.
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.
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.
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.
Lecture 2: Web Application Layer.
Introduction 1-1 Lecture 5 Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides.
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.
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.
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.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
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.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
© 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.
Application Layer Dr. Adil Yousif Lecture 2 CS.
Block 5: An application layer protocol: HTTP
Internet transport protocols services
Application HTTP.
Computer Communication & Networks
HTTP and TCP Carey Williamson Department of Computer Science
CS 5565 Network Architecture and Protocols
Carey Williamson Department of Computer Science University of Calgary
Application Layer Part 1
Chapter 2 Application Layer
Presentation transcript:

CSE534 – Fundamentals of Computer Networks Lecture 11: HTTP/Web (The Internet’s first killer app) Based on slides from Kurose + Ross, and Carey Williamson (UCalgary). Revised Spring 2015 by P. Gill

HTTP Connection Basics HTTP Protocol Cookies, keeping state + tracking Outline 2

Web and HTTP 2-3 First, a review…  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, e.g., host name path name

HTTP overview HTTP: hypertext transfer protocol  Web’s application layer protocol  client/server model  client: browser that requests, receives, (using HTTP protocol) and “displays” Web objects  server: Web server sends (using HTTP protocol) objects in response to requests 2-4 Application Layer PC running Firefox browser server running Apache Web server iphone running Safari browser HTTP request HTTP response HTTP request HTTP response

HTTP connections non-persistent HTTP  at most one object sent over TCP connection  connection then closed  downloading multiple objects required multiple connections persistent HTTP  multiple objects can be sent over single TCP connection between client, server 2-5 Application Layer

6 Example Web Page Harry Potter Movies As you all know, the new HP book will be out in June and then there will be a new movie shortly after that… “Harry Potter and the Bathtub Ring” page.html hpface.jpg castle.gif

7 Client Server The “classic” approach in HTTP/1.0 is to use one HTTP request per TCP connection, serially. TCP SYN TCP FIN page.html G TCP SYN TCP FIN hpface.jpg G TCP SYN TCP FIN castle.gif G

8 Client Server Concurrent (parallel) TCP connections can be used to make things faster. TCP SYN TCP FIN page.html G castle.gif G F S G hpface.jpg S F C S C S

Persistent HTTP 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 persistent HTTP:  server leaves connection open after sending response  subsequent HTTP messages between same client/server sent over open connection  client sends requests as soon as it encounters a referenced object  as little as one RTT for all the referenced objects 2-9 Application Layer

Non-persistent HTTP: response time RTT: time for a packet to travel from client to server and back HTTP response time:  one RTT to initiate TCP connection  one RTT for HTTP request and first few bytes of HTTP response to return  This assumes HTTP GET piggy backed on the ACK  file transmission time  non-persistent HTTP response time = 2RTT+ file transmission time 2-10 time to transmit file initiate TCP connection RTT request file RTT file received time

11 Client Server The “persistent HTTP” approach can re-use the same TCP connection for Multiple HTTP transfers, one after another, serially. Amortizes TCP overhead, but maintains TCP state longer at server. TCP FIN Timeout TCP SYN page.html G hpface.jpg G castle.gif G

12 Client Server The “pipelining” feature in HTTP/1.1 allows requests to be issued asynchronously on a persistent connection. Requests must be processed in proper order. Can do clever packaging. TCP FIN Timeout TCP SYN page.html G castle.gif hpface.jpg GG

HTTP Connection Basics HTTP Protocol Cookies, keeping state + tracking Outline 13

HTTP request message Application Layer 2-14  two types of HTTP messages: request, response  HTTP request message:  ASCII (human-readable format) request line (GET, POST, HEAD commands ) header lines carriage return, line feed at start of line indicates end of header lines GET /index.html HTTP/1.1\r\n Host: www-net.cs.umass.edu\r\n User-Agent: Firefox/3.6.10\r\n Accept: text/html,application/xhtml+xml\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO ,utf-8;q=0.7\r\n Keep-Alive: 115\r\n Connection: keep-alive\r\n \r\n carriage return character line-feed character

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: 2-15 Application Layer

HTTP response message Application Layer 2-16 status line (protocol status code status phrase) header lines data, e.g., requested HTML file HTTP/ OK\r\n Date: Sun, 26 Sep :09:20 GMT\r\n Server: Apache/ (CentOS)\r\n Last-Modified: Tue, 30 Oct :00:02 GMT\r\n ETag: "17dc6-a5c-bf716880"\r\n Accept-Ranges: bytes\r\n Content-Length: 2652\r\n Keep-Alive: timeout=10, max=100\r\n Connection: Keep-Alive\r\n Content-Type: text/html; charset=ISO \r\n \r\n data data data data data...

HTTP response status codes 200 OK  request succeeded, requested object later in this msg 301 Moved Permanently  requested object moved, new location specified later in this msg (Location:) 400 Bad Request  request msg not understood by server 404 Not Found  requested document not found on this server 505 HTTP Version Not Supported 2-17  status code appears in 1st line in server-to- client response message.  some sample codes :

HTTP Connection Basics HTTP Protocol Cookies, keeping state + tracking Outline 18

User-server state: cookies many Web sites use cookies four components: 1) cookie header line of HTTP response message 2) cookie header line in next HTTP request message 3) cookie file kept on user’s host, managed by user’s browser 4) back-end database at Web site example:  Susan always access Internet from PC  visits specific e-commerce site for first time  when initial HTTP requests arrives at site, site creates:  unique ID  entry in backend database for ID 2-19 Application Layer

Cookies: keeping “state” (cont.) 2-20 Application Layer client server usual http response msg cookie file one week later: usual http request msg cookie: 1678 cookie- specific action access ebay 8734 usual http request msg Amazon server creates ID 1678 for user create entry usual http response set-cookie: 1678 ebay 8734 amazon 1678 usual http request msg cookie: 1678 cookie- specific action access ebay 8734 amazon 1678 backend database

Cookies (continued) what cookies can be used for:  authorization  shopping carts  recommendations  user session state (Web e- mail) 2-21 Application Layer cookies and privacy:  cookies permit sites to learn a lot about you  you may supply name and to sites aside how to keep “state”:  protocol endpoints: maintain state at sender/receiver over multiple transactions  cookies: http messages carry state

Cookies + Third Parties 22  Example page (from Wired.com)

How it works 23 Wired.com GET article.html GET sharebutton.gif Cookie: FBCOOKIE Facebook now knows you visited this Wired article. Works for all pages where ‘like’/’share’ button is embedded! And it’s not just Facebook!

This has been going on for a while… 24

More recent results (2011) 25

What can we do about it? 26  Different ad block products (block cookies/connections to third party sites)  Ghostery, Ad Block etc.  Doesn’t completely solve the problem…  Trackers getting smarter. Use browser features to fingerprint  E.g., combination of installed extensions/fonts etc. Surprisingly unique!  Optional fun reading:  Cookieless monster: