Wide-Area Storage Stores: Stores: Stores: Status - - PowerPoint PPT Presentation

wide area storage
SMART_READER_LITE
LIVE PREVIEW

Wide-Area Storage Stores: Stores: Stores: Status - - PowerPoint PPT Presentation

Dont Se$le for Eventual : Scalable Causal Consistency for Wide-Area Storage


slide-1
SLIDE 1

Wya$ ¡Lloyd* ¡ ¡Michael ¡J. ¡Freedman* ¡ ¡ ¡Michael ¡Kaminsky† ¡ ¡ ¡ ¡David ¡G. ¡Andersen‡ ¡

*Princeton, ¡†Intel ¡Labs, ¡‡CMU ¡

Don’t ¡Se$le ¡for ¡Eventual: ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡Scalable ¡Causal ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡Consistency ¡for ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Wide-­‑Area ¡Storage ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡with ¡COPS ¡

slide-2
SLIDE 2

Wide-­‑Area ¡Storage ¡

Stores: ¡ Status ¡Updates ¡ Likes ¡ Comments ¡ Photos ¡ Friends ¡List ¡ Stores: ¡ Tweets ¡ Favorites ¡ Following ¡List ¡ Stores: ¡ Posts ¡ +1s ¡ Comments ¡ Photos ¡ Circles ¡

slide-3
SLIDE 3

Wide-­‑Area ¡Storage ¡

Serves ¡Requests ¡Quickly ¡

slide-4
SLIDE 4

Inside ¡the ¡Datacenter ¡

Web ¡Tier ¡ Storage ¡Tier ¡

A-­‑F ¡ G-­‑L ¡ M-­‑R ¡ S-­‑Z ¡

Web ¡Tier ¡ Storage ¡Tier ¡

A-­‑F ¡ G-­‑L ¡ M-­‑R ¡ S-­‑Z ¡

Remote ¡DC ¡

slide-5
SLIDE 5

Desired ¡ProperXes: ¡ALPS ¡

  • Availability ¡
  • Low ¡Latency ¡
  • ParXXon ¡Tolerance ¡
  • Scalability ¡

“Always ¡On” ¡

slide-6
SLIDE 6

Scalability ¡

Increase ¡capacity ¡and ¡throughput ¡in ¡each ¡datacenter ¡

A-­‑Z ¡ A-­‑Z ¡ A-­‑L ¡ M-­‑Z ¡ A-­‑L ¡ M-­‑Z ¡ A-­‑F ¡ G-­‑L ¡ M-­‑R ¡ S-­‑Z ¡ A-­‑F ¡ G-­‑L ¡ M-­‑R ¡ S-­‑Z ¡ A-­‑C ¡ D-­‑F ¡ G-­‑J ¡ K-­‑L ¡ M-­‑O ¡ P-­‑S ¡ T-­‑V ¡ W-­‑Z ¡ A-­‑C ¡ D-­‑F ¡ G-­‑J ¡ K-­‑L ¡ M-­‑O ¡ P-­‑S ¡ T-­‑V ¡ W-­‑Z ¡

slide-7
SLIDE 7

Desired ¡Property: ¡Consistency ¡

  • Restricts ¡order/Xming ¡of ¡operaXons ¡
  • Stronger ¡consistency: ¡

– Makes ¡programming ¡easier ¡ – Makes ¡user ¡experience ¡be$er ¡

slide-8
SLIDE 8

Consistency ¡with ¡ALPS ¡

Strong ¡ SequenXal ¡ ¡ ¡ ¡ Causal ¡ ¡

¡ ¡ ¡ ¡ ¡

Eventual ¡ ¡ ¡ ¡

Impossible ¡[Brewer00, ¡GilbertLynch02] ¡ Impossible ¡[LiptonSandberg88, ¡AdyaWelch94] ¡ ¡ ¡ ¡ ¡COPS ¡ Amazon ¡ ¡ ¡ ¡LinkedIn ¡ ¡ ¡Facebook/Apache ¡ Dynamo ¡ ¡ ¡Voldemort ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Cassandra ¡

slide-9
SLIDE 9

System ¡ A ¡ L ¡ P ¡ S ¡ Consistency ¡ Sca$er ¡

✖ ¡ ✖ ¡ ✖ ¡ ✔ ¡ ✔ Strong ¡

Walter ¡

✖ ¡ ✖ ¡ ✖ ¡ ? ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡PSI ¡+ ¡Txn ¡

COPS ¡

✔ ¡ ✔ ¡ ✔ ¡ ✔ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Causal+ ¡

Bayou ¡

✔ ¡ ✔ ¡ ✔ ¡ ✖ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Causal+ ¡

PNUTS ¡

✔ ¡ ✔ ¡ ? ¡ ✔ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Per-­‑Key ¡Seq. ¡

Dynamo ¡ ✔ ¡ ✔ ¡ ✔ ¡ ✔ ¡ ✖ ¡ ¡ ¡ ¡ ¡Eventual ¡

slide-10
SLIDE 10

Causality ¡By ¡Example ¡ ¡

¡Remove ¡boss ¡from ¡ ¡ ¡friends ¡group ¡ ¡Post ¡to ¡friends: ¡ ¡ ¡“Time ¡for ¡a ¡new ¡job!” ¡ ¡Friend ¡reads ¡post ¡ Causality ¡( ¡ ¡ ¡ ¡ ¡ ¡ ¡) ¡

Thread-­‑of-­‑ExecuXon ¡ Gets-­‑From ¡ TransiXvity ¡

New ¡Job! ¡

Friends ¡ Boss

slide-11
SLIDE 11

Causality ¡Is ¡Useful ¡

For ¡Programmers: ¡

For ¡Users: ¡

Photo ¡Upload ¡ Add ¡to ¡album ¡ Employment ¡Integrity ¡ ReferenXal ¡Integrity ¡ New ¡Job! ¡

Friends ¡ Boss

slide-12
SLIDE 12

Conflicts ¡in ¡Causal ¡

K=2 ¡ K=1 ¡ K=1 ¡ K=2 ¡ K=1 ¡ K=2 ¡

slide-13
SLIDE 13

Conflicts ¡in ¡Causal ¡

K=2 ¡ K=3 ¡ K=2 ¡ K=3 ¡ K=2 ¡ K=3 ¡

Causal ¡+ ¡Conflict ¡Handling ¡= ¡Causal+ ¡

slide-14
SLIDE 14

Previous ¡Causal+ ¡Systems ¡

  • Bayou ¡‘94, ¡TACT ¡‘00, ¡PRACTI ¡‘06 ¡

– Log-­‑exchange ¡based ¡

  • Log ¡is ¡single ¡serializaXon ¡point ¡

– Implicitly ¡captures ¡and ¡enforces ¡causal ¡order ¡ – Limits ¡scalability ¡OR ¡ – No ¡cross-­‑server ¡causality ¡

slide-15
SLIDE 15

Scalability ¡Key ¡Idea ¡

  • Dependency ¡metadata ¡explicitly ¡captures ¡causality ¡
  • Distributed ¡verificaXons ¡replace ¡single ¡serializaXon ¡

– Delay ¡exposing ¡replicated ¡puts ¡unXl ¡all ¡ ¡ ¡ dependencies ¡are ¡saXsfied ¡in ¡the ¡datacenter ¡

slide-16
SLIDE 16

COPS ¡

Causal+ ¡ ReplicaXon ¡

All ¡ Data ¡

All ¡ Data ¡

All ¡ Data ¡ Client ¡Library ¡ Local ¡Datacenter ¡

slide-17
SLIDE 17

Get ¡

get ¡ Client ¡Library ¡ Local ¡Datacenter ¡

slide-18
SLIDE 18

Put ¡

Client ¡Library ¡ put ¡ put_aver ¡ ? ? ¡

ReplicaXon ¡Q ¡

put ¡ aver ¡

K:V ¡ put ¡ + ¡

  • rdering ¡

metadata ¡ put ¡ aver ¡ ¡= ¡

Local ¡Datacenter ¡

slide-19
SLIDE 19

Dependencies ¡

  • Dependencies ¡are ¡explicit ¡metadata ¡on ¡values ¡
  • Library ¡tracks ¡and ¡a$aches ¡them ¡to ¡put_avers ¡
slide-20
SLIDE 20

Dependencies ¡

  • Dependencies ¡are ¡explicit ¡metadata ¡on ¡values ¡
  • Library ¡tracks ¡and ¡a$aches ¡them ¡to ¡put_avers ¡

put(Key, ¡Val) ¡ put_aver(Key,Val,deps) ¡ version ¡

deps ¡ . ¡. ¡. ¡ ¡ ¡ Kversion ¡

(Thread-­‑Of-­‑ExecuXon ¡Rule) ¡

Client ¡1 ¡

slide-21
SLIDE 21

Dependencies ¡

  • Dependencies ¡are ¡explicit ¡metadata ¡on ¡values ¡
  • Library ¡tracks ¡and ¡a$aches ¡them ¡to ¡put_avers ¡

deps ¡ . ¡. ¡. ¡ ¡ ¡ Kversion ¡ L337 ¡ M195 ¡ ¡

(Gets-­‑From ¡Rule) ¡

get(K) ¡ get(K) ¡ value,version,deps' value ¡

(TransiXvity ¡Rule) ¡ deps' ¡ L337 ¡ M195 ¡

Client ¡2 ¡

slide-22
SLIDE 22

Causal+ ¡ReplicaXon ¡

ReplicaXon ¡Q ¡

put ¡ aver ¡

put_aver(K,V,deps) ¡

K:V,deps ¡

slide-23
SLIDE 23

Causal+ ¡ReplicaXon ¡

put_aver(K,V,deps) ¡ dep_check(L337) ¡

K:V,deps ¡

deps ¡ ¡ ¡ L337 ¡ M195 ¡ ¡

Exposing ¡values ¡aver ¡ dep_checks ¡return ¡ ensures ¡causal+ ¡

slide-24
SLIDE 24

Basic ¡COPS ¡Summary ¡

  • Serve ¡operaXons ¡locally, ¡replicate ¡in ¡background ¡

– “Always ¡On” ¡

  • ParXXon ¡keyspace ¡onto ¡many ¡nodes ¡

– Scalability ¡

  • Control ¡replicaXon ¡with ¡dependencies ¡

– Causal+ ¡Consistency ¡

slide-25
SLIDE 25

Remote ¡ Datacenter ¡

Boss

Portugal! ¡

Gets ¡Aren’t ¡Enough ¡

Remote ¡ Progress ¡ Remote ¡ Progress ¡ Remote ¡ Progress ¡

My ¡ OperaXons ¡ New ¡Job! ¡

Boss

Boss

Portugal! ¡

Boss Boss

New ¡Job! ¡ New ¡Job! ¡

You’re ¡ Fired!! ¡

slide-26
SLIDE 26

Remote ¡ Datacenter ¡

Boss

Portugal! ¡

Gets ¡Aren’t ¡Enough ¡

Boss

Portugal! ¡

Boss Boss

New ¡Job! ¡ New ¡Job! ¡

You’re ¡ Fired!! ¡

Portugal! ¡

Remote ¡ Progress ¡ Remote ¡ Progress ¡ Remote ¡ Progress ¡

My ¡ OperaXons ¡ New ¡Job! ¡

Boss Boss

New ¡Job! ¡ Portugal! ¡

Boss Boss

slide-27
SLIDE 27

Get ¡TransacXons ¡

  • Provide ¡consistent ¡view ¡of ¡mulXple ¡keys ¡

– Snapshot ¡of ¡visible ¡values ¡

  • Keys ¡can ¡be ¡spread ¡across ¡many ¡servers ¡
  • Takes ¡at ¡most ¡2 ¡parallel ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

rounds ¡of ¡gets ¡

  • No ¡locks, ¡no ¡blocking ¡

Low ¡Latency ¡

slide-28
SLIDE 28

Remote ¡ Datacenter ¡

Boss

Portugal! ¡

Get ¡TransacXons ¡

Remote ¡ Progress ¡ Remote ¡ Progress ¡ Remote ¡ Progress ¡

My ¡ OperaXons ¡ New ¡Job! ¡

Boss

Boss

Portugal! ¡

Boss

Portugal! ¡

Boss

New ¡Job! ¡

Portugal! ¡

Remote ¡ Progress ¡ Remote ¡ Progress ¡

Boss

New ¡Job! ¡ Portugal! ¡

Boss Boss Boss

Portugal! ¡ Portugal! ¡

Boss

Portugal! ¡

Boss

New ¡Job! ¡

Boss

Could ¡Get ¡

Never ¡

Boss

New ¡Job! ¡

slide-29
SLIDE 29

System ¡So ¡Far ¡

  • ALPS ¡and ¡Causal+, ¡but ¡… ¡
  • ProliferaXon ¡of ¡dependencies ¡reduces ¡efficiency ¡

– Results ¡in ¡lots ¡of ¡metadata ¡ – Requires ¡lots ¡of ¡verificaXon ¡

  • We ¡need ¡to ¡reduce ¡metadata ¡and ¡dep_checks ¡

– Nearest ¡dependencies ¡ – Dependency ¡garbage ¡collecXon ¡

slide-30
SLIDE 30

Many ¡Dependencies ¡

  • Dependencies ¡grow ¡with ¡client ¡lifeXme ¡

Put ¡ Put ¡ Put ¡ Put ¡ Get ¡ Get ¡

slide-31
SLIDE 31

Nearest ¡Dependencies ¡

  • TransiXvely ¡capture ¡all ¡ordering ¡constraints ¡ ¡
slide-32
SLIDE 32

The ¡Nearest ¡Are ¡Few ¡

  • TransiXvely ¡capture ¡all ¡ordering ¡constraints ¡ ¡
slide-33
SLIDE 33

The ¡Nearest ¡Are ¡Few ¡

  • Only ¡check ¡nearest ¡when ¡replicaXng ¡
  • COPS ¡only ¡tracks ¡nearest ¡
  • COPS-­‑GT ¡tracks ¡non-­‑nearest ¡for ¡transacXons ¡
  • Dependency ¡garbage ¡collecXon ¡tames ¡

metadata ¡in ¡COPS-­‑GT ¡

slide-34
SLIDE 34

Extended ¡COPS ¡Summary ¡

  • Get ¡transacXons ¡

– Provide ¡consistent ¡view ¡of ¡mulXple ¡keys ¡

  • Nearest ¡Dependencies ¡

– Reduce ¡number ¡of ¡dep_checks ¡ – Reduce ¡metadata ¡in ¡COPS ¡

slide-35
SLIDE 35

EvaluaXon ¡QuesXons ¡

  • Overhead ¡of ¡get ¡transacXons? ¡
  • Compare ¡to ¡previous ¡causal+ ¡systems? ¡
  • Scale? ¡
slide-36
SLIDE 36

Experimental ¡Setup ¡

COPS ¡

Remote ¡DC ¡

COPS ¡Servers ¡ Clients ¡ Local ¡Datacenter ¡ N ¡ N ¡ N

slide-37
SLIDE 37

COPS ¡& ¡COPS-­‑GT ¡ CompeXXve ¡for ¡Expected ¡Workloads ¡ ¡

20 40 60 80 100 1 10 100 1000 Max Throughput (Kops/sec) Average Inter-Op Delay (ms) COPS COPS-GT

High ¡per-­‑client ¡ write ¡rates ¡result ¡ in ¡1000s ¡of ¡ dependencies ¡ Low ¡per-­‑client ¡ write ¡rates ¡expected ¡

People ¡tweeXng ¡ 1000 ¡Xmes/sec ¡ People ¡tweeXng ¡ 1 ¡Xme/sec ¡ All ¡Put ¡Workload ¡– ¡4 ¡Servers ¡/ ¡Datacenter ¡

slide-38
SLIDE 38

COPS ¡& ¡COPS-­‑GT ¡ CompeXXve ¡for ¡Expected ¡Workloads ¡ ¡

20 40 60 80 100 1 10 100 1000 Max Throughput (Kops/sec) Average Inter-Op Delay (ms) COPS COPS-GT

Varied ¡Workloads ¡– ¡4 ¡Servers ¡/ ¡Datacenter ¡ Pathological ¡ Expected ¡

Workload ¡

slide-39
SLIDE 39

0.2 0.4 0.6 0.8 1 Pathological High Inter-Op Delay 1:16 Put:Get 1/128 Variance 16KB Values Expected Workload Normalized Throughput LOG COPS COPS-GT

COPS ¡Low ¡Overhead ¡vs. ¡LOG ¡

  • COPS ¡– ¡dependencies ¡≈ ¡LOG ¡
  • 1 ¡server ¡per ¡datacenter ¡only ¡ ¡ ¡
  • COPS ¡and ¡LOG ¡achieve ¡very ¡similar ¡throughput ¡

– Nearest ¡dependencies ¡mean ¡very ¡li$le ¡metadata ¡ – In ¡this ¡case ¡dep_checks ¡are ¡funcXon ¡calls ¡

slide-40
SLIDE 40

COPS ¡Scales ¡Out ¡

20 40 80 160 320 LOG 1 2 4 8 16 COPS 1 2 4 8 16 COPS-GT Throughput (Kops)

slide-41
SLIDE 41

Conclusion ¡

  • Novel ¡ProperXes ¡

– First ¡ALPS ¡and ¡causal+ ¡consistent ¡system ¡in ¡COPS ¡ – Lock ¡free, ¡low ¡latency ¡get ¡transacXons ¡in ¡COPS-­‑GT ¡

  • Novel ¡techniques ¡

– Explicit ¡dependency ¡tracking ¡and ¡verificaXon ¡with ¡ decentralized ¡replicaXon ¡ – OpXmizaXons ¡to ¡reduce ¡metadata ¡and ¡checks ¡

  • COPS ¡achieves ¡high ¡throughput ¡and ¡scales ¡out ¡