CSE 679 HTTP and RTP r HTTP r

  • Slides: 19
Download presentation
CSE 679: HTTP and RTP r HTTP r RTP r Web traffic

CSE 679: HTTP and RTP r HTTP r RTP r Web traffic

The Web r Web page: m m consists of “objects” addressed by a URL

The Web r Web page: m m consists of “objects” addressed by a URL r Most Web pages consist of: m m base HTML page, and several referenced objects. r URL has two components: host name and path name: r User agent for Web is called a browser: m m MS Internet Explorer Netscape Communicator r Server for Web is called Web server: m m Apache (public domain) MS Internet Information Server

The Web: the HTTP Protocol http: hypertext transfer protocol r Web’s application layer protocol

The Web: the HTTP Protocol http: hypertext transfer protocol r Web’s application layer protocol r client/server model m client: browser that requests, receives, “displays” Web objects m server: Web server sends objects in response to requests r http 1. 0: RFC 1945 r http 1. 1: RFC 2068 htt PC running Explorer htt pr pr est esp ons e t es u q re tp ht Mac running Navigator equ se n po s re Server running NCSA Web server

The HTTP Protocol (more) http: TCP transport service: r client initiates TCP connection (creates

The HTTP Protocol (more) http: TCP transport service: r client initiates TCP connection (creates socket) to server, port 80 r server accepts TCP connection from client r http messages (applicationlayer protocol messages) exchanged between browser (http client) and Web server (http server) r TCP connection closed http is “stateless” r server maintains no information about past client requests aside Protocols that maintain “state” are complex! r past history (state) must be maintained r if server/client crashes, their views of “state” may be inconsistent, must be reconciled

HTTP Example Suppose user enters URL www. some. School. edu/some. Department/home. index 1 a.

HTTP Example Suppose user enters URL www. some. School. edu/some. Department/home. index 1 a. http client initiates TCP connection to http server (process) at www. some. School. edu. Port 80 is default for http server. (contains text, references to 10 jpeg images) 1 b. http server at host www. some. School. edu waiting for TCP connection at port 80. “accepts” connection, notifying client 2. http client sends http request message (containing URL) into TCP connection socket 3. http server receives request message, forms response message containing requested object (some. Department/home. index), sends message into socket time

http example (cont. ) 5. http client receives response message containing html file, displays

http example (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 time jpeg objects 4. http server closes TCP connection.

Non-persistent and persistent connections Non-persistent r HTTP/1. 0 r server parses request, responds, and

Non-persistent and persistent connections Non-persistent r HTTP/1. 0 r server parses request, responds, and closes TCP connection r 2 RTTs to fetch each object r Each object transfer suffers from slow start But most 1. 0 browsers use parallel TCP connections. Persistent r default for HTTP/1. 1 r on same TCP connection: server, parses request, responds, parses new request, . . r Client sends requests for all referenced objects as soon as it receives base HTML. r Fewer RTTs and less slow start.

http message format: request r two types of http messages: request, response r http

http message format: request r two types of http messages: request, response r http request message: m ASCII (human-readable format) request line (GET, POST, HEAD commands) GET /somedir/page. html HTTP/1. 0 User-agent: Mozilla/4. 0 Accept: text/html, image/gif, image/jpeg header Accept-language: fr lines Carriage return, line feed indicates end of message (extra carriage return, line feed)

http request message: general format

http request message: general format

http message format: response status line (protocol status code status phrase) header lines data,

http message format: response status line (protocol status code status phrase) header lines data, e. g. , requested html file 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. . .

http response status codes In first line in server->client response message. A few sample

http response status codes In first line in server->client response message. A few sample codes: 200 OK m request succeeded, requested object later in this message 301 Moved Permanently m requested object moved, new location specified later in this message (Location: ) 400 Bad Request m request message not understood by server 404 Not Found m 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:

Trying out http (client side) for yourself 1. Telnet to your favorite Web server: telnet www. eurecom. fr 80 Opens TCP connection to port 80 (default http server port) at www. eurecom. fr. Anything typed in sent to port 80 at www. eurecom. fr 2. Type in a GET http request: GET /~ross/index. html HTTP/1. 0 By typing this in (hit carriage return twice), you send this minimal (but complete) GET request to http server 3. Look at response message sent by http server!

Using a Streaming Server r This gets us around HTTP, allows a choice of

Using a Streaming Server r This gets us around HTTP, allows a choice of UDP vs. TCP and the application layer protocol can be better tailored to Streaming; many enhancements options are possible (see next slide)

Real-Time Protocol (RTP) r Provides standard packet format for real-time r r application Typically

Real-Time Protocol (RTP) r Provides standard packet format for real-time r r application Typically runs over UDP Specifies header fields below Payload Type: 7 bits, providing 128 possible different types of encoding; eg PCM, MPEG 2 video, etc. Sequence Number: 16 bits; used to detect packet loss

Real-Time Protocol (RTP) r Timestamp: 32 bytes; gives the sampling instant of the first

Real-Time Protocol (RTP) r Timestamp: 32 bytes; gives the sampling instant of the first audio/video byte in the packet; used to remove jitter introduced by the network r Synchronization Source identifier (SSRC): 32 bits; an id for the source of a stream; assigned randomly by the source

Web Caches (proxy server) Goal: satisfy client request without involving origin server r user

Web Caches (proxy server) Goal: satisfy client request without involving origin server r user sets browser: Web accesses via web cache r client sends all http Proxy requests to web cache htt pr server eq m m 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 http res p ues t ons e t es u eq r nse tp o t p h es r tp ht client origin server t es u eq r se p n t o p ht es r tp ht htt pr equ htt est pr esp ons e origin server

Why Web Caching? Assume: cache is “close” to client (e. g. , in same

Why Web Caching? Assume: cache is “close” to client (e. g. , in same network) r smaller response time: cache “closer” to client r decrease traffic to distant servers m link out of institutional/local ISP network often bottleneck r Is there any new problem origin servers public Internet 1. 5 Mbps access link institutional network 10 Mbps LAN introduced by caching? institutional cache

The Web Traffic r The features of the web traffic m Shorter alive time

The Web Traffic r The features of the web traffic m Shorter alive time m Bursty m Concentrate on some sites r The challenges on TCP m Slow start m Small flows

Conclusion r HTTP protocol m Request/response format m Security m Caching r RTP r

Conclusion r HTTP protocol m Request/response format m Security m Caching r RTP r The web traffic m Special features m Challenges on TCP