Post on 13-Dec-2015
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
WEB CACHING SOLUTIONS WEB CACHING SOLUTIONS BACKGROUNDBACKGROUND
BACK-END CACHING BACK-END CACHING PROXY-BASED CACHINGPROXY-BASED CACHING
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)
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
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
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
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
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.
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
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
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
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
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
Hit Ratio V/s Saving in Bytes Hit Ratio V/s Saving in Bytes
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”
LIMITATIONSLIMITATIONS
For forward proxy cacheFor forward proxy cache– Request RoutingRequest Routing– Cache CoherencyCache Coherency– Cache ManagementCache Management– ScalabilityScalability