CS6320 Systems Networking and intro to L Grewe Performance 1 Systems and Issues Common ingredients of the Web review URL HTML and HTTP HTTP the protocol and its stateless property Web Systems Components review Clients Servers DNS Domain Name System Interaction with underlying network protocol TCP Scalability and performance enhancement Server farms Web Proxy Content Distribution Network CDN 2 Web History Before the 1970s 1980s Internet used mainly by researchers and academics Log in remote machines transfer files exchange e mail Internet growth and commercialization 1988 ARPANET gradually replaced by the NSFNET Early 1990s NSFNET begins to allow commercial traffic Initial proposal for the Web by Berners Lee in 1989 Enablers for the success of the Web 1980s Home computers with graphical user interfaces 1990s Power of PCs increases and cost decreases 3 Common ingredients of the Web URL Denotes the global unique location of the web resource Formatted string e g http www princeton edu index html Protocol for communicating with server e g http Name of the server e g www princeton edu Name of the resource e g index html HTML Actual content of web resource represented in ASCII 4 Common ingredients of the Web HTML HyperText Markup Language HTML Format text reference images embed hyperlinks Representation of hypertext documents in ASCII format Interpreted by Web browsers when rendering a page Web page Base HTML file referenced objects e g images Each object has its own URL Straight forward and easy to learn Simplest HTML document is a plain text file Automatically generated by authoring programs 5 Main ingredients of the Web Client programHTTP Server program E g Web browser Running on end host Requests service E g Web server Provides service GET index html Site under construction 6 Web Content Distribution Main ingredients of the Web URL HTML and HTTP HTTP the protocol and its stateless property Web Systems Components Clients Servers DNS Domain Name System Interaction with underlying network protocol TCP Scalability and performance enhancement Server farms Web Proxy Content Distribution Network CDN 7 HTTP Example Request and Response Message GET courses archive spring06 cos461 HTTP 1 1 Host www cs princeton edu User Agent Mozilla 4 03 CRLF Request HTTP 1 1 200 OK Date Mon 6 Feb 2006 13 09 03 GMT Server Netscape Enterprise 3 5 1 Last Modified Mon 6 Feb 2006 11 12 23 GMT ResponseContent Length 21 CRLF Site under construction 8 HTTP Request Message Request message sent by a client Request line method resource and protocol version Request headers provide information or request Body optional data e g to POST data to the server request line GET POST HEAD commands header lines Carriage return line feed indicates end of message GET somedir page html HTTP 1 1 Host www someschool edu User agent Mozilla 4 0 Connection close Accept language fr extra carriage return line feed 9 HTTP Response Message Response message sent by a server Status line protocol version status code status phrase Response headers provide information Body optional data status line protocol status code status phrase header lines data e g requested HTML file HTTP 1 1 200 OK Connection close 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 10 HTTP Request Methods and Response Codes Request methods include GET return current value of resource HEAD return the meta data associated with a resource POST update a resource provide input to a program Etc Response code classes 1xx informational e g 100 Continue 2xx success e g 200 OK 3xx redirection e g 304 Not Modified 4xx client error e g 404 Not Found 5xx server error e g 503 Service Unavailable 11 HTTP is a Stateless Protocol Stateless Each request response exchange treated independently Clients and servers not required to retain state Statelessness to improve scalability Avoids need for the server to retain info across requests Enables the server to handle a higher rate of requests 12 Web Content Distribution Main ingredients of the Web URL HTML and HTTP HTTP the protocol and its stateless property Web Systems Components Clients Servers DNS Domain Name System Interaction with underlying network protocol TCP Scalability and performance enhancement Server farms Web Proxy Content Distribution Network CDN 13 Web Systems Components Clients Send requests and receive responses Browsers spiders and agents Servers Receive requests and send responses Store or generate the responses DNS Domain Name System Distributed network infrastructure Transforms site name IP address Direct clients to servers 14 Web Browser Generating HTTP requests User types URL clicks a hyperlink or selects bookmark User clicks reload or submit on a Web page Automatic downloading of embedded images Layout of response Parsing HTML and rendering the Web page Invoking helper applications e g Acrobat PowerPoint Maintaining a cache Storing recently viewed objects Checking that cached objects are fresh 15 Web Transaction User clicks on a hyperlink http www cnn com index html Browser learns the IP address of the server Invokes gethostbyname www cnn com And gets a return value of 64 236 16 20 Browser establishes a TCP connection Selects an ephemeral port for its end of the connection Contacts 64 236 16 20 on port 80 Browser sends the HTTP request GET index html HTTP 1 1 Host www cnn com 16 Web Transaction Continued Browser parses the HTTP response message Extract the URL for each embedded image Create new TCP connections and send new requests Render the Web page including the images Opportunities for caching in the browser HTML file Each embedded image IP address of the Web site 17 Web Systems Components Clients Send requests and receive responses Browsers spiders and agents Servers Receive requests and send responses Store or generate the responses DNS Domain Name System Distributed network infrastructure Transforms site name IP address Direct clients to servers 18 Web Server Web site vs Web server Web site collections of Web pages associated with a particular host name Web server program that satisfies client requests for Web resources Handling a client request Accept the TCP connection Read and parse the HTTP request message Translate the URL to a filename Determine whether the request is authorized Generate and transmit the response 19 Web Server Generating a Response Returning a file URL corresponds to a file e g www
View Full Document
Unlocking...