Web Caching. Chapter 11 από: Web Protocols and Caching, B. Krishnamurthy, J. Rexford

Similar documents
How To Understand The Power Of A Content Delivery Network (Cdn)

SiteCelerate white paper

Concept of Cache in web proxies

Internet Content Distribution

Web Caching and CDNs. Aditya Akella

Evaluating Cooperative Web Caching Protocols for Emerging Network Technologies 1

FAQs for Oracle iplanet Proxy Server 4.0

Overlay Networks. Slides adopted from Prof. Böszörményi, Distributed Systems, Summer 2004.

DATA COMMUNICATOIN NETWORKING

A TECHNICAL REVIEW OF CACHING TECHNOLOGIES

A Taxonomy of CDNs. Chapter Introduction. Mukaddim Pathan and Rajkumar Buyya

High volume Internet data centers. MPLS-based Request Routing. Current dispatcher technology. MPLS-based architecture

ICP. Cache Hierarchies. Squid. Squid Cache ICP Use. Squid. Squid

Enabling Media Rich Curriculum with Content Delivery Networking

Lecture 3: Scaling by Load Balancing 1. Comments on reviews i. 2. Topic 1: Scalability a. QUESTION: What are problems? i. These papers look at

Adding Advanced Caching and Replication Techniques to the Apache Web Server

Lecture 8a: WWW Proxy Servers and Cookies

Understanding Slow Start

TELE 301 Network Management. Lecture 17: File Transfer & Web Caching

Routing with OSPF. Introduction

Final for ECE374 05/06/13 Solution!!

Hierarchical Content Routing in Large-Scale Multimedia Content Delivery Network

Accelerating Wordpress for Pagerank and Profit

Department of Computer Science Institute for System Architecture, Chair for Computer Networks. Caching, Content Distribution and Load Balancing

Internet Content Distribution

Distributed Systems 19. Content Delivery Networks (CDN) Paul Krzyzanowski

Lecture 8a: WWW Proxy Servers and Cookies

Blue Coat Systems. Reference Guide. WCCP Reference Guide. For SGOS 5.3

How To Model The Content Delivery Network (Cdn) From A Content Bridge To A Cloud (Cloud)

Content Delivery Networks (CDN) Dr. Yingwu Zhu

Content Distribu-on Networks (CDNs)

Scalable Internet Services and Load Balancing

1. Comments on reviews a. Need to avoid just summarizing web page asks you for:

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Configuring Primary and Backup Proxy Servers for Standalone Content Engines

DNS, CDNs Weds March Lecture 13. What is the relationship between a domain name (e.g., youtube.com) and an IP address?

Implementing Reverse Proxy Using Squid. Prepared By Visolve Squid Team

Bandwidth Aggregation, Teaming and Bonding

Distributed Systems. 23. Content Delivery Networks (CDN) Paul Krzyzanowski. Rutgers University. Fall 2015

Load Balancing and Sessions. C. Kopparapu, Load Balancing Servers, Firewalls and Caches. Wiley, 2002.

The Value of Content Distribution Networks Mike Axelrod, Google Google Public

First Midterm for ECE374 03/09/12 Solution!!

Distributed Systems. 25. Content Delivery Networks (CDN) 2014 Paul Krzyzanowski. Rutgers University. Fall 2014

Content Delivery Networks. Shaxun Chen April 21, 2009

Decentralized Peer-to-Peer Network Architecture: Gnutella and Freenet

Naming vs. Locating Entities

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

The Web History (I) The Web History (II)

Measuring the Web: Part I - - Content Delivery Networks. Prof. Anja Feldmann, Ph.D. Dr. Ramin Khalili Georgios Smaragdakis, PhD

SHARPCLOUD SECURITY STATEMENT

Testing & Assuring Mobile End User Experience Before Production. Neotys

Chapter 7. Address Translation

EECS 489 Winter 2010 Midterm Exam

Measuring IP Performance. Geoff Huston Telstra

Top-Down Network Design

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

Load Balancing Web Applications

Distributed Systems. 24. Content Delivery Networks (CDN) 2013 Paul Krzyzanowski. Rutgers University. Fall 2013

International Journal of Scientific & Engineering Research, Volume 4, Issue 11, November ISSN

Multicast vs. P2P for content distribution

Globule: a Platform for Self-Replicating Web Documents

Lecture 8b: Proxy Server Load Balancing

Reverse Proxy Caching

Network Measurement. Why Measure the Network? Types of Measurement. Traffic Measurement. Packet Monitoring. Monitoring a LAN Link. ScienLfic discovery

CDN and Traffic-structure

GLOBAL SERVER LOAD BALANCING WITH SERVERIRON

Large-Scale Web Applications

Blue Coat Security First Steps. Solution for HTTP Object Caching

Alteon Global Server Load Balancing

Step-by-Step Configuration

Overview of Routing between Virtual LANs

D. SamKnows Methodology 20 Each deployed Whitebox performs the following tests: Primary measure(s)

Indirection. science can be solved by adding another level of indirection" -- Butler Lampson. "Every problem in computer

The Effectiveness of Request Redirection on CDN Robustness

Introduction to Network Operating Systems

Measuring CDN Performance. Hooman Beheshti, VP Technology

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

CS268 Exam Solutions. 1) End-to-End (20 pts)

Contents. Foreword. Acknowledgments

DATA COMMUNICATOIN NETWORKING

CHAPTER 6 DESIGNING A NETWORK TOPOLOGY

WAN Optimization, Web Cache, Explicit Proxy, and WCCP. FortiOS Handbook v3 for FortiOS 4.0 MR3

Content Distribution Networks (CDN)

Request Routing, Load-Balancing and Fault- Tolerance Solution - MediaDNS

Global Server Load Balancing

Automatically Selecting a Close Mirror Based on Network Topology

Real-Time Analysis of CDN in an Academic Institute: A Simulation Study

Highly Available Mobile Services Infrastructure Using Oracle Berkeley DB

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Internet Content Adaptation Protocol (ICAP)

Simple Solution for a Location Service. Naming vs. Locating Entities. Forwarding Pointers (2) Forwarding Pointers (1)

Transcription:

Web Caching Chapter 11 από: Web Protocols and Caching, B. Krishnamurthy, J. Rexford

Introduction The rapid growth of WWW increased network traffic Increased user-perceived latency WWW applications in contrast with other internet based applications (e.g. FTP) are very sensitive to delay Caching was the first major technique that attempted to reduce userperceived latency and transmission of redundant traffic The traffic pattern showed that: many clients in an organization appeared to visit the same few sites Caching became a major industry within few years 2/34

Cache Server (Proxy Server) The Cache Server is both a server and a client 3/34

Why Caching in the Network Reduce access latency By avoiding slow (or congested) links between client and origin server Reduce bandwidth consumption By reducing the access to the backbone network Server load balancing Spread load of overloaded origin server to the caches Inexpensive server Improved data availability When the server or a link to the server is down 4/34

Example: No Cache, Insufficient Access Rate Assumptions Object Size :100Kbits Request rate: 15 requests/sec. Server router delay: 2 sec. Consequences LAN utilization: 15% Access Link utilization: 100% Total Delay : Internet delay + access delay + LAN = 2sec + minutes + milliseconds Conclusion Must increase access link 5/34

Example: No Cache, Sufficient Access Rate Increased Access Link: 10 Mbps LAN utilization: 15% Access Link utilization: 15% Total Delay : Internet delay + access delay + LAN = 2sec + milliseconds + milliseconds Conclusion Reduced delay Higher fee for access link 6/34

Example: Access Rate 1.5Mbps + Cache Cache Hit Rate: 40% Access Link utilization: 60% Delay on Cache Miss Internet delay + access delay + LAN = 2sec + tens of milliseconds + millisec. Delay on Cache Hit LAN delay = milliseconds Expected Delay 0.4*Delay on Hit + 0.6*Delay on Miss 1.2 sec Conclusion Lowest average delay Lower fee for access link Less loaded Origin Server 7/34

Cache Chaining No Cache One Cache Chain of Caches Communication along chain can be over HTTP Cache Hierarchies use Chaining 8/34

Hierarchical Caching (1/2) The topology of internet is loosely hierarchical National, Regional, local/institutional ISP s 9/34

Hierarchical Caching (2/2) Illustrative Hit Probabilities National Cache: 0.25 Regional Cache: 0.33 Local Cache: 0.4 Probability that object is found in institutional cache: 0.4 Probability that object is found in Regional cache: 0.33 * (1-0.4) = 0.2 Probability that object is found in Regional cache: 0.25 * (1-0.4-0.2) = 0.1 Probability that object is found in the cache hierarchy: 0.4 + 0.2 + 0.1 = 0.7 10/34

Cooperative Caching With pure hierarchical caching, each client and cache, points to at most one other cache With Cooperative Caching, a cache can directly obtain an object from of many neighboring caches. The neighboring caches can be: In the ISP (sibling caches) Or outside the ISP Two popular Cooperative Cache Schemes ICP (Internet Cache Protocol) CARP (Cache Array Routing Protocol) 11/34

Overview of ICP ICP is primarily used in a cache mesh to locate specific Web objects in neighboring caches. When one cache queries another there are three possible outcomes ICP hit message returned ICP miss message returned No response (proxy server down or network connection down) When an ICP cache cannot fulfill a request from its own cache then: Queries all neighbors with ICP Obtains the object from first neighbor to respond with a hit Stores a copy of the object and forwards a copy to the requestor If there are no hits, forwards the request to the parent in the hierarchy or to the origin server Cache waits up to 2 seconds for response to query 12/34

ICP Example Client contacts an institutional cache, which does not have the object Cache uses ICP to query its siblings If a sibling has the object, cache retrieves object from sibling and forwards it to client If no sibling responds with a Hit, cache obtains object directly form the origin server 13/34

Drawbacks of ICP ICP message overhead: whenever there is a miss, each sibling must process an ICP request and response message Replication of objects: popular objects get replicated in all the caches 14/34

Hash Routing Choose a hash function h() which maps URLs to a hash space For example: Let hash space be {1,,60} Let h() be the sum of the ASCII representation of the characters in the URL, modulo 60 Partition hash space: one set for each sibling Client hashes URL, determines set to which hashed URL belongs, and sends request to corresponding sibling Example: N=2 Caches, set for cache 1= {1,,30}, set for cache 2 = {31,,60}. If h(urla) = 35, then client sends HTTP request to cache 2 If sibling does not have the object, it obtains object from origin server, stores a copy, and forwards a copy to the client. Each object resides in at most one sibling Client is immediately directed to the correct sibling 15/34

Hash Routing Drawbacks When a cache is added or removed: The correspondence of a URL to particular cache has to change A cached object can reside in the wrong sibling cache. Some caches become more loaded than others 16/34

CARP (Cache Array Routing Protocol) Alternative to ICP Uses a variant of Hash routing All queries done over HTTP No new appliaction-layer protocol such as ICP Can take advantage of HTTP/1.1 rich set of headers 17/34

Other Cache related protocols Cache Digest Protocol Extension provided to ICP Basic idea: permit the exchange of a terse description (digest) of a cache s contents Web Cache Coordination Protocol (WCCP) WCCP specifies interactions between one or more routers (or Layer 3 switches) and one or more web-caches. The purpose of the interaction is to establish and maintain the transparent redirection of selected types of traffic flowing through a group of routers. The selected traffic is redirected to a group of web-caches with the aim of optimizing resource usage and lowering response times. 18/34

Caching Challenges Cache Consistency Caches often must guess whether a stored object is stale or fresh Hit Counts Caches can cause hit count calculations to fail Access Control How do you make sure that the seller of the document gets paid? Legal and security restrictions Cache Storage Management Caches must achieve high hit probabilities 19/34

Cache Consistency A cache may have to ensure that the cached response is still valid before returning it to a client requesting the resource Target: Minimize the amount of work required to verify consistency Strong Consistency: The caching proxy sends a revalidation request each time a hit occurs Weak Consistency: The proxy uses a heuristic to decide whether the cached response is still fresh, without consulting the origin server lease-based heuristic, time-base heuristic 20/34

Weak Consistency Leased-based approach The cache agrees to store a response for a fixed amount of time (lease - period) without revalidating The server promises to notify the cache if a cached resource changes within the leased period If the lease period expires, the cache can revalidate the resource and decide to renew the lease Time to Live approach Responses have expiration time (TTL) associated with them. When the interval passes, the responses are considered stale During TTL period, the cache does not revalidate the response, saving bandwidth at the risk of staleness 21/34

Example (1/2) Conditional GET: 22/34

Example (2/2) A cache can provide strong consistency by using the conditional GET for every request Wasteful Update Heuristic (TTL-based) Hold document for a time proportional to the known lifetime of object: Known-lifetime = date last modified Documents which have not changed for a long time are unlikely to change 50% rule: example, receive response Hold document for seven days, until 29, June 1998 09:23:24 23/34

Hit Counts Not all servers are interested in having cached content delivered by proxies A Web site, hosting advertisements needs to determine the number of hits to the page hosting the advertisement Advertisers want to know the exposure of their advertisements Billing to advertisements is based on the hit counts Departments within a company receive funding for their web-servers based on their hits Caching prevents sites from getting accurate access counts Sites often employ cache busting (=mark cacheable objects as noncacheable) Solution: hit metering (unsuccessful) Advertising sites are encouraged to mark only HTML files as noncacheable 24/34

Caching and Authentication With HTTP/1.1 it is possible to cache information that is for sale Whenever origin server distributes objects, it includes in the response the header Cache servers, cache the object and tag it with proxy-revalidate Later when a request for object arrives at the cache, cache sends a conditional GET to origin server. 25/34

Cache Storage Management Once the cache is full, objects must be removed to make room to cache new responses Typical issues taken into account by replacement algorithms: Cost of fetching an object Cost of storing an object The number of accesses to the object in the past The probability of the object to be accessed in the near future Expiration Time One Level Algorithms: use only one metric Two Level Algorithms: Use a combination with primary and secondary metrics 26/34

Cache Replacement Algorithms (1/2) Least Recently Used (LRU): remove objects that have not been accessed for a long time. Examples: Value LRU = days_since_last_ access/ N Remove objects with lowest Value LRU when disk space is exhausted Weighted by retrieval time record retrieval time of each object: t r Value = Value LRU * log(t r + 1) Weighted by object size Value = Value LRU * log(object Size + 1) 27/34

Cache Replacement Algorithms (2/2) CLIMB: Similar with LRU. On each access the object climbs one position in the access list (instead of moving to the top (LRU)) Least Frequently Used (LFU): evicts the object which is accessed least frequently SIZE: evicts the largest object Lowest Latency First: tries to minimize average latency by removing the object with the lowest download time first. Hyper-G: combines LFU, LRU and SIZE. Greedy Dual Size: uses a utility value and evicts the objects that has the lowest utility. Utility takes into account, the cost of bringing the object from the source, its size and an age factor 28/34

Caching versus Replication The same target : Move content closer to the user In replication the contents of an origin server are copied to mirror sites Advantages: All objects may be available at all times, instead of just the popular objects cached at the proxies The list of replicas is known beforehand; therefore it is possible to multicast the data to the replicas Disadvantages: Waste of resources Not scalable Reaching a mirror site can be accomplished: Explicitly Redirection via HTTP headers Redirection via DNS lookup 29/34

Content Distribution Basic Idea: offload server by serving some or all contents via a set of replicas Web documents are partitioned into base and embedded components Base component: container document (e.g. HTML source file) Embedded components: images, scripts etc. (stored in content distribution servers) The content distribution servers are replicated at different locations in the world The origin server only decides which content must be mirrored; Mirroring task is the responsibility of the CDN 30/34

Example HTML text + a281g.akamai.tech.net DNS Server http:/www.foo.com/web_page.html 31/34

Example a281g.akamai.tech.net Go to: 127.15.11.101 DNS Server 32/34

Example a281g.akamai.tech.net Image Local Server: 127.15.10.101 DNS Server 33/34

Content Adaptation Offload work from origin server by moving some of the work traditionally done by servers closer to the clients Content Adaptation: converting resources to different formats, translations, other expensive operations Example: Consider an object available in a particular format: video + accompanying audio in English language Suppose few users behind a proxy are interested in getting a still image collection in Dutch language It is possible that the server could maintain different versions in both language and content format It would be desirable for a (content adaptation) proxy to perform such operations 34/34