Web Caching. Why Caching? Faster browsing experience for users Cache hit rate Traffic Prioritization Reduce network bandwidth requirements significantly.

Slides:



Advertisements
Similar presentations
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Advertisements

1 HTTP and some other odds and ends Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Chapter 9 Application Layer, HTTP Professor Rick Han University of Colorado at Boulder
CS320 Web and Internet Programming Handling HTTP Requests Chengyu Sun California State University, Los Angeles.
CS320 Web and Internet Programming Generating HTTP Responses
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
How the web works: HTTP and CGI explained
What’s a Web Cache? Why do people use them? Web cache location Web cache purpose There are two main reasons that Web cache are used:  to reduce latency.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Know how HTTP accesses data on the WWW Objectives.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Web, HTTP and Web Caching
CS 142 Lecture Notes: HTTPSlide 1 HTTP Request GET /index.html HTTP/1.1 Host: User-Agent: Mozilla/5.0 Accept: text/html, */* Accept-Language:
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
The Application Layer – HTTP and FTP Tahir Azim. Application Layer Protocols QoS lectures postponed to next week This week: Application Layer Protocols.
Basics of the HTTP Protocol and Apache Web Server Brandon Checketts.
Web Hacking 1. Overview Why web HTTP Protocol HTTP Attacks 2.
Introduction to Web Programming Fall 2014/2015 Some slides are based upon Web Technologies course slides, HUJI, 2009 Extended System Programming Laboratory.
1 HTTP Caching & Cache-Busting for Content Publishers Michael J. Radwin ApacheCon 2005 Wednesday, 14 December 2005.
HTTP Caching & Cache-Busting for Content Publishers Michael J. Radwin O’Reilly Open Source Convention July 28, 2004.
Java Technology and Applications
Krerk Piromsopa. Web Caching Krerk Piromsopa. Department of Computer Engineering. Chulalongkorn University.
HTTP HTML Introduction to web development. elaborate SPARCS 07 Wheel Moodle TA 안병욱 CS101 TA The presenter is 바퀴짱 ? 3 월 신작 ? 밤의 제왕 ? 악명 높은 TA?
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Mail (smtp), VoIP (sip, rtp)
CSC 2720 Building Web Applications Getting and Setting HTTP Headers (With PHP Examples)
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
Application Layer 2 Figures from Kurose and Ross
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
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 190 Lecture Notes: Tweeter ProjectSlide 1 Uniform Resource Locators (URLs) Scheme Host.
© 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.
Sistem Jaringan dan Komunikasi Data #9. DNS The Internet Directory Service  the Domain Name Service (DNS) provides mapping between host name & IP address.
Web Caching Dr. Yingwu Zhu. What is Web Caching Introducing proxy servers at certain points in the network that serve in caching Web documents for faster.
IT Engineering Instructor: Rezvan Shiravi
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
CS320 Web and Internet Programming Handling HTTP Requests Chengyu Sun California State University, Los Angeles.
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
Network Protocols A network protocol defines the structure of messages sent over the network We will only talk about the Internet Network protocols need.
World Wide Web (WWW) A Distributed Document- Based System Group E Ricky Tong (D-A0-1611) Eddy Leong (D-A0-1623) Dick Lei (D-A0-1658)
Proxy Lab Recitation I Monday Nov 20, 2006.
Web Spiders Dan Reeves Bill Walsh HDIW EECS February 2000.
HyperText Transfer Protocol (HTTP) RICHI GUPTA CISC 856: TCP/IP and Upper Layer Protocols Fall 2007 Thanks to Dr. Amer, UDEL for some of the slides used.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
CIT 383: Administrative ScriptingSlide #1 CIT 383: Administrative Scripting HTTP.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
HTTP Here, we examine the hypertext transfer protocol (http) – originally introduced around 1990 but not standardized until 1997 (version 1.0) – protocol.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
Summer 2007 Florida Atlantic University Department of Computer Science & Engineering COP 4814 – Web Services Dr. Roy Levow Part 1 – Introducing Ajax.
1 HTTP Caching & Cache-Busting for Content Publishers Michael J. Radwin ApacheCon 2004 November 17, 2004.
1 10/19/05CS360 Windows Programming ASP.NET. 2 10/19/05CS360 Windows Programming ASP.NET  ASP.NET works on top of the HTTP protocol  Takes advantage.
Overview of Servlets and JSP
LURP Details. LURP Lab Details  1.Given a GET … call a proxy CGI script in the same way you would for a normal CGI request  2.This UDP perl.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
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.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Fiddler and Your Website Robert Boedigheimer. About Me Web developer since 1995 Columnist for aspalliance.com Pluralsight Author 3 rd Degree Black Belt,
The Hypertext Transfer Protocol
Web Caching? Web Caching:.
HTTP Request Method URL Protocol Version GET /index.html HTTP/1.1
Uniform Resource Locators (URLs)
Presentation transcript:

Web Caching

Why Caching? Faster browsing experience for users Cache hit rate Traffic Prioritization Reduce network bandwidth requirements significantly Live media stream splitting Control “who goes where” and “who does what” and “when they can do it” Audit Employee Use of Corporate Assets Increase Performance, Increase Security, Improve Productivity, and Reduce Costs!

Take A Look At This Page….

Web Caching GET Internet Lisa’s Desktop Lisa’s Desktop Server Jeff’s Desktop Jeff’s Desktop GET Cache

The Cache Dilemma Hit Rate Freshness ?

Why Hit Rate is Important Better cache hit-rate means: Higher effective bandwidth Lower avg. latency Improve hit-rate with: Locality of access More users Latency

What: Content and Protocols HTTP 1.0 Basic protocol Send Request based on fix number of verbs GET HEAD POST Receive response, meta-data, content

What: Content and Protocols Example: GET /pub/www/index.html HTTP/1.0 Response: HTTP/ OK Server: Microsoft-IIS/5.0 Date: Sat, 19 Oct :46:53 GMT Expires: Sun, 20 Oct :00:00 GMT Content-Length: 2291 Content-Type: text/html Cache-control: private

What: Content and Protocols Example “if-modified-since”: GET /pub/www/index.html HTTP/1.0 If-Modified-Since: Sat, 19 Oct :43:31 GMT Response: HTTP/ OK Server: Microsoft-IIS/5.0 Date: Thu, 13 Jul :46:53 GMT Expires: Sun, 20 Oct :00:00 GMT Content-Length: 2291 Content-Type: text/html Cache-control: private

What: Content and Protocols Example “if-modified-since”: GET /pub/www/index.html HTTP/1.0 If-Modified-Since: Sat, 19 Oct :43:31 GMT Response: HTTP/ Not Modified

Basic caching algorithm Pages may be Fresh: up-to-date Expired: current date > expiration date Stale: “old”

Basic caching algorithm - #2 If (page is in the cache) if ( page is expired or stale ) Get from server - if-modified-since If not modified, Get from cache else Get from Server else Get from cache Else Get from Server

Basic caching algorithm - #3 If cache has space Store the file Else Delete expired from cache Delete stale from cache Delete LRU from cache Delete largest/smallest from cache? Store the file

Proxy Details GET / HTTP/1.1 Host: localhost:1235 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv: ) Accept: image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO ,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Without Proxy

Proxy Details GET HTTP/1.1 Host: star.cs.byu.edu User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv: ) Accept: text/xml,application/xml,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO ,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Proxy-Connection: keep-alive With Proxy

Zipf’s Law In a corpus of natural language utterances, the frequency of any word is roughly inversely proportional to its rank in the frequency table. The most frequent word will occur approximately twice as often as the second most frequent word, etc. Example: In the Brown Corpus, “the” is the most frequently occurring word and accounts for nearly 7% of all word occurrences. (69971 of slightly over 1 million) 2nd place “of” - slightly over 3.5% (36411) 3rd place “and” (28852) Only 135 words are needed to account for half of the Brown Corpus

Zipf’s law Zipf’s law: The frequency of an event P as a function of rank i is a power law function: P i = Ω / i α where α ≤ 1

Zipf’s law Observed to be true for Frequency of written words in English texts Population of cities Income of a company as a function of rank

Zipf’s law and web access For a given server, page access by rank follows Zipf’s law Web requests from a fixed population of users follows Zipf’s law 0.64 < α < 0.83

Observations Top 1% of all documents account for 20% - 35% of proxy requests Top 10% account for 45% - 55% of requests It takes 25% to 40% of all documents to account for 70% of requests It takes 70% to 80% of all documents to account for 90% of requests

Observations

For an infinite sized cache, the hit-ratio for a web-proxy grows in a log-like fashion as a function of the client population of the proxy and the number of requests seen by the proxy.

Local URL Resolution Protocol Peer-to-Peer web-cache Bootstrapping & Peer Discovery UDP broadcast Content Location UDP broadcast for content Content Delivery Direct Download from single peer