210 likes | 335 Vues
The Age Penalty and its effect on cache performance. Haim Kaplan Tel-Aviv University. Edith Cohen AT&T Labs-Research. Presenting: Edith Cohen. Distribution of Web Content. cache. cache. Origin server. Content of URL can be modified by the origin. Copies are cached throughout.
E N D
The Age Penaltyand its effect on cache performance Haim Kaplan Tel-Aviv University Edith Cohen AT&T Labs-Research Presenting: Edith Cohen
Distribution of Web Content cache cache Origin server • Content of URL can be modified by the origin. • Copies are cached throughout
HTTP Freshness Control Cache-directives • Cached copies have: • Freshness lifetime • Age (elapsed time since fetched from origin) • TTL (Time to Live) = freshness lifetime – age • Expired copies must be validated before they can be used. header Body (content)
HTTP Cache Serving a Request GET www.cnn.com/WEATHER/ c-miss • No cached copya GET a fresh copy a$ • Stale cached copy a • If-Modified-Since GET a fresh copy • “Not-Modified” a update header a$ • “Modified” a update content and header a$ • Fresh cached copy a$ f-miss c-miss f-hit
freshness-rate: f-hit/c-hit “hits” and “misses” hit-rate metric:c-hit/(c-hit+c-miss) latency(c-miss) > latency(f-miss) >> latency(f-hit) c “hit-rate” does not capture freshness
“Value” of a Cached Copy • Frequency/pattern of requests • Size (storage cost) • Fetching cost (latency/bandwidth) • Modification rate (likelihood of c-miss) • Age (likelihood of f-miss) • Important issues for: • replacement and pre-fetching strategies • cascaded caches
Origin Server to User reverse proxy proxy cache reverse proxy AS AS www.cnn.com proxy cache reverse proxy
Issues for Cascaded Caches • Path between Web server and end-user often includes 2 or more caches. c • downstream cache sends older copies c more misses at upstream caches • more traffic between caches • increased user-perceived latency
7:00pm 1:00pm 10:59pm Freshness-lifetime= 10 H Age = 0 Freshness-lifetime= 10 H Age = 6 H Freshness-lifetime= 10 H Age = 9:59 H Distributing Copies upstream cache downstream cache Origin server
“Origin”misses are forwarded to authoritative (origin) server. • “Cache” misses are forwarded to a cache www.cnn.com Cache Cache-1 Cache-2 Modeling Sources of a Cache
Theorem:miss_origin(S)<miss_cache(S)< 2*miss_origin(S) Object with freshness-lifetime = T. The age of copy retrieved at time t is: • origin: age(t) = 0 • cache: age(t) = T - (t+a) mod T Definition: Age-Penalty Source Models… Request sequence S
TTL cache origin T t Requests: m f-m f-m m h f-m …Age-penalty
Trace-driven Simulations freshness-rate for different configurations
CDN server CDN server CDN server Content Delivery Network AS www.cnn.com
HTTP freshness control • Proprietary freshness control CDN www.cnn.com Cache Content Delivery Networks • CDN servers are a system of reverse proxy caches, placed throughout the Internet. • Proprietary, non-HTTP, freshness control between origin and CDN servers, allowing for longer TTL durations.
CDN Age-Handling Practices Practice: “Intact headers” CDN servers act as a cache, end-to-end headers are intact. (-3/2000). What are the implications? Practice: “emulate origin” CDN servers rewrite age to 0 (3/2000-present) Practice: “equate lifetime” CDN servers rewrite HTTP freshness lifetime is equated (extended) to “proprietary” freshness lifetime. How much can be gained?
Age = time on CDN serverc copies often served with 0 TTL! …Implications of Intact Headers
…..Equating Lifetimes How much can be gained? We estimate about 20% of requests to CDN (Akamai) servers would be eliminated.
Conclusion • Content-aging can have significant performance effect on cascaded Web caches (25% decrease in effectiveness of cache hits). • Aging effects are not being carefully accounted for (see CDN practices). • Content-aging warrants more awareness by practitioners, and more research...
Follow-up Work • More “source” types (e.g., alternating between several downstream caches) • Pre-term refreshes by downstream cache (sporadic updates by downstream cache may decrease performance, but this can be avoided) • Longer lifetime durations at upstream caches (tradeoff of staleness and latency) • Rejuvenation by downstream caches (refresh “fresh” popular copies to set their age to 0). Proper use can improve performance, but otherwise can decrease performance (!!!)…