SPORC: Group Collaboration using Untrusted Cloud Resources

74
SPORC: Group Collaboration using Untrusted Cloud Resources Presented by: Nipun Sehrawat 1

description

SPORC: Group Collaboration using Untrusted Cloud Resources. Presented by: Nipun Sehrawat. Cloud Deployment: Pros & Cons. Focus on user-facing applications Real-time collaboration Concurrent access Anywhere-available Is Cloud suitable? - PowerPoint PPT Presentation

Transcript of SPORC: Group Collaboration using Untrusted Cloud Resources

Page 1: SPORC: Group Collaboration using Untrusted Cloud Resources

1

SPORC: Group Collaboration using Untrusted Cloud Resources

Presented by:Nipun Sehrawat

Page 2: SPORC: Group Collaboration using Untrusted Cloud Resources

2

Cloud Deployment: Pros & Cons

• Focus on user-facing applications– Real-time collaboration– Concurrent access– Anywhere-available

• Is Cloud suitable?Availability, scalability, elasticity, global-accessibilityTrust the cloud providers!

Page 3: SPORC: Group Collaboration using Untrusted Cloud Resources

3

Overall Goals

• Deploy user-facing apps on a cloud– Real-time collaboration– Offline operations– Generic servers

• Deal with untrusted servers– Data confidentiality– Detect misbehavior– Recovery

Page 4: SPORC: Group Collaboration using Untrusted Cloud Resources

4

Design Overview

Server

Client 1 Client N

Server’s role:- Global order of update

messages- Store (encrypted)

history

Update message = “diff” against a particular state in the history

Page 5: SPORC: Group Collaboration using Untrusted Cloud Resources

5

Problem 1: Consistency

Server

Client 1 Client N

Inconsistent State!Diff applied to wrong base file.

Optimistic Update

Page 6: SPORC: Group Collaboration using Untrusted Cloud Resources

6

Solution: Operational Transformation

• OT allows synchronization of states– No locks– Optimistic local updates

Client 1 Client 2

ABCDE ABCDEdelete(2) ACDE delete(4) ABCE

delete(2)delete(4) ACD ACE

Page 7: SPORC: Group Collaboration using Untrusted Cloud Resources

7

Solution: Operational Transformation

• OT allows synchronization of states– No locks– Optimistic local updates

Client 1 Client 2

ABCDE ABCDEdelete(2) ACDE delete(4) ABCE

delete(2)delete(3) ACE ACE

Transform a foreign ops past any new local ops

Page 8: SPORC: Group Collaboration using Untrusted Cloud Resources

8

Problem 2: Malicious Server

Server

Client 1 Client N

- Different Views of the state!- Histories “Forked”

Page 9: SPORC: Group Collaboration using Untrusted Cloud Resources

9

Solution: Fork* Consistency

• Clients send:Update Message + Hash (chain) of its history

• Receiving clients compare with their hash, fork if mismatch.

• Can forks go undetected?

Page 10: SPORC: Group Collaboration using Untrusted Cloud Resources

10

Fork* Consistency

Client 1 Client 2

1

2

3

1

2

3

1

2

3 4

1

2

3 5

Some other client generates OP 4 and 5.Server forks states of client 1 and client 2

Fork detected as soon as these clients interactwith some other client

1

2

3 4 5Correct history:

Page 11: SPORC: Group Collaboration using Untrusted Cloud Resources

11

Is Fork* Consistency good enough?

• What about banking operations?

Account information maintained on two machines

Hack the server to fork their states

Withdraw $10K from both machines

Balance in account : $10K

Page 12: SPORC: Group Collaboration using Untrusted Cloud Resources

12

Detailed Design

Invariant 1: Local Coherence

Page 13: SPORC: Group Collaboration using Untrusted Cloud Resources

13

Detailed Design

Invariant 2: Fork* consistency

Page 14: SPORC: Group Collaboration using Untrusted Cloud Resources

14

Detailed Design

Invariant 3: Client-Order preservation

Page 15: SPORC: Group Collaboration using Untrusted Cloud Resources

15

Detailed Design

Committed History = Base FileUpdate message = Diff wrt a Committed History

Page 16: SPORC: Group Collaboration using Untrusted Cloud Resources

16

Membership Management

New Shared KeyShared Key (for efficiency)

- Old key needed to decrypt updates encrypted using it (new clients)

- Key shared with the new client- New client generates current state from Ops stores at server

Page 17: SPORC: Group Collaboration using Untrusted Cloud Resources

17

Evaluation

• Two configurations:– Unloaded: Single client sending updates– Loaded: Every client sending updates– One server, four machines with multiple clients– Experiments on LAN

• Metrics:– Latency: “In-flight” time– Server throughput– Client time-to-join

Page 18: SPORC: Group Collaboration using Untrusted Cloud Resources

18

Latency

- “Server processing” increases as broadcast to more clients

- Client overhead nearly constant

- “Client queuing”, “Client processing” increase

- “Server Processing” also increases

Page 19: SPORC: Group Collaboration using Untrusted Cloud Resources

19

Server Throughput

More payload => More processing/packet

More payload => Processing overhead/byte decreases

Page 20: SPORC: Group Collaboration using Untrusted Cloud Resources

20

Related Work

• Venus:– Only for key-value stores– Requires a “core set” of clients to be online– Membership can’t be revoked

• Depot:– Applications-logic for conflict resolution– Client eq. to server, can also tolerate faulty clients

Page 21: SPORC: Group Collaboration using Untrusted Cloud Resources

21

Discussion

• What are a typical requirement of the targeted apps?– Latency?– Bandwidth?

Page 22: SPORC: Group Collaboration using Untrusted Cloud Resources

22

Discussion

• Is the server needed at all?– Limited role:

• Assign increasing sequence number to updates – clients receive updates in the same order (TCP used).

• Store history.

– An alternative architecture?– Timestamp server + P2P communication

• Demerits?• Do all clients receive updates in the same order?

Page 23: SPORC: Group Collaboration using Untrusted Cloud Resources

23

Discussion

• How can server attack availability of the service?

• Any remedies?

Page 24: SPORC: Group Collaboration using Untrusted Cloud Resources

24

Discussion

• A new client has to apply all the operations to get current state. Can we do any better?– Check-pointing

Page 25: SPORC: Group Collaboration using Untrusted Cloud Resources

25

Thank you!

Questions?

Page 26: SPORC: Group Collaboration using Untrusted Cloud Resources

26

Client Time-to-Join

Text-Editor: OT is expensive

2000 pending ops

Key-Value Store: Conflicts only when keys match

More history => More diffs to apply

Page 27: SPORC: Group Collaboration using Untrusted Cloud Resources

27

Towards RobustDistributed Systems

PODC 2000 keynoteProf. Eric Brewer

Presented by:Nipun Sehrawat

Page 28: SPORC: Group Collaboration using Untrusted Cloud Resources

28

Do “classic” Distributed Systems work?

• “Working” DS like WWW, Napster etc are not “classic” DS.– No RPC– No modularity– No distributed objects

Page 29: SPORC: Group Collaboration using Untrusted Cloud Resources

29

Three issues in DS

• Where is the state?

• Consistency vs Availability

• Understanding Boundaries

Page 30: SPORC: Group Collaboration using Untrusted Cloud Resources

30

Where is the state?

• Classic DS:

• Data centers – consistency + availability

• Other locations: primarily for caching state.– Desktops, proxies

• DS shall acknowledge location distinctions

DataComputation

Page 31: SPORC: Group Collaboration using Untrusted Cloud Resources

31

Consistency vs Availability

• Classic DS: focused on ACID transaction semantics– A: Operation performed on all replicas or none– C: After an operation, all replicas end-up in same

state

What can be trade off for better performance and availability?

ACID makes application dev. easier

Page 32: SPORC: Group Collaboration using Untrusted Cloud Resources

32

Consistency vs Availability

• New paradigm: BASE– Basically Available – Soft-state – Eventually Consistent

Page 33: SPORC: Group Collaboration using Untrusted Cloud Resources

33

Brewer’s Conjecture

• Impossible for a web-service to provide following three guarantees simultaneously:– Availability – Non-failing node shall respond to

every received request– Consistency – Replicas updated as if all on a single

node– Partition Tolerance

• CAP theorem: Can have atmost two of these at a time

Page 34: SPORC: Group Collaboration using Untrusted Cloud Resources

34

CAP Theorem

ConsistencyAvailability

Tolerance to n/w Partitions

- Single-site clustered database- Can user 2-Phase Commit

Page 35: SPORC: Group Collaboration using Untrusted Cloud Resources

35

CAP Theorem

ConsistencyAvailability

Tolerance to n/w Partitions

- No replication or Quorum- Don’t reply if response misses from a data-node- Distributed databases

Page 36: SPORC: Group Collaboration using Untrusted Cloud Resources

36

CAP Theorem

ConsistencyAvailability

Tolerance to n/w Partitions

- Easiest!- Just reply with available data- DNS

Page 37: SPORC: Group Collaboration using Untrusted Cloud Resources

37

The DQ Principle

• For a given node: (Data/query) * (Query/sec) is constant

• What can a fault affect?

Page 38: SPORC: Group Collaboration using Untrusted Cloud Resources

38

Discussion

• How does SPORC tries to address:– Availability?– Consistency?– Partitions?

• Can a wide-area distributed database have both high consistency & availability?

• How can we make up for the lost consistency?

Page 39: SPORC: Group Collaboration using Untrusted Cloud Resources

Cumulus: Filesystem backup on Cloud

Michael Vrable, Stefan Savage, Geoffrey Voelker

Page 40: SPORC: Group Collaboration using Untrusted Cloud Resources

Background

Page 41: SPORC: Group Collaboration using Untrusted Cloud Resources

Background

Page 42: SPORC: Group Collaboration using Untrusted Cloud Resources

Backup on Cloud

• Simple

• Reliable

• Easy off-site storage

Page 43: SPORC: Group Collaboration using Untrusted Cloud Resources

What are the monetary cost of backup on cloud?

Page 44: SPORC: Group Collaboration using Untrusted Cloud Resources

Thin vs Thick cloud

Thick cloud: Highly integrated serviceoGreater performance and EfficiencyoReduced flexibilityoLocking customers

Thin cloud: Build on top of generic layer

oMinimal interfaceoPortableoAdditional overhead

Page 45: SPORC: Group Collaboration using Untrusted Cloud Resources

Thin vs Thick cloud

What is the right choice?

What is the penalty of using a thin cloud service?

Can one build competitive product economy around a cloud of abstract commodity resources or do underlying technical reasons ultimately favor an integrated service-oriented infrastructure?

Page 46: SPORC: Group Collaboration using Untrusted Cloud Resources

Cumulus

Filesystem backup on cloud designed under a thin cloud

Motivation:Explore thin-cloud vs thick-cloud trade-off in the context of backup

Page 47: SPORC: Group Collaboration using Untrusted Cloud Resources

Cumulus

• Cloud based backup systemoReliableoEasy offsite storage

• Portable

• Tuned for cost

Page 48: SPORC: Group Collaboration using Untrusted Cloud Resources

Prior work

Page 49: SPORC: Group Collaboration using Untrusted Cloud Resources

Design

• Storage Server Interface• Snapshot format• Storage Segment• Sub-file incremental• Segment Cleaning• Restoring

Page 50: SPORC: Group Collaboration using Untrusted Cloud Resources

Storage Server Interface

• Minimal interface: get, put, list, delete

• Operates on entire files

• Write once storage model

Page 51: SPORC: Group Collaboration using Untrusted Cloud Resources

Snapshot formatSnapshot Descriptor

Date: Day1Root: A/0Segments: A B

Page 52: SPORC: Group Collaboration using Untrusted Cloud Resources

Snapshot format

Page 53: SPORC: Group Collaboration using Untrusted Cloud Resources

Snapshot format

What are the benefits of this format?

Page 54: SPORC: Group Collaboration using Untrusted Cloud Resources

Storage Segment

Page 55: SPORC: Group Collaboration using Untrusted Cloud Resources

Storage Segment

What are the benefits of grouping data together into segments?

Is there any downside to grouping data into segments?

Page 56: SPORC: Group Collaboration using Untrusted Cloud Resources

Sub-File incrementals

Is the design of Cumulus suitable for incremental changes?

Page 57: SPORC: Group Collaboration using Untrusted Cloud Resources

Removing old snapshot

Page 58: SPORC: Group Collaboration using Untrusted Cloud Resources

Segment Cleaning

Page 59: SPORC: Group Collaboration using Untrusted Cloud Resources

Segment Cleaning

Page 60: SPORC: Group Collaboration using Untrusted Cloud Resources

Segment Cleaning

Page 61: SPORC: Group Collaboration using Untrusted Cloud Resources

Segment Cleaning

Page 62: SPORC: Group Collaboration using Untrusted Cloud Resources

Segment Cleaning

How do we decide when to clean a segment?

What other approaches can be taken to reduce space wastage?

Page 63: SPORC: Group Collaboration using Untrusted Cloud Resources

Alternative Scheme

If a new snapshot is refers to an object in less utilized segment, create copies of that data.

Page 64: SPORC: Group Collaboration using Untrusted Cloud Resources

Segment Cleaning

• Clean based on utilization of a segment outilization threshold = 0; no cleaningoutilization threshold = 1; aggressive cleaning with 100% utilization

• What is the right threshold?

Page 65: SPORC: Group Collaboration using Untrusted Cloud Resources

Evaluation

• Trace based simulationo A fileserver trace : research group settingo A user trace : home setting

• Simulator models the process of backing upo Tracks storage, network and segment overheado Single and multi snapshot scenario

• Optimal baselineo No more data is stored or transferred than neededo Transfers entire content of the file if any part

changeso Stores only one copy if multiple files have same

hash

Page 66: SPORC: Group Collaboration using Untrusted Cloud Resources

Is cleaning necessary?

Optimal => No space wastage

Page 67: SPORC: Group Collaboration using Untrusted Cloud Resources

Average Daily storage plot

• Larger segment size => larger overhead• Too little cleaning => larger overhead• Too aggressive cleaning => larger overhead

Page 68: SPORC: Group Collaboration using Untrusted Cloud Resources

Cleaning Policies

Breakdown of storage overhead when using 16 MB

Page 69: SPORC: Group Collaboration using Untrusted Cloud Resources

Average daily upload

• Larger segment size => larger n/w overhead• Increasing threshold => increases n/w overhead

Page 70: SPORC: Group Collaboration using Untrusted Cloud Resources

Restoring from Backup

• Complete restoreoExtract all filesoGet the root snapshot descriptoroDownload all segments referenced

• Partial restoreoRecover small number of filesoDownload segments with metadata of snapshot

oLocate segments containing file data

Page 71: SPORC: Group Collaboration using Untrusted Cloud Resources

Evaluation

What is the penalty of using a thin cloud service?

What are the monetary cost of using remote backup?

What are the additional benefits?

How does this prototype perform?

Page 72: SPORC: Group Collaboration using Untrusted Cloud Resources

Paying for remote backup

Page 73: SPORC: Group Collaboration using Untrusted Cloud Resources

Prototype evaluation

• Prototype built on Amazon S3• Cost comes to $0.19 / per month for

1.26 GB of data storage• Parameters can be tuned to minimize

cost• Comparing it to existing tools : Brackup

and Jungle DiskoBoth will have much higher operation cost

• Thick cloud solutionsoMozy: integrated solutiono$4 + 0.5 / per GB per month 

Page 74: SPORC: Group Collaboration using Untrusted Cloud Resources

Thank you!