750 likes | 943 Views
On the Scale and Performance of Cooperative Web Proxy Caching. A. Wolman, G.M. Voelker, N. Sharma, A. Karlin, H.M. Levy Washington University. Web Caching. http://l4ka.org/. Miss. Hit. Internet. http://l4ka.org/. Why Web Caching?!. Reduce download time Reduce internet bandwidth usage
E N D
On the Scale and Performance of Cooperative Web Proxy Caching A. Wolman, G.M. Voelker, N. Sharma, A. Karlin, H.M. Levy Washington University
Web Caching http://l4ka.org/ Miss Hit Internet http://l4ka.org/
Why Web Caching?! • Reduce download time • Reduce internet bandwidth usage Save money
Cooperative Caching • Sharing and coordination of cache state among multiple communicating caches • Request miss occurs • Local cache transfer the request to other nodes • Requests server…
Cooperative Caching • A proxy forwards a missing request to others to determine if: • Another proxy holds the requested document • That document can be returned faster • Their distance (inter-proxy communication latency) • The client population served
Cooperative Caching • Ideal Goal • The collection of cooperative caches achieve the hit rate of a ideal single proxy acting over the combined population of all the proxies • In Reality • Performance will be less • Proxies will not have perfect knowledge • Proxies will pay the overhead • Inter-proxy communication latency
Cooperative Caches Overall Hit Rate?
Cooperative Caching • Hierarchical • Hierarchy of cache levels • Client’s request is forwarded up • Distributed • Hash function maps URL to one of caches • Peer-to-Peer • Eliminates the proxy servers • Meta-information stored in clients or the server
Outline… • For what range of client populations can cooperative caching work effectively?
Cache Traces Microsoft University of Washington Traces of same period of time
Cache Traces • The University of Washington • 50,000 students, faculty and staff… • 200 small, independent organizations • Microsoft Corporation • 40,000 employees • Collected simultaneously May 7…14, 1999
Simulation Methodology • Infinite sized caches • No expiration for objects • No compulsory misses (cold start) • Ideal vs. Practical Cache (cacheability)
Request Hit-Rate / # Clients Caches with more than 2500 clients do not increase hit rates significantly!
Byte Hit-Rate / # Clients (UW) Shared Objects are smaller on average than others!
Object Request Latency More clients do not reduce object latency significantly.
Bandwidth / # Clients There is no relation between number of clients and bandwidth utilization!
Locality:Proxies and Organizations • University of Washington • Museum of Art and Natural History • Music Department • Schools of Nursing and Dentistry • Scandinavian Languages • Computer Science comparable to cooperating businesses
Randomly populated vs. UW organizations Locality is minimal(about 4%)
Large-scale Experiment Microsoft University of Washington 60K Clients 23K Clients
Cooperative CachingMicrosoft + UW Disappointing… Why?!?
Very small increase… Why!?? • Unpopular documents are universally unpopular! • Unlikely that a miss in one of these large populations will find the document in the other population’s proxy!
Even more disappointing…! • For the most popular documents, cooperation does not help either…
Summary and Conclusions • Cooperative caching with small population is effective (< 2500)… • Can be handled by single server… • Locality not significant…
Caching Technologies for Web Applications Based on the presentation by C. Mohan from IBM Corp. Some of pictures from the reference presentation
Outline • Introduction: Caching • Main principles • Different caching approaches • Focus: database caching in e-Commerce • Three case studies • Open issues and discussions
Introduction • Motivation of caching in web applications: • Improving performance in many contexts • Processor caches in hardware • Buffer pools in DBMSs • Web proxy servers • Focus of the presentation: • e-commerce transactional/Database applications, not Internet search, etc.
Main Features of e-Business Applications • Large number of users • Dominant loads can grow without natural limit • Users are customers (should get satisfied) • Multiple channels of access available for many applications • Scalability • Using caching to make it cheaper and faster • 24x365 availability • Manageability, and security are critical considerations
Caching principles • What to cache? • Web pages, fragment of pages, SQL query result, data, execution result, … • Where place the cache? • Client, proxy, edge-of-net, ISP, edge-of-enterprise, application server, web server, DBMS • Caching and invalidation policies: • Push and pull, freshness maintenance, transparency, … • Other requirements to enable caching: • Routing, failover, authentication, …
HTTP Caching • Multiple caches between browser and server • HTTP headers control • Whether or not to cache a page • TTL for caching • Full pages and images can be cached • Unable to cache HTML fragments
Caching HTML fragments • When part of a page is too volatile to cache, the rest of the page can still be cached
Goals of fragment caching • Achieve benefits of cache for personalized pages • Improved price/performance • Improved response time latency • Reducing cache storage requirements • By sharing common fragments among multiple pages
Database caching • Corporate data is the backbone of many eCommerce applications • Existing approaches • Application-aware caching model • Suits app-specific data • Replication • Not dynamic enough to adapt to changing access patterns • Alternative: caching database data • Scalability • Reduced response time • Reduced cost of ownership • Improved throughput, congestion control, availability, QoS
Middle-tier cache requirements • Application's SQL shouldn’t have to change • Application’s DB scheme shouldn’t have to change • Support failover of nodes • Support dynamic addition/deletion of app server nodes • Limits on update propagation latencies
Middle-tier data model choices • Cloned: each table identical to a backend table • Pros: • DDL (Data Definition Language) definition is easy • Every query can be satisfied anywhere • Cons: • Updates need to reach multiple nodes • Lots of data copying during node addition • Subset: each table is a proper subset of a backend table • Pros: • Updates can be handled at minimal number of sites • Smaller DBs in cache nodes, increasing the performance • Cons: • More complex routing • Complexity in DDL spec and query processing • More complex updating
Cache Refresh • Refresh brings new content or invalidates existing cache • Requirement: mutual consistency of related data, to guarantee transaction • Automatic • Time-driven • Immediate • Synchronous • Asynchronous • On-demand
Update Approaches • Push • Reduced response time for first hit • Overwrite: less total path length than invalidation + pull • Pull • No need to cache everything • Cache upon access • Hottest stay longer in cache • Personalized data cache only where needed
DBCache Components • Seamless access to front-end data and back-end data • Front-end data a subset of back-end data • Queries can be partitioned with some going to front-end DB and rest going to backend DB • Data freshness guarantee • Challenges • Query optimization • Failure handling • Tracking changing workload
NEC’s CachePortal • URL-query caching
Case Study: IBM WebSphere Commerce Suite (WCS) Cache • Usually for caching catalog data • Admin influences what gets cached
Case study: eBay • As of Oct 2000 • 18.9 million registered users • Millions of items in 4,500 categories • 600k new items added daily by users • 4M page views per month • Average usage per month by a user is 119.6 minutes • Caching system: • Backend: Sun machines running Oracle • Front-ends: Intel boxes running some specialized DBMS • Data cached in FEs refreshed every 30 minutes or so