HTTP and TCP A Review Carey Williamson i
- Slides: 8
HTTP and TCP: A Review Carey Williamson i. CORE Chair and Professor Department of Computer Science University of Calgary CPSC 641 Winter 2011
Network View: HTTP and TCP • TCP is a connection-oriented protocol SYN/ACK GET URL Web Client ACK YOUR DATA HERE FIN ACK Web Server FIN/ACK CPSC 641 Winter 2011 Copyright © 2005 Department of Computer Science 2
Example Web Page Harry Potter Movies page. html As you all know, the new HP book will be out in June and then there will be a new movie shortly after that… hpface. jpg castle. gif “Harry Potter and the Bathtub Ring” CPSC 641 Winter 2011 Copyright © 2005 Department of Computer Science 3
Server Client TCP SYN G page. html The “classic” approach in HTTP/1. 0 is to use one HTTP request per TCP connection, serially. TCP FIN TCP SYN G hpface. jpg TCP FIN TCP SYN G TCP FIN castle. gif CPSC 641 Winter 2011 Copyright © 2005 Department of Computer Science 4
Server Client TCP SYN G TCP FIN page. html Concurrent (parallel) TCP connections can be used to make things faster. C S S C S G hpface. jpg F F CPSC 641 castle. gif Winter 2011 Copyright © 2005 Department of Computer Science 5
Server Client TCP SYN G page. html The “persistent HTTP” approach can re-use the same TCP connection for Multiple HTTP transfers, one after another, serially. Amortizes TCP overhead, but maintains TCP state longer at server. G hpface. jpg G castle. gif Timeout TCP FIN CPSC 641 Winter 2011 Copyright © 2005 Department of Computer Science 6
Server Client TCP SYN G page. html The “pipelining” feature in HTTP/1. 1 allows requests to be issued asynchronously on a persistent connection. Requests must be processed in proper order. Can do clever packaging. GG hpface. jpg castle. gif Timeout TCP FIN CPSC 641 Winter 2011 Copyright © 2005 Department of Computer Science 7
Summary of Web and HTTP • The major application on the Internet – Majority of traffic is HTTP (or HTTP-related) • Client/server model: – Clients make requests, servers respond to them – Done mostly in ASCII text (helps debugging!) • Various headers and commands – Too many to go into detail here – Many web books/tutorials exist (e. g. , Krishnamurthy & Rexford 2001) CPSC 641 Winter 2011 Copyright © 2005 Department of Computer Science 8