Using Latency-Recency Profiles for Data Delivery on the Web
Transcript of Using Latency-Recency Profiles for Data Delivery on the Web
![Page 1: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/1.jpg)
Using Latency-Recency Profiles for Data Delivery on
the Web
Laura BrightLouiqa Raschid
University of Maryland
![Page 2: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/2.jpg)
August 22, 2002 VLDB 2002 2
Introduction• Caching improves data delivery on the
web• Cached data may become stale• Keeping data fresh adds overhead
– Latency– Bandwidth– Server Load
• Existing techniques do not consider client latency and recency preferences
![Page 3: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/3.jpg)
August 22, 2002 VLDB 2002 3
Outline
• Web Technologies• Existing Solutions• Latency-Recency Profiles• Experiments• Conclusions
![Page 4: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/4.jpg)
August 22, 2002 VLDB 2002 4
Proxy Caches
• Resides between clients and web• Objects have Time-to-Live (TTL); expired
objects validated at server• Validation adds overhead• No server cooperation required
Internet
clients
servers
proxycache
![Page 5: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/5.jpg)
August 22, 2002 VLDB 2002 5
Application Servers
• Offload functionality of database-backed web servers
• May perform caching to improve performance• Servers may propagate updates to cache
Internetclients
databaseservers
applicationserver
![Page 6: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/6.jpg)
August 22, 2002 VLDB 2002 6
Web Portals
• Provide information gathered from multiple data sources
• Problem: updates to objects at sources– Update propagation consumes bandwidth– Objects at portal may be stale
Internet
clients
Portal
Remote servers
![Page 7: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/7.jpg)
August 22, 2002 VLDB 2002 7
Consistency Approaches
• Time-to-Live (TTL)• Always-Use-Cache (AUC)• Server-Side Invalidation (SSI)
![Page 8: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/8.jpg)
August 22, 2002 VLDB 2002 8
Time-to-Live (TTL)
• Estimated lifetime of cached object• When TTL expires, cache must validate
object at server• No server cooperation• Proxy caches
client cache server
![Page 9: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/9.jpg)
August 22, 2002 VLDB 2002 9
cache server
Always Use Cache (AUC)
• Objects served from the cache• Background prefetching keeps cached
objects up to date• No server cooperation• Portals, web crawlers
client
![Page 10: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/10.jpg)
August 22, 2002 VLDB 2002 10
Server Side Invalidation (SSI)
• Servers send updates to cache• Guarantees freshness• Increases workload at server• Application servers
client cache server
![Page 11: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/11.jpg)
August 22, 2002 VLDB 2002 11
Summary• Existing techniques do not consider client
preferences• May add unnecessary overhead (latency,
bandwidth, or server load)– TTL, SSI
• May not meet client recency preferences– AUC
• Our goal: consider client preferences and reduce overhead
![Page 12: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/12.jpg)
August 22, 2002 VLDB 2002 12
Outline
• Web Technologies• Existing Solutions• Latency-Recency Profiles• Experiments• Conclusions
![Page 13: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/13.jpg)
August 22, 2002 VLDB 2002 13
Latency-Recency Profiles• Used in download decision at cache• Profile - set of application specific
parameters that reflect client latency and recency preferences
• Examples– Stock trader tolerates latency of 5 seconds
for most recent stock quotes– Casual web browser wants low latency;
tolerates data with recency two updates
![Page 14: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/14.jpg)
August 22, 2002 VLDB 2002 14
Profile Parameters• Set by clients• Target Latency ( ) -acceptable latency
of request• Target Age( ) - acceptable recency of
data• Examples
– stock trader: =0 updates, =5 seconds– casual browser: =2 updates, = 2
seconds
LT
AT
LTLT
ATAT
![Page 15: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/15.jpg)
August 22, 2002 VLDB 2002 15
Profile-Based Downloading
• Parameters appended to requests• Scoring function determines when to
validate object and when to use cached copy
• Scales to multiple clients • Minimal overhead at cache
![Page 16: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/16.jpg)
August 22, 2002 VLDB 2002 16
Scoring Function Properties
• Tunability– Clients control latency-recency tradeoff
• Guarantees– upper bounds with respect latency or
recency
• Ease of implementation
![Page 17: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/17.jpg)
August 22, 2002 VLDB 2002 17
Example Scoring Function
• T = target value ( or )• x = actual or estimated value (Age or
Latency)• K =constant that tunes the rate the score
decreases
{ otherwise
T xif ≤=K)x,(T, Score K)T-K/(x
1
+
LT AT
![Page 18: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/18.jpg)
August 22, 2002 VLDB 2002 18
Combined Weighted Score• Used by cache• Age = estimated age of object• Latency = estimated latency• w = relative importance of meeting
target latency• (1 - w) = importance of meeting recency
= oreCombinedSc )K Age,Score(T *w)-(1 A A,
)K Latency,Score(T * w L L,+
![Page 19: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/19.jpg)
August 22, 2002 VLDB 2002 19
Profile-Based Downloading
• DownloadScore- expected score of downloading a fresh object
1.0*w )K Age, ,Score(T*w)-(1 CacheScore AA +=
)K Latency, ,Score(T* w 1.0* w)-(1 oreDownloadSc LL+=
• CacheScore- expected score of using the cached object
• If DownloadScore > CacheScore, download fresh object, otherwise use cache
![Page 20: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/20.jpg)
August 22, 2002 VLDB 2002 20
Tuning Profiles
W= 0.5, No firm upper bound
K values control slope
![Page 21: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/21.jpg)
August 22, 2002 VLDB 2002 21
Upper BoundsW > 0.5- Firm Latency Upper Bound
Download if Latency <3
W = 0.6, =2 =0.5LK AK
Download if Latency <2
W = 0.6, =2 =2LK AK
![Page 22: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/22.jpg)
August 22, 2002 VLDB 2002 22
Outline
• Web Technologies• Existing Solutions• Latency-Recency Profiles• Experiments• Conclusions
![Page 23: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/23.jpg)
August 22, 2002 VLDB 2002 23
Baseline Algorithms
• Time-to-Live (TTL)– Estimated lifetime of object– Can be estimated by a server or as function
of time object last modified – Provides most recent data– When object’s TTL expires, new object must
be downloaded
![Page 24: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/24.jpg)
August 22, 2002 VLDB 2002 24
Baseline Algorithms
• AlwaysUseCache (AUC)– minimizes latency– If object is in cache, always serve without
validation– Prefetch cached objects in round robin
manner to improve recency– Prefetch rates of 60 objects/minute and
300 objects/minute
![Page 25: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/25.jpg)
August 22, 2002 VLDB 2002 25
Baseline Algorithms
• Server-Side Invalidation (SSI)• SSI-Msg
– Server sends invalidation messages only– Cache must request updated object
• SSI-Obj– Server sends updated objects to cache– Reduces latency but consumes bandwidth
![Page 26: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/26.jpg)
August 22, 2002 VLDB 2002 26
Trace Data• Proxy cache trace data obtained from
NLANR in January 2002• 3.7 million requests over 5 days• 1,365,545 distinct objects, avg size 2.1 KB• Performed preprocessing• Age estimated using last-modified time• Latency is average over previous requests• Profiles: = 1 second, = 1 update• Cache size range: 1% of world size- infinite
ATLT
![Page 27: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/27.jpg)
August 22, 2002 VLDB 2002 27
Synthetic Data
• World of 100,000 objects• Zipf-like popularity distribution• Update intervals uniformly distributed
from 10 min-2 hours• Workload of 8 requests/sec• Object sizes 2-12 KB• Infinite cache
![Page 28: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/28.jpg)
August 22, 2002 VLDB 2002 28
Metrics
• Validations - messages between cache and servers– Useful validations - object was modified– Useless validations - object not modified
• Downloads - objects downloaded from servers
• Stale hits - objects served from cache that were modified at server
![Page 29: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/29.jpg)
August 22, 2002 VLDB 2002 29
Comparison- Trace DataTTL AUC-
60AUC-300
Profile
Val msgs 252367 378312 1891560 92943Usefulvals
24898 933 2810 22896
Uselessvals
122074 279349 327776 67601
Avg. Est.Age
0 18.4 11.1 0.87
Stale hits 4282 31285 22897 7704
![Page 30: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/30.jpg)
August 22, 2002 VLDB 2002 30
Comparison- Trace Data
0
5000
10000
15000
20000
25000
UsefulValidations
TTLAUC-60AUC-300Profile
050000
100000150000200000250000300000350000
UselessVals.
TTLAUC-60AUC-300Profile
0
5000
10000
15000
2000025000
30000
35000
Stale Hits
TTLAUC-60AUC-300Profile
![Page 31: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/31.jpg)
August 22, 2002 VLDB 2002 31
Comparison- Synthetic Data
0
20000
40000
60000
80000
100000
120000
140000
160000
180000
Validations Downloads Stale Hits
SSI-MsgTTLAUC-300Profile
![Page 32: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/32.jpg)
August 22, 2002 VLDB 2002 32
Effect of Cache Size
– X-axis- cache size, Y-axis- average latency– Profile lies between extremes of TTL and AUC– Profile exploits increased cache size better than TTL
![Page 33: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/33.jpg)
August 22, 2002 VLDB 2002 33
Effect of Cache Size
– X-axis- cache size, Y-axis- number of stale objects– AUC must prefetch many objects when cache is large– Profile can scale to large cache size
![Page 34: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/34.jpg)
August 22, 2002 VLDB 2002 34
Effect of Surges
• Surge- client request workload exceeds capacity of server or network
• Two groups of clients:– MostRecent: = 0 = 1 sec– LowLatency: = 1 = 0 sec
• 30 second surge period• Capacity Ratio = available resources/
resources required
LTATLTAT
![Page 35: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/35.jpg)
August 22, 2002 VLDB 2002 35
Effect of Surges
![Page 36: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/36.jpg)
August 22, 2002 VLDB 2002 36
Related Work• Refreshing cached data
– Cho and Garcia-Molina 2000
• WebViews– Labrinidis and Roussopoulos, 2000, 2001
• Caching Dynamic Content– Candan et al. 2001– Luo and Naughton 2001
• Caching Approximate Values– Olston and Widom 2001, 2002
![Page 37: Using Latency-Recency Profiles for Data Delivery on the Web](https://reader031.fdocuments.in/reader031/viewer/2022020706/61fc9c2b9d50e757a5219ef8/html5/thumbnails/37.jpg)
August 22, 2002 VLDB 2002 37
Conclusions and Future Work
• Latency-Recency Profiles can reduce overhead while meeting client preferences
• Future work: – Implementation– Mobile Environments– Effects of server cooperation