DOC PREVIEW
CMU CS 15441 - Lecture- Applications and Application Requirements

This preview shows page 1-2-19-20 out of 20 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Page 1Peter A. Steenkiste, SCS, CMU1Lecture 3Applications andApplication RequirementsPeter SteenkisteSchool of Computer ScienceCarnegie Mellon University15-441 Networking, Spring 2004http://www.cs.cmu.edu/~prs/15-441Peter A. Steenkiste, SCS, CMU2Lecture Overviewz Application examples.» ftp» httpzApplication requirements.» “ilities”» SharingzInternet architecture discussion.Page 2Peter A. Steenkiste, SCS, CMU3Ftp: The File Transfer Protocolz Transfer file to/from remote hostz Client/server model» Client: side that initiates transfer (either to/from remote)» Server: remote hostz ftp: RFC 959z ftp server: port 21file transferFTPserverFTPuserinterfaceFTPclientlocal filesystemremote filesystemuser at hostPeter A. Steenkiste, SCS, CMU4Ftp: Separate Control, Data Connectionsz Ftp client contacts ftp server at port 21, specifying TCP as transport protocolz Two parallel TCP connections opened:» Control: exchange commands, responses between client, server.“out of band control”» Data: file data to/from serverz Ftp server maintains “state”: current directory, earlier authenticationFTPclientFTPserverTCP control connectionport 21TCP data connectionport 20Page 3Peter A. Steenkiste, SCS, CMU5Ftp Commands, ResponsesSample Commands:z sent as ASCII text over control channelz USER usernamez PASS passwordz LIST return list of files in current directoryz RETR filename retrieves (gets) filez STOR filename stores (puts) file onto remote hostSample Return Codesz status code and phrasez 331 Username OK, password requiredz 125 data connection already open; transfer startingz 425 Can’t open data connectionz 452 Error writing filePeter A. Steenkiste, SCS, CMU6HTTP Basicsz HTTP layered over bidirectional byte stream» Almost always TCPz Interaction» Client sends request to server, followed by response from server to client» Requests/responses are encoded in textz Stateless» Server maintains no information about past client requestsPage 4Peter A. Steenkiste, SCS, CMU7How to Mark End of Message?z Size of message Æ Content-Length» Must know size of transfer in advancez Delimiter Æ MIME style Content-Type» Server must “escape” delimiter in contentz Close connection» Only server can do thisPeter A. Steenkiste, SCS, CMU8HTTP RequestPage 5Peter A. Steenkiste, SCS, CMU9HTTP Requestz Request line» Method– GET – return URI– HEAD – return headers only of GET response– POST – send data to the server (forms, etc.)» URI– E.g. http://www.intel-iris.net/index.htmlwith a proxy– E.g. /index.html if no proxy» HTTP versionPeter A. Steenkiste, SCS, CMU10HTTP Requestz Request headers» Authorization – authentication info» Acceptable document types/encodings» From – user email» If-Modified-Since» Referrer – what caused this page to be requested» User-Agent – client softwarez Blank-linez BodyPage 6Peter A. Steenkiste, SCS, CMU11HTTP Request ExampleGET / HTTP/1.1Accept: */*Accept-Language: en-usAccept-Encoding: gzip, deflateUser-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)Host: www.intel-iris.netConnection: Keep-AlivePeter A. Steenkiste, SCS, CMU12HTTP Responsez Status-line» HTTP version» 3 digit response code– 1XX – informational– 2XX – successz 200 OK– 3XX – redirectionz 301 Moved Permanentlyz 303 Moved Temporarilyz 304 Not Modified– 4XX – client errorz 404 Not Found– 5XX – server errorz 505 HTTP Version Not Supported» Reason phrasePage 7Peter A. Steenkiste, SCS, CMU13HTTP Responsez Headers» Location – for redirection» Server – 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-Modifiedz Blank-linez BodyPeter A. Steenkiste, SCS, CMU14HTTP Response ExampleHTTP/1.1 200 OKDate: Tue, 27 Mar 2001 03:49:38 GMTServer: 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.24Last-Modified: Mon, 29 Jan 2001 17:54:18 GMTETag: "7a11f-10ed-3a75ae4a"Accept-Ranges: bytesContent-Length: 4333Keep-Alive: timeout=15, max=100Connection: Keep-AliveContent-Type: text/html…..Page 8Peter A. Steenkiste, SCS, CMU15Cookies: Keeping “state”Many major Web sites use cookiesFour components:1) Cookie header line in the HTTP response message2) Cookie header line in HTTP request message3) Cookie file kept on user’s host and managed by user’s browser4) Back-end database at Web siteExample:» Susan accesses Internet always from same PC» She visits a specific e-commerce site for the first time» When initial HTTP requests arrives at site, site creates a unique ID and creates an entry in backend database for IDPeter A. Steenkiste, SCS, CMU16Cookies: Keeping “State” (Cont.)clientAmazon serverusual http request msgusual http response +Set-cookie: 1678 usual http request msgcookie: 1678usual http response msgusual http request msgcookie: 1678usual http response msgcookie-specificactioncookie-specificactionservercreates ID1678 for userentry in backend databaseaccessaccessCookie fileamazon: 1678ebay: 8734Cookie fileebay: 8734Cookie fileamazon: 1678ebay: 8734one week later:Page 9Peter A. Steenkiste, SCS, CMU17Typical Workload (Web Pages)z Multiple (typically small) objects per page z File sizes» Why different than request sizes?» Also heavy-tailed– Pareto distribution for tail– Lognormal for body of distributionz Embedded references» Number of embedded objects = pareto – p(x) = akax-(a+1)Peter A. Steenkiste, SCS, CMU18HTTP 0.9/1.0z One request/response per TCP connection» Simple to implementz Disadvantages» Multiple connection setups Æ three-way handshake each time– Several extra round trips added to transfer» Multiple slow startsPage 10Peter A. Steenkiste, SCS, CMU19Single Transfer ExampleClientServerSYNSYNSYNSYNACKACKACKACKACKDATDATDATDATFINACK0 RTT1 RTT2 RTT3 RTT4 RTTServer reads from diskFINServer reads from diskClient opens TCP connectionClient sends HTTP request for HTMLClient parses HTMLClient opens TCP connectionClient sends HTTP request for imageImage begins to arrivePeter A. Steenkiste, SCS, CMU20Performance Issuesz Short transfers are hard on TCP» Stuck in slow start» Loss recovery is poor when windows are smallzLots of extra connections» Increases server state/processingzServer 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,


View Full Document

CMU CS 15441 - Lecture- Applications and Application Requirements

Documents in this Course
lecture

lecture

34 pages

lecture

lecture

38 pages

lecture

lecture

18 pages

lecture

lecture

28 pages

lecture

lecture

11 pages

Lecture

Lecture

64 pages

lecture

lecture

10 pages

lecture

lecture

19 pages

Lecture 6

Lecture 6

43 pages

Exam

Exam

14 pages

lecture

lecture

38 pages

Debugging

Debugging

23 pages

lecture

lecture

60 pages

review

review

27 pages

lecture

lecture

12 pages

The Web

The Web

28 pages

Lecture

Lecture

40 pages

lecture

lecture

42 pages

lecture

lecture

9 pages

lecture

lecture

10 pages

lecture

lecture

49 pages

lecture

lecture

26 pages

Project

Project

5 pages

lecture

lecture

40 pages

lecture

lecture

9 pages

lecture

lecture

41 pages

lecture

lecture

32 pages

lecture

lecture

36 pages

lecture

lecture

34 pages

lecture

lecture

45 pages

lecture

lecture

26 pages

lecture

lecture

6 pages

lecture

lecture

51 pages

Project

Project

16 pages

lecture

lecture

44 pages

lecture

lecture

13 pages

lecture

lecture

42 pages

lecture

lecture

36 pages

Project

Project

13 pages

Project

Project

33 pages

lecture

lecture

43 pages

lecture

lecture

49 pages

Load more
Download Lecture- Applications and Application Requirements
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture- Applications and Application Requirements and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture- Applications and Application Requirements 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?