maintaining mutual consistency for cached web objects

22
Computer Science Maintaining Mutual Consistency for Cached Web Objects Bhuvan Urgaonkar, Anoop Ninan, Mohammad Raunak, Prashant Shenoy, Krithi Ramamritham University of Massachusetts, Amherst http://lass.cs.umass.edu

Upload: kort

Post on 21-Jan-2016

31 views

Category:

Documents


0 download

DESCRIPTION

Maintaining Mutual Consistency for Cached Web Objects. Bhuvan Urgaonkar, Anoop Ninan, Mohammad Raunak, Prashant Shenoy, Krithi Ramamritham University of Massachusetts, Amherst http://lass.cs.umass.edu. Introduction. Server. Network. End-stations. Web Proxy. Web Proxy Caching - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Maintaining Mutual Consistency for Cached Web Objects

Bhuvan Urgaonkar, Anoop Ninan,Mohammad Raunak, Prashant Shenoy,

Krithi Ramamritham

University of Massachusetts, Amherst

http://lass.cs.umass.edu

Page 2: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Introduction

End-stations

Network

Server

Web Proxy

Web Proxy Caching Reduces client response times, bandwidth usage and server load

Time-varying objects => need to maintain consistency Example: Breaking news sections of newspaper sites

Consistency techniques: TTL, server invalidation, client polling All of these techniques focus on individual objects

Page 3: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Our Goal: Mutual Consistency

Many web objects are related to one another Examples:

• Stock prices and stock market indices• Sports scores of individuals and teams

Proxy must present a logically consistent view of related objects

Problem: How to maintain mutual consistency ?

Page 4: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Outline

Motivation Consistency Semantics Consistency Maintenance Techniques Experimental Evaluation Related Work Concluding Remarks

Page 5: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Consistency Taxonomy

Mutual

Consistency

Time Value ValueTime

Individual

Page 6: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Consistency of Individual Objects Strong consistency

The proxy and server always in sync with each other Strong consistency is expensive!

Relax strong consistency: - consistency Time domain: t - consistency

• The proxy never out of sync with the server by more than time units

• Eg: Sports score not stale by more than a minute Value domain: v - consistency

• The difference in the object values at the proxy and the server bound by at all times

• Eg: Only interested in changes larger than $1 to a stock price

Page 7: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Mutual Consistency: Time Domain

Related objects should have existed at the server no more than time units apart

X

Y

X1

Y0 Y1

time

time

Objects X, Y at server:

X0

t

t > t +

Page 8: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Mutual Consistency: Value Domain

Difference of some function of the values of the two objects at server and proxy bound by

Example: With = $1, the difference between two stock prices at proxy within $1 of the difference at server

Page 9: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Individual Consistency:Time Domain

Baseline Approach Have a fixed polling interval of Problem: Wastes network bandwidth when rate of

change slow

LIMD Approach (Linear Increase Multiplicative Decrease) Start by polling once every Object changes but no violations:

• Increase the polling interval by a small linear factor Object does not change:

• Increase the polling interval by a larger linear factor One or more violations occur:

• Decrease the polling interval by a multiplicative factor

Page 10: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Mutual Consistency:Time Domain

LIMD Approach No support for mutual consistency => mutual consistency

violations

LIMD Approach: Poll All An object changes:

• Trigger extra polls for all related objects Advantage: Guarantees mutual consistency Disadvantage: Polls all related objects at the rate of the

fastest changing object => High network overhead

LIMD Approach: Poll Select Track rate of change of objects An object changes:

• Trigger extra polls only for related objects changing at similar or faster rates

Page 11: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Consistency Taxonomy: Summary

Mutual

Consistency

Time Value ValueTime

Individual

Page 12: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Individual Consistency: Value Domain

Track the rate of change of the object value Compute the difference between the object values for

successive polls

Extrapolate using the computed rate to decide when to poll next

Time (min)

Value ($)

Poll (t) Poll (t+1)

1.0

0.5

Actual change in value

Slope = $0.5 / 1 min

Page 13: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Mutual Consistency: Value Domain

Virtual Object Approach Look at the difference in the object values as the

value of a virtual object Use the individual consistency technique for this

virtual object

Partitioned Approach For two related objects A and B, dynamically

partition into two parts A and B

A, B inversely proportional to rates of change of A, B Maintain individual consistency constraints for A, B

Page 14: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Outline

Motivation Consistency Semantics Consistency Maintenance Techniques Experimental Evaluation Related Work Concluding Remarks

Page 15: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Workload Characteristics

Workloads for Temporal Domain Consistency

Trace

CNN Financial News Briefs

NY Times News (AP)

NY Times News (Reuters)

Guardian Breaking News

Avg. Update

Frequency

26.0 min

11.6 min

4.9 min

20.3 min

Stock Name Number of updates

AT&T

Yahoo

653

2204

Workloads for Value Domain Consistency

Page 16: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Performance Metrics

Fidelity The fraction of time the proxy is able to maintain the

consistency guarantee

Number of polls Network overhead

Goal: High fidelity at a low network overhead

Page 17: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Efficacy of the LIMD approach

Significant reduction in number of polls for stringent consistency requirements

Allows a tradeoff between number of polls and fidelity

0

500

1000

1500

2000

2500

3000

0 10 20 30 40 50 60

Number of polls, CNN/FN trace

LIMD ApproachBaseline Approach

Nu

mb

er o

f p

olls

Delta consistency constraint (min)

0

0.2

0.4

0.6

0.8

1

0 10 20 30 40 50 60

Fidelity, CNN/FN trace

LIMD ApproachBaseline Approach

Fid

elit

y

Delta consistency constraint (min)

Page 18: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Adaptive behavior of LIMD approach

Can track the rate of change of object at server

0

10

20

30

40

50

60

70Duration between polls

Du

rati

on

bet

wee

n p

olls

(min

)Time

1 pm 9 pm 5 am 1 pm 9 pm 5 am 0

2

4

6

8

10

12

Nu

mb

er o

f u

pd

ates

per

2 h

ou

rs

Update frequency

1 pm 9 pm 5 am 1 pm 9 pm 5 am

Time

CNN/FN trace, Delta = 10 min

Page 19: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Mutual Consistency in Time Domain

Our heuristic can provide high fidelity with a moderate increase in number of polls

0

100

200

300

400

500

600

0 5 10 15 20 25 30

Number of polls, Delta=10min

LIMD : Poll SelectLIMD : Poll AllBaseline LIMD

Nu

mb

er o

f p

olls

Mutual consistency constraint (min)

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 25 30

Fidelity, Delta=10 min

LIMD : Poll SelectLIMD : Poll AllBaseline LIMD

Fid

elit

y

Mutual consistency constraint (min)

Page 20: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Mutual Consistency in Value Domain

Can track changing object values effectively

130

135

140

145

150

2600 2650 2700 2750 2800 2850 2900

Virtual Object Approach, Delta=$2.5

ServerProxyD

iffe

ren

ce in

sto

ck p

rice

s ($

)

Time (sec)

Page 21: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Related Work

Consistency mechanisms for individual objects: Weak consistency

• Time To Live values• Adaptive TTR: Srinivasan 1998• Periodic Polling: Cao 1997

Strong consistency• Client Polling: Yin 1999• Server Invalidation: Cao 1997• Adaptive Leases: Duvvuri 2000

Page 22: Maintaining Mutual Consistency for Cached Web Objects

Computer Science

Summary

Identified the need for mutual consistency techniques

Adaptive approaches for providing consistency guarantees

Showed small incremental cost of providing mutual consistency guarantees

URL: http://lass.cs.umass.edu/projects/broadway