DOC PREVIEW
CMU CS 15744 - Caching and CDNs

This preview shows page 1-2-3-4-5 out of 15 pages.

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

Unformatted text preview:

115-744: Computer NetworkingL-21: Caching and CDNsAmit ManjhiL -22 ;11-24-02© Srinivasan Seshan, 2001 2Caching & CDN’s• Assigned reading• [FCAB98] Summary Cache: A Scalable Wide-Area Cache Sharing Protocol• [K+99] Web Caching with consistent hashingL -22 ;11-24-02© Srinivasan Seshan, 2001 3Web caching12HTTP requestHTTP response11122221Client1Client2CacheServerClient3L -22 ;11-24-02© Srinivasan Seshan, 2001 4Background• HTTP: L7, simple protocol, works over TCP• Stateless, request/response protocol• About 80% of Internet traffic• Flavors: parallel, persistent HTTP• Methods : GET most common• Workload: popularity of objects show zipf-distribution2L -22 ;11-24-02© Srinivasan Seshan, 2001 5HTTP support for caching• Conditional requests (IMS)• Servers can set expires and max-age • Request indirection: application level routing• Range requests, entity tag • Cache-control header• Requests: min-fresh, max-stale, no-transform• Responses: must-revalidate, public, private, no-cacheL -22 ;11-24-02© Srinivasan Seshan, 2001 6Overview• Web caches• Aspects• Cache hierarchies – location of content• problems• Content distribution networks• New directionsL -22 ;11-24-02© Srinivasan Seshan, 2001 7Aspects• Why web caching?• Cache consistency• Source of cache misses• Caching: where in the network?• Cache placement/replacementL -22 ;11-24-02© Srinivasan Seshan, 2001 8Why web caching?• Client-server architecture is inherently unscalable• Proxies: a level of indirection• Reduce client response time• Direct and indirect effect• Less load on the server:• Server does not have to over-provision for slashdot effect • Reduce network bandwidth usage• Wide area vs. local area use• These two objectives are often in conflict• May do exhaustive local search to avoid using wide area bandwidth• Prefetching uses extra bandwidth to reduce client response time3L -22 ;11-24-02© Srinivasan Seshan, 2001 9Web Caching - advantages• Also used for security• Proxy is only host that can access Internet• Administrators make sure that it is secure• Performance• How many clients can a single proxy handle?• Caching• Provides a centralized coordination point to share information across clients• How to index• Early caches used file system to find file• Metadata now kept in memory on most cachesL -22 ;11-24-02© Srinivasan Seshan, 2001 10Obscure advantages• Connection caching [Feldmann 1999]• HTTP – small objects, overhead in setting up connection• Multiplex multiple requests over single persistent HTTP connection• Proxy maintains persistent HTTP connections to clients and servers • Split TCP connection• TCP throughput increases as RTT decreasesL -22 ;11-24-02© Srinivasan Seshan, 2001 11Cache consistency - leases• Only consistency mechanism in HTTP is for clients to poll server for updates• Should HTTP also support invalidations?• Problem: server would have to keep track of many, many clients who may have document• Possible solution: leases• Leases – server promises to provide invalidates for a particular lease duration• Server can adapt time/duration of lease as needed• To number of clients, frequency of page change, etc• Proxies make leases scalableL -22 ;11-24-02© Srinivasan Seshan, 2001 12Proxies – cache misses• Capacity• How large a cache is necessary or equivalent to infinite• On disk vs. in memory à typically on disk• Compulsory• First time access to document (large caches)• Non-cacheable documents• CGI-scripts• Personalized documents (cookies, etc)• Encrypted data (SSL)• Consistency• Document has been updated/expired before reuse• Conflict à no such issue4L -22 ;11-24-02© Srinivasan Seshan, 2001 13Cache Hierarchies• Use hierarchy to scale a proxy• Why? • Larger population = higher hit rate (less compulsory misses)• Larger effective cache size• Why is population for single proxy limited?• Performance, administration, policy, etc.• NLANR cache hierarchy• Most popular • 9 top level caches• Internet Cache Protocol based (ICP)• Squid/Harvest proxy • How to locate content?L -22 ;11-24-02© Srinivasan Seshan, 2001 14ICP (Internet cache protocol)• Simple protocol to query another cache for content• Uses UDP – why?• ICP message contents• Type – query, hit, hit_obj, miss• Other – identifier, URL, version, sender address• Special message types used with UDP echo port• Used to probe server or “dumb cache”• Query and then wait till time-out (2 sec)• Transfers between caches still done using HTTPL -22 ;11-24-02© Srinivasan Seshan, 2001 15SquidClientParentChild Child ChildWeb page requestICP QueryICP QueryL -22 ;11-24-02© Srinivasan Seshan, 2001 16SquidClientParentChild Child ChildICP MISSICP MISS5L -22 ;11-24-02© Srinivasan Seshan, 2001 17SquidClientParentChild Child ChildWeb page requestL -22 ;11-24-02© Srinivasan Seshan, 2001 18SquidClientParentChild Child ChildWeb page requestICP QueryICP QueryICP QueryL -22 ;11-24-02© Srinivasan Seshan, 2001 19SquidClientParentChild Child ChildWeb page requestICP MISSICP HITICP HITL -22 ;11-24-02© Srinivasan Seshan, 2001 20SquidClientParentChild Child ChildWeb page request6L -22 ;11-24-02© Srinivasan Seshan, 2001 21ICP vs HTTP• Why not just use HTTP to query other caches?• ICP is lightweight – positive and negative• Makes it easy to process quickly• HTTP has many functions that are not supported by ICP• Extra RTT (2 sec) for any proxy-proxy transfer• Does not scale to large number of peersL -22 ;11-24-02© Srinivasan Seshan, 2001 22Optimal Cache Mesh Behavior• Ideally, want the cache mesh to behave as a single cache with equivalent capacity and processing capability• ICP: many copies of popular objects created – capacity wasted• More than one hop needed for searching object• Locate content – how? L -22 ;11-24-02© Srinivasan Seshan, 2001 23Hinting • Have proxies store content as well as metadata about contents of other proxies (hints)• Minimizes number of hops through mesh• Size of hint cache is a concern – size of key vs. size of document• Having hints can help consistency• Makes it possible to push updated documents or invalidations to other caches• How to keep hints up-to-date?• Not critical – incorrect hint results in extra lookups, not incorrect behavior• Can batch updates to peersL -22 ;11-24-02© Srinivasan Seshan, 2001


View Full Document

CMU CS 15744 - Caching and CDNs

Documents in this Course
Lecture

Lecture

25 pages

Lecture

Lecture

10 pages

Lecture

Lecture

10 pages

Lecture

Lecture

45 pages

Lecture

Lecture

48 pages

Lecture

Lecture

19 pages

Lecture

Lecture

97 pages

Lecture

Lecture

39 pages

Lecture

Lecture

49 pages

Lecture

Lecture

33 pages

Lecture

Lecture

21 pages

Lecture

Lecture

52 pages

Problem

Problem

9 pages

Lecture

Lecture

6 pages

03-BGP

03-BGP

13 pages

Lecture

Lecture

42 pages

lecture

lecture

54 pages

lecture

lecture

21 pages

Lecture

Lecture

18 pages

Lecture

Lecture

18 pages

Lecture

Lecture

58 pages

lecture

lecture

17 pages

lecture

lecture

46 pages

Lecture

Lecture

72 pages

Lecture

Lecture

44 pages

Lecture

Lecture

13 pages

Lecture

Lecture

22 pages

Lecture

Lecture

48 pages

lecture

lecture

73 pages

17-DNS

17-DNS

52 pages

Lecture

Lecture

10 pages

lecture

lecture

53 pages

lecture

lecture

51 pages

Wireless

Wireless

27 pages

lecture

lecture

14 pages

lecture

lecture

18 pages

Lecture

Lecture

16 pages

Lecture

Lecture

14 pages

lecture

lecture

16 pages

Lecture

Lecture

16 pages

Lecture

Lecture

37 pages

Lecture

Lecture

44 pages

Lecture

Lecture

11 pages

Lecture

Lecture

61 pages

Multicast

Multicast

61 pages

Lecture

Lecture

19 pages

Lecture

Lecture

8 pages

Lecture

Lecture

81 pages

Lecture

Lecture

9 pages

Lecture

Lecture

6 pages

Lecture

Lecture

63 pages

Lecture

Lecture

13 pages

Lecture

Lecture

63 pages

Lecture

Lecture

50 pages

lecture

lecture

35 pages

Lecture

Lecture

47 pages

Lecture

Lecture

29 pages

Lecture

Lecture

92 pages

Load more
Download Caching and CDNs
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 Caching and CDNs 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 Caching and CDNs 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?