Application Layer: HTTP and the Web. Srinidhi Varadarajan



Similar documents
The Web: some jargon. User agent for Web is called a browser: Web page: Most Web pages consist of: Server for Web is called Web server:

Network Technologies

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

The Web History (I) The Web History (II)

1 Introduction: Network Applications

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

CONTENT of this CHAPTER

1. When will an IP process drop a datagram? 2. When will an IP process fragment a datagram? 3. When will a TCP process drop a segment?

Lecture 8a: WWW Proxy Servers and Cookies

Lecture 8a: WWW Proxy Servers and Cookies

DATA COMMUNICATOIN NETWORKING

HTTP. Internet Engineering. Fall Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

Cookies Overview and HTTP Proxies

The Hyper-Text Transfer Protocol (HTTP)

World Wide Web. Before WWW

Project #2. CSE 123b Communications Software. HTTP Messages. HTTP Basics. HTTP Request. HTTP Request. Spring Four parts

Outline Definition of Webserver HTTP Static is no fun Software SSL. Webserver. in a nutshell. Sebastian Hollizeck. June, the 4 th 2013

Content'Delivery'Infrastructure' HTTP'Overview' A'Web'Page' Computer Networks. Lecture'9:'HTTP'

Application-layer protocols

By Bardia, Patit, and Rozheh

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

HTTP Protocol. Bartosz Walter

Hypertext for Hyper Techs

reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002)

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Internet Technologies 4-http. F. Ricci 2010/2011

Chapter 27 Hypertext Transfer Protocol

Review of Networking Basics. Yao Wang Polytechnic University, Brooklyn, NY11201

WHAT IS A WEB SERVER?

Modern Web Development From Angle Brackets to Web Sockets

INF3190 Application Layer DNS, Web, Mail

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

No. Time Source Destination Protocol Info HTTP GET /ethereal-labs/http-ethereal-file1.html HTTP/1.

URLs and HTTP. ICW Lecture 10 Tom Chothia

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

THE PROXY SERVER 1 1 PURPOSE 3 2 USAGE EXAMPLES 4 3 STARTING THE PROXY SERVER 5 4 READING THE LOG 6

Data Communication I

1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; SMTP.

Lecture 2. Internet: who talks with whom?

CS 5480/6480: Computer Networks Spring 2012 Homework 1 Solutions Due by 9:00 AM MT on January 31 st 2012

Streaming Stored Audio & Video

First Midterm for ECE374 03/24/11 Solution!!


Architecture of So-ware Systems HTTP Protocol. Mar8n Rehák

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

HTTP Caching & Cache-Busting for Content Publishers

Chapter 2 Application Layer

Lektion 2: Web als Graph / Web als System

Internet Technologies Internet Protocols and Services

Introduction to LAN/WAN. Application Layer (Part II)

Transport Layer Security Protocols

CloudOYE CDN USER MANUAL

Application layer Web 2.0

Computer Networking LAB 2 HTTP

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 20

S y s t e m A r c h i t e c t u r e

Hack Yourself First. Troy troyhunt.com

BITS-Pilani Hyderabad Campus CS C461/IS C461/CS F303/ IS F303 (Computer Networks) Laboratory 3

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

ATS Test Documentation

Research of Web Real-Time Communication Based on Web Socket

CS 188/219. Scalable Internet Services Andrew Mutz October 8, 2015

Varnish Tips & Tricks, 2015 edition

Divide and Conquer Real World Distributed Port Scanning

FTP: the file transfer protocol

International Journal of Engineering & Technology IJET-IJENS Vol:14 No:06 44

HTTP Response Splitting

The exam has 110 possible points, 10 of which are extra credit. There is a Word Bank on Page 8. Pages 7-8 can be removed from the exam.

TCP/IP Networking An Example

HOST EUROPE CLOUD STORAGE REST API DEVELOPER REFERENCE

Domain Name System (DNS)

Application Example: WWW. Communication in the WWW. WWW, HTML, URL and HTTP. Loading of Web Pages. The Client/Server model is used in the WWW

COMP 112 Assignment 1: HTTP Servers

Internet Content Distribution

Ethical Hacking as a Professional Penetration Testing Technique

Repeater. BrowserStack Local. browserstack.com 1. BrowserStack Local makes a REST call using the user s access key to browserstack.

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP - Message Format. The Client/Server model is used:

Proxies. Chapter 4. Network & Security Gildas Avoine

<draft-luotonen-web-proxy-tunneling-00.txt> February Tunneling TCP based protocols through Web proxy servers

CS 213, Fall 2000 Lab Assignment L5: Logging Web Proxy Assigned: Nov. 28, Due: Mon. Dec. 11, 11:59PM

LabVIEW Internet Toolkit User Guide

1 Recommended Readings. 2 Resources Required. 3 Compiling and Running on Linux

Lecture 11 Web Application Security (part 1)

Web Programming. Robert M. Dondero, Ph.D. Princeton University

Network Security Essentials Chapter 5

Design Notes for an Efficient Password-Authenticated Key Exchange Implementation Using Human-Memorable Passwords

DEPLOYMENT GUIDE Version 1.1. Deploying the BIG-IP LTM v10 with Citrix Presentation Server 4.5

The Application Layer. CS158a Chris Pollett May 9, 2007.

Cyber Security Workshop Ethical Web Hacking

Application Layer Protocols

Elluminate Live! Access Guide. Page 1 of 7

You can do THAT with SAS Software? Using the socket access method to unite SAS with the Internet

Wireshark Lab: HTTP SOLUTION

Transcription:

Application Layer: HTTP and the Web Srinidhi Varadarajan

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 3& UXQQLQJ ([SORUHU 0DF UXQQLQJ 1DYLJDWRU KWWS UHTXHVW KWWS UHVSRQVH KWWS UHTXHVW KWWS UHVSRQVH 6HUYHU UXQQLQJ 1&6$ :HE VHUYHU

The http protocol http: TCP transport service: client initiates TCP connection (creates socket) to server, port 80 server accepts TCP connection from client http messages (applicationlayer 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

http example Suppose user enters URL www.someschool.edu/somedepartment/home.index (contains text, references to 10 jpeg images) time 1a. http client initiates TCP connection to http server (process) at www.someschool.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.someschool.edu waiting for TCP connection at port 80. accepts connection, notifying client 3. http server receives request message, forms response message containing requested object (somedepartment/home.index ), sends message into socket

http example (cont.) time 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.

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. Most 1.0 browsers use parallel TCP connections. One for each object

Pipelining HTTP Requests Two approaches to sending HTTP requests Non-pipelined approach: Send a HTTP request. Wait for it to complete before sending the next request. Latency per object: 1 RTT Pipelined approach: Send HTTP requests as soon as you know of them. I.e. parse base html file and send HTTP requests as soon as you encounter a referenced object Advantage: Reduces perceived latency. Why? Min Latency for all objects: 1 RTT. How? Max latency: 1 RTT/object

http message format: request two types of http messages: request, response http request message: ASCII (human-readable format) UHTXHVW OLQH *(7 3267 +($' FRPPDQGV KHDGHU OLQHV GET /somedir/page.html HTTP/1.0 User-agent: Moilla/4.0 Accept: text/html, image/gif,image/jpeg Accept-language:fr (extra carriage return, line feed) &DUULDJH UHWXUQ OLQH IHHG LQGLFDWHV HQG RI PHVVDJH

http request message: general format

http message format: response VWDWXV OLQH SURWRFRO VWDWXV FRGH VWDWXV SKUDVH KHDGHU OLQHV GDWD HJ UHTXHVWHG KWPO ILOH HTTP/1.0 200 OK Date: Thu, 06 Aug 1998 12: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...

http response status codes In first line in server -> client response message. A few sample 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

Trying out http (client side) for yourself 1. Telnet to your favorite Web server: telnet www.eurecom.fr 80 2SHQV 7&3 FRQQHFWLRQ WR SRUW GHIDXOW KWWS VHUYHU SRUW DW ZZZHXUHFRPIU $Q\WKLQJ W\SHG LQ VHQW WR SRUW DW ZZZHXUHFRPIU 2. Type in a GET http request: GET /~ross/index.html HTTP/1.0 %\ W\SLQJ WKLV LQ KLW FDUULDJH UHWXUQ WZLFH \RX VHQG WKLV PLQLPDO EXW FRPSOHWH *(7 UHTXHVW WR KWWS VHUYHU 3. Look at response message sent by http server!

User-server server interaction: authentication Authentication goal: control access to server documents stateless: client must present authoriation in each request authoriation: typically name, password authoriation: header line in request if no authoriation presented, server refuses access, sends WWW authenticate: header line in response FOLHQW XVXDO KWWS UHTXHVW PVJ DXWKRUL]DWLRQ UHT WWW authenticate: XVXDO KWWS UHTXHVW PVJ Authoriation:line XVXDO KWWS UHVSRQVH PVJ XVXDO KWWS UHTXHVW PVJ Authoriation:line XVXDO KWWS UHVSRQVH PVJ VHUYHU WLPH %URZVHU FDFKHV QDPH SDVVZRUG VR WKDW XVHU GRHV QRW KDYH WR UHSHDWHGO\ HQWHU LW

User-server server interaction: cookies server sends cookie to client in response mst Set-cookie: 1678453 client presents cookie in later requests cookie: 1678453 server matches presented-cookie with server-stored info authentication remembering user preferences, previous choices FOLHQW XVXDO KWWS UHTXHVW PVJ XVXDO KWWS UHVSRQVH Set-cookie: # XVXDO KWWS UHTXHVW PVJ cookie: # XVXDO KWWS UHVSRQVH PVJ XVXDO KWWS UHTXHVW PVJ cookie: # XVXDO KWWS UHVSRQVH PVJ VHUYHU FRRNLH VSHFWLILF DFWLRQ FRRNLH VSHFWLILF DFWLRQ

User-server 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: <date> FOLHQW KWWS UHTXHVW PVJ If-modified-since: <date> KWWS UHVSRQVH HTTP/1.0 304 Not Modified VHUYHU REMHFW QRW PRGLILHG server: response contains no object if cached copy up-to-date: HTTP/1.0 304 Not Modified KWWS UHTXHVW PVJ If-modified-since: <date> KWWS UHVSRQVH HTTP/1.1 200 OK <data> REMHFW PRGLILHG

Web Caches Goal: satisfy client request without involving origin server Solution: Caching. Store a local copy of the data. Two Types of Caches Local caches e.g. Netscape cache Can exploit locality of reference from a single user Proxy caches Sit between the user and the server. Usually they are located on the user s network Can exploit reference locality between multiple users

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 FOLHQW KWWS UHTXHVW KWWS UHVSRQVH 3UR[\ VHUYHU UHTXHVW KWWS UHTXHVW KWWS KWWS UHVSRQVH KWWS UHTXHVW KWWS UHVSRQVH KWWS UHVSRQVH RULJLQ VHUYHU FOLHQW RULJLQ VHUYHU

Why Web Caching? RULJLQ VHUYHUV 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 LQVWLWXWLRQDO QHWZRUN SXEOLF,QWHUQHW 0ESV DFFHVV OLQN 0ESV /$1 LQVWLWXWLRQDO FDFKH

Reading Required Reading A Case for Persistent-Connection HTTP, J.C. Mogul, ACM SIGCOMM 1995 pp. 299-313 Recommended Reading World Wide Web: Whence, Wither, What Next?, H. Schulrinne, IEEE Network Magaine V. 10 N.2 March April 1996, pp-10-17 Using Predictive Prefetcing to Improve World Wide Web Latency, V.N. Padmanabhan and J.C. Mogul, Computer Communication Review (ACM) V. 26 N. 3, July 1996