Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and...

20
Proxy-Based Acceleration Proxy-Based Acceleration of Dynamically Generated of Dynamically Generated Content on the World Content on the World Wide Web: An Approach Wide Web: An Approach and Implementation and Implementation Anindya Dutta et al Anindya Dutta et al

Transcript of Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and...

Page 1: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

Proxy-Based Acceleration of Proxy-Based Acceleration of Dynamically Generated Content Dynamically Generated Content

on the World Wide Web: An on the World Wide Web: An Approach and ImplementationApproach and Implementation

Anindya Dutta et alAnindya Dutta et al

Page 2: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

WEB CACHING SOLUTIONS WEB CACHING SOLUTIONS BACKGROUNDBACKGROUND

BACK-END CACHING BACK-END CACHING PROXY-BASED CACHINGPROXY-BASED CACHING

Page 3: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

BACK-END CACHINGBACK-END CACHING

DATABASE CACHING(OR RESULTS OF DATABASE CACHING(OR RESULTS OF QUERIES)QUERIES)

PRESENTATION LAYER CACHING PRESENTATION LAYER CACHING (CACHE HTML FRAGMENTS)(CACHE HTML FRAGMENTS)

COMPONENT LEVEL CACHING(CACHE COMPONENT LEVEL CACHING(CACHE ARBITRARY OBJECTS)ARBITRARY OBJECTS)

Page 4: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

PROXY-BASED CACHINGPROXY-BASED CACHING

Page Level CachingPage Level Caching

Both at forward and backward proxyBoth at forward and backward proxy

ImprovesImproves– Delays associated with generation of contentDelays associated with generation of content– Packet filtering Packet filtering – BandwidthBandwidth

Page 5: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

DRAWBACKSDRAWBACKS

URL BASED CACHING INCORRECT URL BASED CACHING INCORRECT PAGES.PAGES.

VERY LITTLE REUSABILITY OF FULL VERY LITTLE REUSABILITY OF FULL HTML PAGES(PERSONIZATION)HTML PAGES(PERSONIZATION)

INVALIDATIONINVALIDATION

Page 6: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

DYNAMIC PAGE ASSEMBLYDYNAMIC PAGE ASSEMBLY

DYNAMIC WEB PAGE APPROACHDYNAMIC WEB PAGE APPROACH

ESTABLISH A TEMPLATE FOR EACH ESTABLISH A TEMPLATE FOR EACH DYNAMICALLY GENERATED PAGEDYNAMICALLY GENERATED PAGE

EACH PAGE IS FACTORED INTO A EACH PAGE IS FACTORED INTO A NUMBER OF FRAGMENTSNUMBER OF FRAGMENTS

ASSEMBLE FRAGMENT HTML AT ASSEMBLE FRAGMENT HTML AT PROXYPROXY

Page 7: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

DRAWBACKSDRAWBACKS

CHANGE THE DESIGN OF CHANGE THE DESIGN OF WEBSITE(USE ONLY TEMPLATES)WEBSITE(USE ONLY TEMPLATES)

NO SEMANTIC INTERDEPENCE NO SEMANTIC INTERDEPENCE BETWEEN FRAGMENTSBETWEEN FRAGMENTS

Page 8: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

AIMAIM

““Holy GRALE” of content caching has beingHoly GRALE” of content caching has being

a solution that can provide both bandwidtha solution that can provide both bandwidth

Saving, like proxy-based approaches and Saving, like proxy-based approaches and

as well as server-side acceleration.as well as server-side acceleration.

Page 9: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.
Page 10: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

DYNAMIC PROXY CACHEDYNAMIC PROXY CACHE

OUTSIDE SITE’S INFRA (reverse-OUTSIDE SITE’S INFRA (reverse-PROXY) OR AT NETWORK EDGEPROXY) OR AT NETWORK EDGE

STORES CONTENT FRAGMENTSSTORES CONTENT FRAGMENTS

BEM(BACK END MONITOR) BEM(BACK END MONITOR) GENERATES THE LAYOUTGENERATES THE LAYOUT

FORWARD-PROXYFORWARD-PROXY– Request routingRequest routing– Cache coherencyCache coherency

Page 11: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

GRANULAR PROXY BASED CACHINGGRANULAR PROXY BASED CACHING

CACHE DYNAMIC CONTENT CACHE DYNAMIC CONTENT FRAGMENT ON THE PROXY CACHEFRAGMENT ON THE PROXY CACHE

LAYOUT INFORMATION FROM LAYOUT INFORMATION FROM SOURCE SITESOURCE SITE

QUERY TO DYNAMIC PROXY QUERY TO DYNAMIC PROXY

PUSH INTO SERVER PUSH INTO SERVER

SERVER RESPONDS WITH LAYOUT SERVER RESPONDS WITH LAYOUT

Page 12: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

Technical DetailsTechnical Details

SYSTEM INITIALIZATIONSYSTEM INITIALIZATION– Identify fragments and Tag themIdentify fragments and Tag them

RUN-TIME OPERATIONRUN-TIME OPERATION– ExampleExample– http://.../catalog.jsp?categoryID=fictionhttp://.../catalog.jsp?categoryID=fiction– Lookup fragID in BEMs cache dirLookup fragID in BEMs cache dir– Insert GET /SET in the codeInsert GET /SET in the code

Page 13: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

Back End MonitorBack End Monitor

MANAGE DPC CACHEMANAGE DPC CACHE– cache directorycache directory– Frags of DPC and metadata(ID,Key,valid,ttl)Frags of DPC and metadata(ID,Key,valid,ttl)– Invalid fragment??Invalid fragment??

CACHE INTERMEDIATE OBJECTSCACHE INTERMEDIATE OBJECTS

Page 14: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

ANALYTICAL RESULTSANALYTICAL RESULTS

Comparing average bytes served = BComparing average bytes served = B

B = sum(Sci x n(t))B = sum(Sci x n(t))

ncSci = sum(Sei) + fncSci = sum(Sei) + f

cSci = sum(Xj[(hxg) + (1-h)(sei + 2g)] + (1-cSci = sum(Xj[(hxg) + (1-h)(sei + 2g)] + (1-Xj)(sei) + f]Xj)(sei) + f]

Plot ratio cB/ncB with fragment sizePlot ratio cB/ncB with fragment size

Vary hit ratio and observeVary hit ratio and observe

Page 15: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.
Page 16: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

Hit Ratio V/s Saving in Bytes Hit Ratio V/s Saving in Bytes

Page 17: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

Cost Due to CacheCost Due to Cache

No cache scan cost = ncB * yNo cache scan cost = ncB * y

Cache Scan cost = cB*2yCache Scan cost = cB*2y

ncB > 2cBncB > 2cB

““It is preferable to dynamic proxy cache It is preferable to dynamic proxy cache when the expected bytes served with no when the expected bytes served with no cache are more than the twice the cache are more than the twice the expected bytes served with cache”expected bytes served with cache”

Page 18: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.
Page 19: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.
Page 20: Proxy-Based Acceleration of Dynamically Generated Content on the World Wide Web: An Approach and Implementation Anindya Dutta et al.

LIMITATIONSLIMITATIONS

For forward proxy cacheFor forward proxy cache– Request RoutingRequest Routing– Cache CoherencyCache Coherency– Cache ManagementCache Management– ScalabilityScalability