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



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

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

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

Network Technologies

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

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?

TCP/IP Networking An Example

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

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:

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

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

Internet Technologies Internet Protocols and Services

By Bardia, Patit, and Rozheh

HTTP Protocol. Bartosz Walter

World Wide Web. Before WWW

The Hyper-Text Transfer Protocol (HTTP)

Hypertext for Hyper Techs

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

Alteon Browser-Smart Load Balancing

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

1945: 1989: ! Tim Berners-Lee (CERN) writes internal proposal to develop a. 1990:! Tim BL writes a graphical browser for Next machines.

HTTP Caching & Cache-Busting for Content Publishers

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

HTTP Authentication. RFC 2617 obsoletes RFC 2069

Chapter 27 Hypertext Transfer Protocol

GET /FB/index.html HTTP/1.1 Host: lmi32.cnam.fr

Communications Software. CSE 123b. CSE 123b. Spring Lecture 13: Load Balancing/Content Distribution. Networks (plus some other applications)

CloudOYE CDN USER MANUAL

First Midterm for ECE374 03/09/12 Solution!!

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

Application Layer: HTTP and the Web. Srinidhi Varadarajan

N-tier ColdFusion scalability. N-tier ColdFusion scalability WebManiacs 2008 Jochem van Dieten

sessionx Desarrollo de Aplicaciones en Red Web Applications History (1) Content History (2) History (3)

Layer 7 Load Balancing and Content Customization

HOST EUROPE CLOUD STORAGE REST API DEVELOPER REFERENCE

Data Communication I

HTTP Fingerprinting and Advanced Assessment Techniques

PeopleSoft Online Performance Guidelines

DATA COMMUNICATOIN NETWORKING

Information Extraction Art of Testing Network Peripheral Devices

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

CONTENT of this CHAPTER

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

First Midterm for ECE374 02/25/15 Solution!!

Key Components of WAN Optimization Controller Functionality

Web Services April 21st, 2009 with Hunter Pitelka

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Web Caching and CDNs. Aditya Akella

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

Cyber Security Workshop Ethical Web Hacking

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

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

Computer Networks Homework 1

HTTP/2: Operable and Performant. Mark

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

Web Security: SSL/TLS

Front-End Performance Testing and Optimization

Security-Assessment.com White Paper Leveraging XSRF with Apache Web Server Compatibility with older browser feature and Java Applet

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

Ethical Hacking as a Professional Penetration Testing Technique

Web Browsing Examples. How Web Browsing and HTTP Works

Research of Web Real-Time Communication Based on Web Socket

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

Lektion 2: Web als Graph / Web als System

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

CSE 123b Communications Software

Performance of PEPs in Cellular Wireless Networks

Introduction to ServerIron ADX Application Switching and Load Balancing. Module 6: Content Switching (CSW) Revision 0310

Using TestLogServer for Web Security Troubleshooting

Computer Networking LAB 2 HTTP

Speed up your web site. Alan Seiden Consulting alanseiden.com

Securing SharePoint Server with Windows Azure Multi- Factor Authentication

Securing the Apache Web Server

ATS Test Documentation

Modern Web Development From Angle Brackets to Web Sockets

Load Balancing and Sessions. C. Kopparapu, Load Balancing Servers, Firewalls and Caches. Wiley, 2002.

Load Balancing Web Applications

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Domain Name System WWW. Application Layer. Mahalingam Ramkumar Mississippi State University, MS. September 15, 2014.

79 Tips and Tricks for Magento Performance Improvement. for Magento Performance Improvement

The HTTP protocol (HyperText Transfer Protocol) Short history of HTTP. The HTTP 1.0 protocol. 07/07/2011(dec'09)

Using Steelhead Appliances and Stingray Aptimizer to Accelerate Microsoft SharePoint WHITE PAPER

Playing with Web Application Firewalls

Training Course on Network Administration

Streaming Stored Audio & Video

Application layer Web 2.0

Mobile Communications Chapter 9: Mobile Transport Layer

Using etoken for SSL Web Authentication. SSL V3.0 Overview

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

Security Testing is performed to reveal security flaws in the system in order to protect data and maintain functionality.

1 Introduction: Network Applications

Privacy. Computer Security. Triangulation. What is Private Information?

Varnish Tips & Tricks, 2015 edition

HTTP Response Splitting

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

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

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Understanding Slow Start

Vodia PBX RESTful API (v2.0)

Nginx 1 Web Server Implementation

Transcription:

CSE 123b Communications Software Spring 2002 Lecture 11: HTTP Stefan Savage Project #2 On the Web page in the next 2 hours Due in two weeks Project reliable transport protocol on top of routing protocol assignment New fishhead option (packet loss probability) You will turnin assignment using your assignment Some slides courtesy Srini Seshan May 16, 2002 CSE 123b Lecture 11 -- DNS 2 HTTP Basics HTTP layered over TCP Interaction Client sends request to server, followed by response from server to client Requests/responses are encoded in text How to mark end of message? Size of message Content-Length» Must know size of transfer in advance Delimiter MIME style Content-Type» must byte-stuff Close connection» Only server can do this May 16, 2002 CSE 123b Lecture 11 -- DNS 3 HTTP Messages Four parts START LINE <CRLF>» Request or response MESSAGE HEADER <CRLF> <CRLF>» 0 or more of these; meta data MESSAGE BODY <CRLF>» Actual content May 16, 2002 CSE 123b Lecture 11 -- DNS 4 HTTP Request Request line Method» GET return URL» HEAD return headers only of GET response» POST send data to the server (forms, etc.) URL» E.g. http://www.cs.ucsd.edu/index.html» index.html by default HTTP version Example GET http:www.cs.ucsd.edu/index.html HTTP/1.1 HTTP Request Request headers Authorization authentication info Acceptable document types/encodings From user email If-Modified-Since Host Referrer what caused this page to be requested User-Agent client software May 16, 2002 CSE 123b Lecture 11 -- DNS 5 May 16, 2002 CSE 123b Lecture 11 -- DNS 6

May 16, 2002 CSE 123b Lecture 11 -- DNS 7 HTTP Request Example GET / HTTP/1.1 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Host: www.cs.ucsd.edu HTTP Response Status-line (response) HTTP version 3 digit response code» 1XX informational» 2XX success» 3XX redirection» 4XX client error» 5XX server error Reason phrase May 16, 2002 CSE 123b Lecture 11 -- DNS 8 HTTP Response Headers Location for redirection server software WWW-Authenticate request for authentication Allow list of methods supported (get, head, etc) Content-Encoding E.g x-gzip Content-Length Content-Type Expires Last-Modified May 16, 2002 CSE 123b Lecture 11 -- DNS 9 HTTP Response Example HTTP/1.1 200 OK Date: Tue, 27 Mar 2001 03:49:38 GMT : Apache/1.3.14 (Unix) (Red-Hat/Linux) mod_ssl/2.7.1 OpenSSL/0.9.5a DAV/1.0.2 PHP/4.0.1pl2 mod_perl/1.24 Last-Modified: Mon, 29 Jan 2001 17:54:18 GMT ETag: "7a11f-10ed-3a75ae4a" Accept-Ranges: bytes Content-Length: 4333 Keep-Alive: timeout=15, max=100 Content-Type: text/html.. May 16, 2002 CSE 123b Lecture 11 -- DNS 10 How HTTP is used The Way Web Surfing Works... Browser requests main page Browser parses main page for inline images and content (e.g. <imgsrc=http://k.com/pics/bullet>) Typically 4-5 of these Issues additional requests to server (or other server) for additional data items Browser computes location of objects on page (layout) Browser draws each object on the screen (rendering) If user clicks on a link (href) then restart process May 16, 2002 CSE 123b Lecture 11 -- DNS 11 Check cache DNS lookup Request object Layout Browser TCP connection Render / A A? www.cnn.com A= 207.25.71.20 GET DNS HTTP May 16, 2002 CSE 123b Lecture 11 -- DNS 12

May 16, 2002 CSE 123b Lecture 11 -- DNS 13 Single Transfer Example Problems 0 RTT Client opens TCP connection 1 RTT Client sends HTTP request for HTML 2 RTT Client parses HTML Client opens TCP connection 3 RTT Client sends HTTP request for image 4 RTT Image begins to arrive Client FIN reads from disk FIN reads from disk Short transfers are hard on TCP Stuck in slow start Loss recovery is poor when windows are small. Why? Lots of extra connections Increases server state/processing also forced to keep TIME_WAIT connection state Why must server keep these? Tends to be an order of magnitude greater than # of active connections May 16, 2002 CSE 123b Lecture 11 -- DNS 14 Netscape Solution Use multiple concurrent connections to improve response time Different parts of Web page arrive independently Can grab more of the network bandwidth than other users Doesn t necessarily improve response time TCP loss recovery can be timeout dominated because windows are small HTTP 0.9/1.0 One request/response per TCP connection Simple to implement Disadvantages Multiple connection setups three-way handshake each time» Several extra round trips added to transfer Multiple slow starts May 16, 2002 CSE 123b Lecture 11 -- DNS 15 May 16, 2002 CSE 123b Lecture 11 -- DNS 16 Persistent Connection Solution Persistent Connection Example Multiplex multiple transfers onto one TCP connection Serialize transfers client makes next request only after previous response How to demultiplex requests/responses Content-length and delimiter Block-based transmission send in multiple length delimited blocks Store-and-forward wait for entire response and then use content-length 0 RTT Client sends HTTP request for HTML 1 RTT Client parses HTML Client sends HTTP request for image 2 RTT Image begins to arrive Client reads from disk reads from disk May 16, 2002 CSE 123b Lecture 11 -- DNS 17 May 16, 2002 CSE 123b Lecture 11 -- DNS 18

May 16, 2002 CSE 123b Lecture 11 -- DNS 19 Persistent connection Solution However, serialized requests do not improve interactive response Pipelining requests Getall request HTML document and all embeds» Requires server to parse HTML files» Doesn t consider client cached documents Getlist request a set of documents» Implemented as a simple set of GETs Persistent Connection Performance Benefits greatest for small objects Up to 2x improvement in response time resource utilization reduce due to fewer connection establishments and fewer active connections TCP behavior improved Longer connections help adaptation to available bandwidth Larger congestion window improves loss recovery How long to keep connection open? May 16, 2002 CSE 123b Lecture 11 -- DNS 20 Remaining Problems Application specific solution Stall in transfer of one object prevents delivery of others Serialized transmission Much of the useful information in first few bytes Can packetize transfer over TCP» HTTP 1.1 recommends using range requests» MUX protocol provides similar generic solution Other solution: solve the problem at the transport layer Fix TCP so it works well with multiple simultaneous connections TCP modifications for HTTP Key idea: Have different connections share congestion window information Only do slow start once, recover from congestion losses together Tricky issues How aggressive should it be vs using multiple connections What is the difference between» One packet lost among four separate small TCP connections» One packet lost in one larger TCP connection May 16, 2002 CSE 123b Lecture 11 -- DNS 21 May 16, 2002 CSE 123b Lecture 11 -- DNS 22 Typical Workload Multiple (typically small) objects per page Object sizes vary significantly One measurement 1946 byte median, 13767 byte mean Why so different? Heavy-tailed distribution (Pareto) Also true for number of embedded objects Popularity Also heavy-tailed (Zipf) Small number of very popular objects; increasingly large number of less popular objects Bursty interarrival pattern May 16, 2002 CSE 123b Lecture 11 -- DNS 23 HTTP Caching Clients often cache documents Challenge: update of documents If-Modified-Since requests to check» HTTP 0.9/1.0 used just date» HTTP 1.1 has file signature as well When/how often should the original be checked for changes? Check every time? each session? Day? Etc? Use Expires header» If no Expires, often use Last-Modified as estimate May 16, 2002 CSE 123b Lecture 11 -- DNS 24

May 16, 2002 CSE 123b Lecture 11 -- DNS 25 Example Cache Check Request GET / HTTP/1.1 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate If-Modified-Since: Mon, 29 Jan 2001 17:54:18 GMT If-None-Match: "7a11f-10ed-3a75ae4a" User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Host: www.cs.ucsd.edu Example Cache Check Response HTTP/1.1 304 Not Modified Date: Tue, 27 Mar 2001 03:50:51 GMT : Apache/1.3.14 (Unix) (Red-Hat/Linux) mod_ssl/2.7.1 OpenSSL/0.9.5a DAV/1.0.2 PHP/4.0.1pl2 mod_perl/1.24 Keep-Alive: timeout=15, max=100 ETag: "7a11f-10ed-3a75ae4a" May 16, 2002 CSE 123b Lecture 11 -- DNS 26 Web caching in general Caching in client Keep unchanging portion of a page Caching in server Keep popular content in memory so disk access not needed Caching in proxy Between client and server Responsible for sharing content between all users of proxy Example: once one person at UCSD downloads CNN page, then everyone else can simply fetch it from proxy cache Hit rates ~ 50% So what makes the Web slow? Client delay (parsing, layout, rendering) delay (page generation) DNS Lookup/loss (local, domain, root lookup, loss) Propagation delay (client to server, RTT/MSS) Queuing delay (sum per message + impact of variability) Connection setup & failure (server load, client timeout) Congestion + TCP congestion response (1/sqrt(p)) Impact of fragmentation/packet size (RTT/MSS) Receiver buffering (flow control) Sender buffering (sender resource allocation) Application serialization (waiting for gif?) Will the real culprit please stand up? May 16, 2002 CSE 123b Lecture 11 -- DNS 27 May 16, 2002 CSE 123b Lecture 11 -- DNS 28 Answer is still unclear Browser delay (layout/rendering) can be significant for some host/browser combinations For highly loaded servers, server delay is an important component For high capacity networks, slow start is the limiting factor For networks with loss TCP congestion control can be the limiter For pages with many objects, the # of connections can be a factor Best case TCP transfer time TCP Slow start time B RTT log 1. 5 + 1 2W MSS RTT: B: W: MSS: round-trip time bytes to be transferred initial window bytes in a packet May 16, 2002 CSE 123b Lecture 11 -- DNS 29 May 16, 2002 CSE 123b Lecture 11 -- DNS 30

May 16, 2002 CSE 123b Lecture 11 -- DNS 31 Impact of Congestion control Very simple model for steady state TCP transfer time B p RTT MSS RTT: B: MSS: p: round-trip time bytes to be transferred bytes in a packet packet loss rate The models get more complicated Limited receiver windows, timeouts, loss patterns, when first loss occurs, etc... Summary HTTP built on top of TCP Request response Negotiates capabilities Connection per request is a limitation Persistent connections Pipelining, MUX Web caching Check timestamp on cached copy against host/proxy Caching at all levels Web is still slow May 16, 2002 CSE 123b Lecture 11 -- DNS 32