with UDP and TCP
Application Layer 2-18 Web and HTTP First, a review… web page consists of objects object can be HTML file, JPEG image, Java applet, audio file,… web page consists of base HTML-file which includes several referenced objects each object is addressable by a URL, e.g., host name path name
Application Layer 2-19 HTTP overview HTTP: hypertext transfer protocol Web ’ s application layer protocol client/server model • client : browser that requests, receives, (using HTTP protocol) and “ displays ” Web objects • server: Web server sends (using HTTP protocol) objects in response to requests PC running Firefox browser server running Apache Web server iPhone running Safari browser
Application Layer 2-20 HTTP overview (continued) uses TCP: client initiates TCP connection (creates socket) to server, port 80 server accepts TCP connection from client HTTP messages (application-layer 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 aside
Application Layer 2-21 HTTP connections non-persistent HTTP at most one object sent over TCP connection • connection then closed downloading multiple objects required multiple connections persistent HTTP multiple objects can be sent over single TCP connection between client, server
Application Layer 2-22 Non-persistent HTTP suppose user enters URL: 1a . HTTP client initiates TCP connection to HTTP server (process) at on port 80 2 . HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.index 1b . HTTP server at host waiting for TCP connection at port 80. “ accepts ” connection, notifying client 3 . HTTP server receives request message, forms response message containing requested object, and sends message into its socket time (contains text, references to 10 jpeg images)
Application Layer 2-23 Non-persistent HTTP (cont.) 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. time
Application Layer 2-25 Persistent HTTP non-persistent HTTP issues: requires 2 RTTs per object OS overhead for each TCP connection
You've reached the end of your free preview.
Want to read all 102 pages?
- Fall '17
- Domain Name System