DOC PREVIEW
Duke CPS 212 - Web Cache Consistency

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Web Cache ConsistencyWeb Cache ConsistencyWeb Cache ConsistencyWeb Cache Consistency“Requirements of performance, availability, and disconnected operation require us to relax the goal of semantic transparency.”- HTTP 1.1 specificationAny caching/replication framework must take steps to ensure that the cache does not deliver old copies of modified objects.Issues for cache consistency in the Web:• large number of clients/proxies• most static objects don’t change very often• weaker consistency requirementsStale information might be OK, as long as it is “not too stale”.Validation vs. InvalidationValidation vs. InvalidationValidation• Proxy periodically polls server for updates to cached objects• How often to poll? (“freshness date”)• Sync vs. asyncInvalidation• Server informs proxy if cached object is updated Validation vs. Invalidation: The TradeoffsValidation vs. Invalidation: The TradeoffsWhat are the tradeoffs?• Scale• Consistency quality• Performance and poll overheadFast hit vs. slow hitDoes popularity correlate with update rate?Validation “works” today!GET-IF-MODIFIED-SINCEHow to set the TTLs or expires headers?Design of a scalable invalidation architecture for the Web is a difficult challenge.Cache Expiration and ValidationCache Expiration and ValidationHTTP 1.0 cache control• Origin server may add a “freshness date” (Expires) response header....or the cache could determine expiration time (TTL) heuristically.• Proxy must revalidate cache entry if it has expired.Last-Modified and If-Modified-Since• Whose clock do we use for absolute expiration times?ClientsProxy Origin ServerGET xGET xGET xGET xGET xIf-Modified-Since mx, Last-Modified mExpires t304: Not ModifiedConsistency: Variations on a ThemeConsistency: Variations on a Theme• Pipeline validations and Piggyback Cache Validations [Krishnamurthy and Wills]Opportunistically“prefetch” validations.Enough traffic to benefit?• Coarse granularity: volumesCluster objects in volumes to reduce the number of validations when update rates are low.• Delta encoding[Mogul et al 1997]: fine-grained updatesOptimistic deltas: reduce latency of a consistency miss by sending a stale copy from cache, followed by the delta.Nice hack for cookied content.2HTTP 1.1HTTP 1.1Specification effort started in W3C, finished in IETF....much later.A number of research works influenced the specification.HTTP 1.0 shows the importance of careful specification.• performancepersistent connections with pipeliningrange requests, incremental update, deltas• cachingcache control headers • negotiation of content attributes and encodings• content attributes vs. transport attributestransport encodings for transmission through proxies• Trailer header and trailer headersExpiration and Validation in HTTP 1.1Expiration and Validation in HTTP 1.1HTTP 1.1 cache control allows origin server to:• use relative instead of absolute expiration times (max-age);• issue opaque validators (ETag for entity tag) instead of timestamps;Origin server may specify which of several cached entries to use.ClientsProxy Origin ServerGET xGET xGET xGET xGET xIf-None-Match vx, ETag vmax-age t304: Not Modified, ETag vAge < tAge = 0Other 1.1 Cache Control FeaturesOther 1.1 Cache Control Features• Client may specify that no caching is to occur.private or no-store• Vary headers allow server to specify that certain request headers must also match if the proxy deems a cached response valid.language, character set, etc. • Server may specify that a response is not cacheable.Pragma: no-cache header since HTTP 1.0• Client may explicitly request the proxy to validate the response.Pragma: no-cache• Proxy may/should/must tell client the age of a cached response.Age header• Proxy may/should/must tell client that it could not validate a non-fresh cached response with the origin server. Warning headerThe Role of the Content DeveloperThe Role of the Content Developer• Use expiration dates where known• Limit the scope of cookies• If using cookies for personalization, use cache control headers to disable caching on the personalized objectsWhat if you forget?• Decompose dynamic pages into cacheable and uncacheable components.Templates [Douglis97]Edge-side includes (Akamai)Base instance [WebExpress]CookiesCookiesHTTP cookies (RFC2109) have brought us a better Web.• S optionally includes arbitrary state as a cookie in a response.• Cookie is opaque to C, but C saves the cookie.• C sends the saved cookie in future requests to S, and possibly to other servers as well.• Allows stateful servers for sessions, personalized content, etc. But: cookies raise privacy and security issues.• What did S put in that cookie? Can anyone else see it? How much space does it take up on my disk that I paid soooo much for?• Cookies may allow third parties who are friends of S1,..., SNto observe C’s movements among S1,..., SN. Unverifiable transactions, e.g., DoubleClick and other ad services.Unverifiable TransactionsUnverifiable Transactions• Users may not know that they are interacting with DoubleClick.Amazon and MyCFO trust DoubleClick, but client is ignorant.• The user visits pages at many sites that reference DoubleClick.• DoubleClick’s cookie allows it to associate all the requests from a given user.• If the browser sends Referer headers, DoubleClick may gather information about all the sites the user visits that reference DoubleClick.mycfo.comClient doubleclick,akamai, etc.GET xGET yGET adReferer mycfo.comamazon.comad, cookie cadGET ad, cookie cReferer amazon.com/x3WCDPWCDPSara Sprenkle led a discussion of WCDP, a protocol for server-driven consistency from IBM.Slides for this portion of the class may be found at:http://www.cs.duke.edu/~sprenkle/wcdp.pptIt is important to understand the context of the server-driven approach, its role in CDNs, the opportunity to use invalidation, and how WCDP addresses the scalability


View Full Document

Duke CPS 212 - Web Cache Consistency

Download Web Cache Consistency
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Web Cache Consistency and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Web Cache Consistency 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?