1 COMP 431 Internet Services & Protocols HTTP Persistence & Web Caching Jasleen Kaur February 11, 2016.

Slides:



Advertisements
Similar presentations
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Advertisements

HyperText Transfer Protocol (HTTP)
1 Caching in HTTP Representation and Management of Data on the Internet.
Application Layer-11 CSE401N: Computer Networks Lecture-4 Application Layer Overview HTTP.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 2: Application Layer
EEC-484/584 Computer Networks Discussion Session for HTTP and DNS Wenbing Zhao
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
Lecture 3: Application Layer1 מבוא לרשתות תקשורת : The Web and HTTP (chapter 2 – application) פרופ ' אמיר הרצברג Computer Networking: A Top Down Approach.
1 HTTP - Hypertext Transfer Protocol Arthur : Yigal Eliaspur Date :
9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Week 11: Application Layer1 Week 11: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
Web, HTTP and Web Caching
2: Application Layer1 Chapter 2: Application Layer Our goals: r conceptual, implementation aspects of network application protocols m transport-layer service.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
HTTP Performance Objective: In this problem, we consider the performance of HTTP, comparing non-persistent HTTP with persistent HTTP. Suppose the page.
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
2: Application Layer World Wide Web (WWW). Introduction 1-2 Internet protocol stack (recap) r application: supporting network applications m FTP,
Trying out HTTP (client side) for yourself
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Mail (smtp), VoIP (sip, rtp)
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP.
2: Application Layer1 Internet apps: their protocols and transport protocols Application remote terminal access Web file transfer streaming multimedia.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
CS 372 – introduction to computer networks* Wednesday June 30
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Introduction 1 Lecture 6 Application Layer (HTTP) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
2: Application Layer1 Web and HTTP First some jargon Web page consists of base HTML-file which includes several referenced objects Object can be HTML file,
2: Application Layer1 Chapter 2 Application Layer Part 2: Web & HTTP These slides derived from Computer Networking: A Top Down Approach, 6 th edition.
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
HTTP and Web Server HTTP HTTP is the protocol used by Web applications to exchange information. HTTP is a simple stateless request-response protocol.
2: Application Layer1 Chapter 2 outline r 2.1 Principles of app layer protocols r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail r 2.5 DNS r 2.6 Socket.
Hui Zhang, Fall Computer Networking Web, HTTP, Caching.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
1 Caching in HTTP Representation and Management of Data on the Internet.
Application Layer 2-1 Chapter 2 Application Layer 2.2 Web and HTTP.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
CSx760 Computer Networks1 HTTP. CSx760 Computer Networks2 The Web: Some Jargon r Web page: m consists of “objects” m addressed by a URL r Most Web pages.
© 2010 Computer Science Faculty, Kabul University HTTP CONTINUED… 4 TH LECTURE 2, May, 2010 Baseer Ahmad Baheer.
2: Application Layer 1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April.
Dr. Philip Cannata 1 The Web and HTTP. Dr. Philip Cannata 2 Application Layer 2-2 Chapter 2 Application Layer Computer Networking: A Top Down Approach.
Application Layer 2-1 Lecture 4: Web and HTTP. Web and HTTP First, a review… web page consists of objects object can be HTML file, JPEG image, Java applet,
Important r There will be NO CLASS on Friday 1/30/2015! r Please mark you calendars 1.
3: Application Protocols: HTTP
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Network Applications: Network App Programming: HTTP/1.1/2; High-performance Server Design Y. Richard Yang 2/15/2016.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Lecture 5 Internet Core: Protocol layers. Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP 
2: Application Layer 1 Chapter 2 Application Layer These ppt slides are originally from the Kurose and Ross’s book. But some slides are deleted and added.
Block 5: An application layer protocol: HTTP
Department of Computer Science University of Calgary
WWW and HTTP King Fahd University of Petroleum & Minerals
HTTP request message: general format
Web Caching? Web Caching:.
Department of Computer Science University of Calgary
Computer Communication & Networks
EEC-484/584 Computer Networks
CSE 461 HTTP and the Web.
EEC-484/584 Computer Networks
Presentation transcript:

1 COMP 431 Internet Services & Protocols HTTP Persistence & Web Caching Jasleen Kaur February 11, 2016

2 HTTP Protocol Design Non-persistent connections u The default browser/server behavior in HTTP/1.0 is for the connection to be closed after the completion of the request »Server parses request, responds, and closes TCP connection »The Connection: keep-alive header allows for persistent connections Web Server Browser TCP connection establishment u With non-persistent connections at least 2 RTTs are required to fetch every object »1 RTT for TCP handshake »1 RTT for request/response HTTP request HTTP response

3 Non-Persistent Connections Performance A B propagation transmission nodal processing queueing Web Server Browser TCP connection establishment HTTP request HTTP response u With non-persistent connections at least 2 RTTs are required to fetch every object »1 RTT for TCP handshake »1 RTT for request/response

4 Non-Persistent Connections Performance A B propagation transmission nodal processing queueing u Example: A 1 Kbyte base page with five 1.5 Kbyte embedded images coming from the West coast on an OC-48 link »1 RTT for TCP handshake = ms + 50 ms »1 RTT for request/response = ms + 50 ms u Page download time with non-persistent connections? u Page download time with a persistent connection?

5 Persistent Connections Persistent connections with pipelining u Connections are persistent and pipelined by default in HTTP 1.1 u Page download time with a persistent, pipelined connection?

6 Non-Persistent Connections Parallel connections u To improve performance a browser can issue multiple requests in parallel to a server (or servers) »Server parses request, responds, and closes TCP connection Web Server Browser TCP connection establishment HTTP request HTTP response Web Server TCP connection establishment HTTP request HTTP response u Page download time with parallel connections? »2 parallel connections = »4 parallel connections =

7 HTTP Protocol Design Persistent v. non-persistent connections u Non-persistent »HTTP/1.0 »Server parses request, responds, and closes TCP connection »At least 2 RTTs to fetch every object u Persistent »Default for HTTP/1.1 (negotiable in 1.0) »Client sends requests for multiple objects on one TCP connection »Server parses request, responds, parses next request, responds... »Fewer RTTs u Parallel v. persistent connections?

8 HTTP User-Server Interaction Browser caches Internet browser origin server miss origin server Browser with disk cache Internet hit u Browsers cache content from servers to avoid future server interactions to retrieve the same content

9 HTTP User-Server Interaction The conditional GET u If object in browser cache is “fresh,” the server won’t re-send it »Browsers save current date along with object in cache u Client specifies the date of cached copy in HTTP request If-modified-since: u Server’s response contains the object only if it has been changed since the cached date u Otherwise server returns: HTTP/ Not Modified HTTP request If-modified-since: HTTP response HTTP/ Not Modified object not modified HTTP request If-modified-since: HTTP response HTTP/ OK … object modified ClientServer

10 HTTP User-Server Interaction Cache Performance for HTTP Requests u What is the average time to retrieve a web object? »T mean = hit ratio x T cache + (1 – hit ratio) x T server where hit ratio is the fraction of objects found in the cache »Mean access time from a disk cache = »Mean access time from the origin server = u For a 60% hit ratio, the mean client access time is: »(0.6 x 10 ms) + (0.4 x 1,000 ms) = 406 ms Origin ServerBrowser with disk cache Cache Miss Cache Hit Network

11 Cache Performance for HTTP Requests What determines the hit ratio? u Cache size u Locality of references »How often the same web object is requested u How long objects remain “fresh” (unchanged) u Object references that can’t be cached at all »Dynamically generated content »Protected content »Content purchased for each use »Content that must always be up-to-date »Advertisements (“pay-per-click” issues)

12 Caching on the Web Web caches (Proxy servers) u Users configure browsers to send all requests through a shared proxy server »Proxy server is a large cache of web objects u Web caches are used to satisfy client requests without contacting the origin server HTTP request HTTP response (hit) HTTP response client Proxy server client Origin server Open research question: How does the proxy hit ratio change with the population of users sharing it? HTTP request (miss) u Browsers send all HTTP requests to proxy »If object in cache, proxy returns object in HTTP response »Else proxy requests object from origin server, then returns it in HTTP response to browser HTTP response

13 Why do Proxy Caching? The performance implications of caching u Consider a cache that is “close” to client »e.g., on the same LAN u Nearby caches mean: »Smaller response times »Decreased traffic on egress link to institutional ISP (often the primary bottleneck) To improve Web response times should one buy a 10 Mbps access link or a proxy server? origin servers campus network 1.5 Mbps access link 10 Mbps LAN public Internet proxy server

14 Why do Proxy Caching? The performance implications of caching u Web performance without caching: »Mean object size = 50 Kbits »Mean request rate = 29/sec »Mean origin server access time = 1 sec origin servers campus network 1.5 Mbps access link 10 Mbps LAN reqs sec Kbits/req 1.5 Mbps X = 0.97 »Average response time = ?? u Traffic intensity on the access link: public Internet 1000 ms

15 Why do Proxy Caching? The performance implications of caching u Upgrade the access link to 10 Mb/s »Response time = ?? »Queuing is negligible hence response time = 1 sec u Add a proxy cache with 40% hit ratio and 10 ms access time »Response time = ?? »Traffic intensity on access link = origin servers campus network 1.5 Mbps access link 10 Mbps LAN 0.4 x 10 ms x 1,000 ms = 604 ms 0.6 x 0.97 = 0.58 »Response time = u A proxy cache lowers response time, lowers access link utilization, and saves money! public Internet 1000 ms

16 Why do Proxy Caching? The case for proxy caching u Lower latency for user’s web requests u Reduced traffic at all network levels u Reduced load on servers u Some level of fault tolerance (network, servers) u Reduced costs to ISPs, content providers, etc., as web usage continues to grow exponentially u More rapid distribution of content origin servers campus network 1.5 Mbps access link 10 Mbps LAN proxy server public Internet

17 HTTP User-Server Interaction Authentication u Problem: How to limit access to server documents? »Servers provide a means to require users to authenticate themselves u HTTP includes a header tag for user to specify name and password (on a GET request) »If no authorization presented, server refuses access, sends WWW authenticate: header line in response u Stateless: client must send authorization for each request »A stateless design »(But browser may cache credentials) usual HTTP request msg 401: authorization WWW authenticate: usual HTTP request msg + authorization: usual HTTP response msg usual HTTP request msg + authorization: usual HTTP response msg ClientServer Time

18 HTTP User-Server Interaction Cookies u Server sends “cookie” to browser in response message Set-cookie: u Browser presents cookie in later requests to same server cookie: u Server matches cookie with server-stored information »Provides authentication »Client-side state main-tenance (remembering user preferences, prev-ious choices, …) usual HTTP request msg usual HTTP response + Set-cookie: S1 usual HTTP request msg cookie: S1 usual HTTP request msg cookie: S1 cookie- specific action cookie- specific action usual HTTP response msg usual HTTP response + Set-cookie: S2 ClientServer