EE 122: HyperText Transfer Protocol (HTTP)

Similar documents
0 0& Basic Background. Now let s get into how things really work!

EECS 122: Introduction to Computer Networks DNS and WWW. Internet Names & Addresses

Distributed Systems are Everywhere!" CS162 Operating Systems and Systems Programming Lecture 22 Client-Server" Client-Server" Message Passing"

CS 194: Distributed Systems WWW and Web Services

Application Protocols and HTTP

Distributed Systems are Everywhere!" CS162 Operating Systems and Systems Programming Lecture 22 Client-Server" Client-Server" Message Passing"

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Introduc)on to Computer Networks

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications

The World Wide Web. EE 122: Intro to Communication Networks. Fall 2006 (MW 4-5:30 in Donner 155) Vern Paxson TAs: Dilip Antony Joseph and Sukun Kim

CSCI-1680 WWW Rodrigo Fonseca

CSCI-1680 WWW Rodrigo Fonseca

Announcements. The World Wide Web. Retrieving From the Server. Goals of Today s Lecture. The World Wide Web. POP3 Protocol

Announcements. The World Wide Web. Goals of Today s Lecture. The World Wide Web HTML. Web Components

Overview Content Delivery Computer Networking Lecture 15: The Web Peter Steenkiste. Fall 2016

Internet Content Distribution

Web, HTTP and Web Caching

HTTP Reading: Section and COS 461: Computer Networks Spring 2013

Proxying. Why and How. Alon Altman. Haifa Linux Club. Proxying p.1/24

Content Delivery on the Web: HTTP and CDNs

Caching. Caching Overview

The World Wide Web. Internet

Lab 2. All datagrams related to favicon.ico had been ignored. Diagram 1. Diagram 2

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

Notes beforehand... For more details: See the (online) presentation program.

Application Level Protocols

Introduction. WWW history. Application concepts, WWW and HTTP Perspectives on (mobile) communications. Fredrik Alstorp Torbjörn Söderberg

Web History. Systemprogrammering 2006 Föreläsning 9 Web Services. Internet Hosts. Web History (cont) 1945: 1989: Topics 1990:

Lecture 3. HTTP v1.0 application layer protocol. into details. HTTP 1.0: RFC 1945, T. Berners-Lee HTTP 1.1: RFC 2068, 2616

Hypertext Transport Protocol

World Wide Web. Before WWW

Outline Computer Networking. HTTP Basics (Review) How to Mark End of Message? (Review)

A taste of HTTP v1.1. additions. HTTP v1.1: introduces many complexities no longer an easy protocol to implement. G.Bianchi, G.Neglia, V.

3. WWW and HTTP. Fig.3.1 Architecture of WWW

Giving credit where credit is due

Chapter 27 WWW and HTTP Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Web Technology. COMP476 Networked Computer Systems. Hypertext and Hypermedia. Document Representation. Client-Server Paradigm.

HTTP and Web Content Delivery

Announcements Fawzi Emad, Computer Science Department, UMCP

Computer Networks. Wenzhong Li. Nanjing University

Announcements Fawzi Emad, Computer Science Department, UMCP

Application Layer -1- Network Tools

Browser behavior can be quite complex, using more HTTP features than the basic exchange, this trace will show us how much gets transferred.

CMPE 151: Network Administration. Servers

CMSC 332 Computer Networking Web and FTP

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017

Web Engineering. Basic Technologies: Protocols and Web Servers. Husni

1.1 A Brief Intro to the Internet

Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers

Applications & Application-Layer Protocols: The Web & HTTP

Outline of Lecture 3 Protocols

How to work with HTTP requests and responses

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

COSC 2206 Internet Tools. The HTTP Protocol

CSE/EE 461 HTTP and the Web

HTTP Security. CSC 482/582: Computer Security Slide #1

The HTTP protocol. Fulvio Corno, Dario Bonino. 08/10/09 http 1

Hypertext Transport Protocol HTTP/1.1

WWW Document Technologies

Web. Computer Organization 4/16/2015. CSC252 - Spring Web and HTTP. URLs. Kai Shen

CPSC156a: The Internet Co-Evolution of Technology and Society. Lecture 4: September 16, 2003 Internet Layers and the Web

Internet applications

WEB TECHNOLOGIES CHAPTER 1

SC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers

2- Application Level Protocols HTTP 1.0/1.1/2

Internet Architecture. Web Programming - 2 (Ref: Chapter 2) IP Software. IP Addressing. TCP/IP Basics. Client Server Basics. URL and MIME Types HTTP

Review of Previous Lecture

EEC-682/782 Computer Networks I

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary

CS631 - Advanced Programming in the UNIX Environment

File transfer. Internet Applications (FTP,WWW, ) Connections. Data connections

CS 5450 HTTP. Vitaly Shmatikov

Computer Networks. HTTP and more. Jianping Pan Spring /20/17 CSC361 1

HTTP. Robert Grimm New York University

15-441: Computer Networks Homework 3

Global Servers. The new masters

Project 2 Implementing a Simple HTTP Web Proxy

INF5750. RESTful Web Services

Compliance with RFC 3261

HTTP and the Dynamic Web

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10

Application Layer Introduction; HTTP; FTP

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

Seminar on. By Sai Rahul Reddy P. 2/2/2005 Web Caching 1

1.1 A Brief Intro to the Internet

Objectives. Connecting with Computer Science 2

HyperText Transfer Protocol

ICS 351: Today's plan. IPv6 routing protocols (summary) HTML HTTP web scripting languages certificates (review) cookies

CSc 450/550 Computer Networks Network Architectures & Client-Server Model

Investigating Transparent Web Proxies in Cellular Networks

Assignment #2. Csci4211 Spring Due on March 6th, Notes: There are five questions in this assignment. Each question has 10 points.

Outline. Internet and World Wide Web. History of the Internet. What is the Internet? How Does Data Travel Through the Internet?

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

8/8/17. HTTP Overview. It s all about the network. If you want to really do Web programming right you will need to know the ins and outs of HTTP

COSC4377. Chapter 2: Outline

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

WWW. HTTP, Ajax, APIs, REST

Network Applications and the Web

Lecture 6 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Transcription:

Background EE 122: HyperText Transfer Protocol (HTTP) Ion Stoica Nov 25, 2002 World Wide Web (WWW): a set of cooperating clients and servers that communicate through HTTP HTTP history - First HTTP implementation - 1990 Tim Berners-Lee at CERN - HTTP/0.9 1991 Simple GET command for the Web - HTTP/1.0 1992 /Server information, simple caching - HTTP/1.1-1996 istoica@cs.berkeley.edu 2 Basics Terminology -server architecture Synchronous request/reply protocol Stateless Uses unicast Implemented on top of TCP/IP Resource file or service (e.g., dynamic results from the execution of a script) Entity information transferred in a request or response Entity Tag unique identifier for a resource istoica@cs.berkeley.edu 3 istoica@cs.berkeley.edu 4 1

Universal Resource Locator Request An address or location of a resource, e.g., http://www.eecs.berkeley.edu/index.html Prefix up to : represents the protocol to be used to obtain the resource Steps to get the resource: http://www.eecs.berkeley.edu/index.html 1. Use DNS to obtain the IP address of www.eecs.berkeley.edu, A 2. Send to A an HTTP request: GET /index.html HTTP/1.0 3. Server response: (see next slide) istoica@cs.berkeley.edu 5 istoica@cs.berkeley.edu 6 Server Response Big Picture HTTP/1.0 200 OK Content-Type: text/html Content-Length: 1234 Last-Modified: Mon, 19 Nov 2001 15:31:20 GMT <HTML> <HEAD> <TITLE>EECS Home Page</TITLE> </HEAD> </BODY> </HTML> Establish connection request Request response Close connection TCP Syn TCP syn + ack TCP ack + HTTP GET.. Server istoica@cs.berkeley.edu 7 istoica@cs.berkeley.edu 8 2

Request Methods Response Codes GET transfer resource from given URL HEAD GET resource metadata (headers) only PUT store/modify resource under the given URL DELETE remove resource POST provide input for a process identified by the given URL (usually used to post CGI parameters) 1x informational 2x success 3x redirection 4x client error in request 5x server error; can t satisfy the request istoica@cs.berkeley.edu 9 istoica@cs.berkeley.edu 10 HTTP/1.0 Example HHTP/1.0 Performance Request image 1 Transfer image 1 Request image 2 Transfer image 2 Server Create a new TCP connection for each resource - Large number of embedded objects in a web page - Many short lived connections TCP transfer - Too slow for small object - May never exit slow-start phase Request text Finish display page Transfer text istoica@cs.berkeley.edu 11 istoica@cs.berkeley.edu 12 3

Web Proxies Web Proxies (cont d) Intermediaries between client and server 1 2.. Proxy Proxy Server Location: close to the server, client, or in the network Functions: - Filter requests/responses - Modify requests/responses Change http requests to ftp requests Change response content, e.g., transcoding to display data efficiently on a Palm Pilot - Provide better privacy - Caching N istoica@cs.berkeley.edu 13 istoica@cs.berkeley.edu 14 HTTP/1.0 Caching HTTP/1.1 A request directive: - Pragma: no-cache ignore all caches and get resource directly from server A modifier to the GET request: - If-modified-since return a not modified response if resource was not modified since specified time A response header: - Expires specify to the client for how long it is safe to cache the resource Performance: - Persistent connections - Pipelined requests/responses - Support for virtual hosting Efficient caching support istoica@cs.berkeley.edu 15 istoica@cs.berkeley.edu 16 4

Persistent Connections Pipelined Requests/Responses Allow multiple transfers over one connection Avoid multiple TCP connection setups Avoid multiple TCP slow starts Buffer requests and responses to reduce the number of packets Multiple requests can be contained in one TCP segment Note: order of responses has to be maintained Request 1 Request 2 Request 3 Transfer 1 Transfer 2 Transfer 3 Server istoica@cs.berkeley.edu 17 istoica@cs.berkeley.edu 18 Support for Virtual Hosting HTTP/1.1 - Caching Problem: recall that a request to get http://www.foo.com/index.html has in its header only: - GET /index.html HTTP/1.0 It is not possible to run two web servers at the same IP address, because GET is ambiguous - This is useful when outsourcing web content, i.e., company foo asks company outsource to manage its content HTTP/1.1 addresses this problem by mandating Host header line, e.g., HTTP/1.1 provides better support for caching - Separate what to cache and whether a cache response can be used safely - Allow server to provide more info on resource cacheability - A cache does not return unknowingly a stale resources - Not depending on absolute timestamps GET /index.html HTTP/1.1 Host: www.foo.com istoica@cs.berkeley.edu 19 istoica@cs.berkeley.edu 20 5

HTTP/1.1 - Caching (cont d) HTTP/1.1 - Caching (cont d) Four new headers associated to caching: age header, entity tags, cache-control, and vary Age Header the amount of time that is known to have passed since the response message was retrieved Entity tags unique tags to differentiate between different cached versions of the same resource Cache-Control - no-cache: get resource only from server - only-if-cached: obtain resource only from cache - no-store: don t allow caches to store request/response - max-age: response s should be no grater than this value - max-stale: expired response OK but not older than staled value - min-fresh: response should remain fresh for at least stated value - no-transform: proxy should not change media type istoica@cs.berkeley.edu 21 istoica@cs.berkeley.edu 22 HTTP/1.1 Caching (cont d) Vary - Accommodate multiple representations of the same resource - Used to list a set of request headers to be used to select the appropriate representation Example: - Server sends the following response HTTP/1.1 200 OK Vary: Accept-Language Summary HTTP the backbone of WWW Evolution of HTTP has concentrated on increasing the performance Next generations (HTTP/NG) concentrate on increasing extensibility - Request will contain: Accept-Language: en-us - Cache return the response that has: Accept-Language: en-us istoica@cs.berkeley.edu 23 istoica@cs.berkeley.edu 24 6