Web Caching? Web Caching:.

Slides:



Advertisements
Similar presentations
Enabling Secure Internet Access with ISA Server
Advertisements

Hypertext Transfer PROTOCOL ----HTTP Sen Wang CSE5232 Network Programming.
PACS – 06/21/14 1 Cache? What is caching? A way to increase the average rate of a process by preferentially using a copy of data in a faster, closer, probably.
Amazon CloudFront An introductory discussion. What is Amazon CloudFront? 5/31/20122© e-Zest Solutions Ltd. Amazon CloudFront is a web service for content.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
HyperText Transfer Protocol (HTTP)
1 Caching in HTTP Representation and Management of Data on the Internet.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
Web Caching Schemes1 A Survey of Web Caching Schemes for the Internet Jia Wang.
Internet Networking Spring 2006 Tutorial 12 Web Caching Protocols ICP, CARP.
Cis e-commerce -- lecture #6: Content Distribution Networks and P2P (based on notes from Dr Peter McBurney © )
EEC-484/584 Computer Networks Discussion Session for HTTP and DNS Wenbing Zhao
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
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.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #13 Web Caching Protocols ICP, CARP.
Web, HTTP and Web Caching
Implementing ISA Server Caching. Caching Overview ISA Server supports caching as a way to improve the speed of retrieving information from the Internet.
Definitions, Definitions, Definitions Lead to Understanding.
1 Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2007 (MW 1:30-2:50 in Friend 004) Ioannis Avramopoulos Instructor:
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.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
Web Proxy Server Anagh Pathak Jesus Cervantes Henry Tjhen Luis Luna.
Web Cache. Introduction what is web cache?  Introducing proxy servers at certain points in the network that serve in caching Web documents for faster.
1 Caching  Temporary storage of frequently accessed data (duplicating original data stored somewhere else)  Reduces access time/latency for clients 
Krerk Piromsopa. Web Caching Krerk Piromsopa. Department of Computer Engineering. Chulalongkorn University.
Web Caching: Replication on the World Wide Web Jonathan Bulava CSC8530 – Distributed Systems Dr. Paul Schragger.
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.
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,…
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,
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Web HTTP Hypertext Transfer Protocol. Web Terminology ◘Message: The basic unit of HTTP communication, consisting of structured sequence of octets matching.
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.
Module 9: Implementing Caching. Overview Caching Overview Configuring General Cache Properties Configuring Cache Rules Configuring Content Download Jobs.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
HTTP evolution - TCP/IP issues Lecture 4 CM David De Roure
Implementing ISA Server Caching
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
1 COMP 431 Internet Services & Protocols HTTP Persistence & Web Caching Jasleen Kaur February 11, 2016.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Overview on Web Caching COSC 513 Class Presentation Instructor: Prof. M. Anvari Student name: Wei Wei ID:
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.
INTRODUCTION Dr Mohd Soperi Mohd Zahid Semester /16.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
What’s Really Happening
Web fundamentals: Clients, Servers, and Communication
Block 5: An application layer protocol: HTTP
How HTTP Works Made by Manish Kushwaha.
Web Development Web Servers.
HTTP request message: general format
Caching Temporary storage of frequently accessed data (duplicating original data stored somewhere else) Reduces access time/latency for clients Reduces.
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Hypertext Transport Protocol
Utilization of Azure CDN for the large file distribution
Internet Networking recitation #12
Internet Applications
ECE 671 – Lecture 16 Content Distribution Networks
Computer Communication & Networks
Configuring Internet-related services
CSE 461 HTTP and the Web.
HyperText Transfer Protocol
EE 122: HyperText Transfer Protocol (HTTP)
Kevin Harville Source: Webmaster in a Nutshell, O'Rielly Books
CSCI-351 Data communication and Networks
Presentation transcript:

Web Caching? Web Caching:

Web Caching? Fetching something over the network is both slow and expensive. Large responses require many roundtrips between the client and server, This requires extra processing from the browser and incurs extra costs for the visitor (bandwidth) and the visited server. The ability to cache and reuse previously fetched resources is a critical aspect of performance optimization Almost, every browser coms with an implementation of an HTTP cache. When you visit a web page, the browser stores the web page in cache to make it load faster in subsequent visits. All you need is to ensure that each server response: Provides the correct HTTP header directives Use these headers to instruct the browser on: when and for how long the browser can cache the response Web Caching:

Web Caching? Storing copies of recently accessed web pages Pages are delivered from the cache when requested again Browser caches Proxy caches Why Cache? Shorter response time Reduced bandwidth requirement Reduced load on servers Access control and logging Web Caching:

Browser Caching vs. Proxy Caching Local hard drive space stores representation of viewed content. Usefulness Recently viewed pages (Back/Forward button) Commonly used images Proxy Caching Similar concept, but for multiple users. Usually implemented on a firewall or separate device known as intermediaries (Proxies). Usefulness Latency and network traffic are reduced Web Caching:

Cache Controlling HTML Meta Tags HTTP Headers HTTP Defining Mechanisms Written in <head> section of an HTML page. Can mark expiration date or as un-cacheable. Only used by some browser caches and not seen by proxy caches. i.e. To disable browser cache, you can use: HTTP Headers Automatically created by Web server Sent before HTML Seen by browser and proxy caches HTTP Defining Mechanisms Freshness – Content is able to be loaded from cache without having to check with the original server Validation – The process of confirming with the original server whether or not cached content is still valid to load <meta http-equiv="Cache-Control" content="no-store" /> Web Caching:

HTTP Response Headers Example Sample Response Header HTTP/1.1 200 OK Date: Fri, 20 Oct 2017 13:19:41 GMT Server: Microsoft IIS/8.5 Cache-Control: max-age=3600, must-revalidate Expires: Fri, 20 Oct 2017 14:19:41 GMT Last-Modified: Mon, 16 Oct 2017 02:28:12 GMT ETag: "3e86-410-3596fbbc" Content-Length: 1024 Content-Type: text/html Validation Freshness Web Caching:

Expires Header and Freshness Expires: Fri, 20 Oct 2017 14:19:41 GMT Indicates how long the representation is fresh. After this time passes, the cache will communicate with the original server to see if there have been any changes. Beneficial for static page images as well as continually changing content. Web server and cache must be synchronized. Web Caching:

Last-Modified and Validation Last-Modified: Mon, 16 Oct 2017 02:28:12 GMT Validate cache by looking at the last time the document was altered (Last-Modified). If-Modified-Since request is sent to the original server. If changes have been made since the date given, the entire document is returned. Otherwise, the cached document can be loaded. Web Caching:

ETag and Validation Unique identifiers created by server. ETag: "3e86-410-3596fbbc" Unique identifiers created by server. Changed each time the representation is altered on the original server. If-None-Match request is sent to server and a simple comparison is used to validate the content. Web Caching:

Browser Caching Ex. This example shows that the server returns: First Request This example shows that the server returns: a 1024-byte response, instructs the client to cache it for up to 120 seconds, and provides a validation token ("x234dff") that can be used after the response has expired to check if the resource has been modified. ETag validation token enables efficient resource update checks No data is transferred if the resource has not changed. It is used as a fingerprint of the file contents On the second request, the client only needs to send it to the server The server checks the token against the current resource If the token hasn't changed, the server returns a "304 Not Modified" response This means, cache hasn't changed and it can be renewed for another 120 seconds. Note: no need to download the response again, which saves time and bandwidth. When the server returns a response, it includes a set of HTTP headers. i.e. content-type, length, caching directives, validation token, etc. Second Request

Cache-Control Each resource can define its caching policy via the Cache-Control HTTP header. Cache-Control directives control who can cache the response, under which conditions, and for how long. "no-cache" the returned response can't be used to satisfy a subsequent request to the same URL without first checking with the server if the response has changed. ETag token and “no-cache” incurs a roundtrip to validate the cached response, but eliminates the download if the resource has not changed. "no-store" disallows the browser and all intermediate caches from storing any version of the returned response Thus, every time the user requests this URL, a request is sent to the server and a full response is downloaded. "max-age" specifies the maximum time in seconds that the fetched response is allowed to be reused from the time of the request. Web Caching:

Web Catching: Proxy Web Caching:

What is a Web Proxy (Web Cache)? A proxy is a host which relays web access requests from clients Used when clients do not access the web directly Used for security, logging, accounting and performance Typically a Web cache is purchased and installed by an ISP. For example, a university might install a cache on its campus network and configure all of the campus browsers to point to the cache. browser proxy web Web Caching:

Web caches (proxy server) goal: satisfy client request without involving origin server User sets browser: Web accesses via cache Browser sends all HTTP requests to cache If object is in cache: cache returns object else cache requests object from origin server, then returns object to client client proxy server HTTP request HTTP response origin Web Caching:

Web caches (proxy server) The browser: establishes a TCP connection to the Web cache and sends an HTTP request for the object to the Web cache. The Web cache: checks to see if it has a copy of the object stored locally If it does: the Web cache returns the object within an HTTP response message to the client browser. No request from the original server is made Web Caching:

Web caches (proxy server) If the Web cache does not have the object: The Web cache: opens a TCP connection to the origin server. then sends an HTTP request for the object into the cache-to-server TCP connection. Origin server After receiving this request, it sends the object within an HTTP response to the Web cache. When the Web cache receives the object: it stores a copy in its local storage and sends a copy, within an HTTP response message, to the client browser (over the existing TCP connection between the client browser and the Web cache). Web Caching:

Web Caches (proxy server) Note that a cache is both a server and a client at the same time. When it receives requests from and sends responses to a browser, it is a server. When it sends requests to and receives responses from an origin server, it is a client. Web caching has seen deployment in the Internet for two reasons: First, a Web Cache can substantially reduce the response time for a client request, Second, Web Caches can substantially reduce traffic on an institution’s access link to the Internet (reducing costs). Web caches can substantially reduce Web traffic in the Internet as a whole, thereby improving performance for all applications. Web Caching:

Summary: Web Caching cache acts as both client and server server for original requesting client client to origin server typically cache is installed by ISP (university, company, residential ISP) why Web caching? reduce response time for client request reduce traffic on an institution’s access link Internet dense with caches: enables “poor” content providers to effectively deliver content (so too does P2P file sharing) Web Caching:

If-modified-since: <date> If-modified-since: <date> Conditional GET server client Goal: don’t send object if cache has up-to-date cached version no object transmission delay lower link utilization cache: specify date of cached copy in HTTP request If-modified-since: <date> server: response contains no object if cached copy is up-to- date: HTTP/1.0 304 Not Modified HTTP request msg If-modified-since: <date> object not modified before <date> HTTP response HTTP/1.0 304 Not Modified HTTP request msg If-modified-since: <date> object modified after <date> HTTP response HTTP/1.0 200 OK <data> Web Caching: