Presentation I about Riak/future-of-Riak at the Seattle Scalability meetup in August 2013. Note: slides are designed for presentation and miss context without me talking.
Joseph Blomstedt (@jtuple)Basho TechnologiesSeattle Scalability MeetupAugust 2013
View Slide
2Joe Blomstedt
3Senior Engineer
4[email protected]
5@jtuple
6
7
8Open Source
9Open SourceApache 2github.com/basho
10
11Multi-DC ReplicationSupport
Riak Basics12
13
14Key / ValueSecondary IndexesFull Text SearchMap/ReduceCounters
15Key / ValueSecondary IndexesFull Text SearchMap/ReduceCounters
16PUTGETDELETE
17users/joePUT
18users/joeGET
19users/joeDELETE
20Key / ValueSecondary IndexesFull Text SearchMap/ReduceCounters
21user/1234PUT{first: “John”,last: “Doe”,age: 40}
22user/1234PUT{first: “John”,last: “Doe”,age: 40}first_bin: “John”last_bin: “Doe”age_int: 40
23pics/pic42PUTanimal_bin: catcuteness_int: 10
24Tagged FieldsExact/RangeSingle IndexStreamingPagination
25Key / ValueSecondary IndexesFull Text SearchMap/ReduceCounters
26Automatic IndexingJSONXMLTextCustom
27QueryingExact MatchWildcardRange
28QueryingGroupingPrefix matchingTerm Boosting
29QueryingANDORNOT
30Key / ValueSecondary IndexesFull Text SearchMap/ReduceCounters
31Use CasesFilteringAggregationExtraction
32M/R InputKnown Keys2nd Index QueryFull Text Query
33DistributedMappers: data nodesReducers: coordinator
34Key / ValueSecondary IndexesFull Text SearchMap/ReduceCounters
35Why do peopleuse Riak?
Big Data36
Big Data37ScalableDistributed
Big Data385 nodes100 nodes
Critical Data39
Critical Data40BigMediumsmall
Fault Tolerance41
Availability42
CAP Theorem43
44Partition-toleranceConsistencyAvailability
45Partition-toleranceConsistency Availability
46Partition-toleranceConsistency AvailabilityCP AP
47Partition-toleranceConsistency AvailabilityCP AP
48C/PStrict Quorum A/PSloppy Quorum A/P
49C/PStrict Quorum A/PSloppy Quorum A/P
50Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
51Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
52Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
53Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
54C/PStrict Quorum A/PSloppy Quorum A/P
55Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
56Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
57Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
58Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
59C/PStrict Quorum A/PSloppy Quorum A/P
60Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
61Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
62Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
63Node 1 Node 2 Node 3 Node 4 Node 5client clientclient
64Node 1 Node 2 Node 3 Node 4 Node 5client clientclient client client
Eventual Consistency65
66A A A
67A A A
68A A AB
69A A AB
70A A ABB B B
71A A A
72A A AB C
73A A AB C
74A A AB{B,C} {B,C} {B,C}C
75Write OnceImmutableLast Write WinsBusiness RulesCRDTs/Monotonicity
76Write OnceImmutableLast Write WinsBusiness RulesCRDTs/Monotonicity
77Write OnceImmutableLast Write WinsBusiness RulesCRDTs/Monotonicity
78Write OnceImmutableLast Write WinsBusiness RulesCRDTs/Monotonicity
79Write OnceImmutableLast Write WinsBusiness RulesCRDTs/Monotonicity
80Write OnceImmutableLast Write WinsBusiness RulesCRDTs/Monotonicity
81Write OnceImmutableLast Write WinsBusiness Rules“Set Union”
82{1} {1} {1}
83{1} {1} {1}
84{1} {1} {1}{1,2} {1,3} {1,2,4}
85{1} {1} {1}{1,2} {1,3} {1,2,4}
86{1} {1} {1}{1,2}{1,2,3,4} {1,2,3,4} {1,2,3,4}{1,3} {1,2,4}
Clustering87
88Consistent HashingSloppy QuorumsHinted Handoff
890 2160
9002160
91
92Node 2Node 1Node 3
93Node 2Node 1Node 3Node 4
94Node 2Node 1Node 3Node 4SHA1(Key)
95Node 2Node 1Node 3Node 4SHA1(Key)primaryreplicas
96Node 2Node 1Node 3Node 4primary+fallbackreplicas
97Node 2Node 1Node 3Node 4handoff
Self Healing98
99Here Today!=Here Tomorrow
100Read Repair
101Active Anti Entropy
102Node 2Node 1Node 3Node 4AAE exchange
103Active Anti EntropyRealtimePersistentRebuilt Weekly
Upcoming104
105Data Types (CRDTs)Strong Consistency (C/P)Solr Integration
CRDTs106
107
108
109CountersSetsMaps
110CountersSetsMaps
1111 1 1
1121 1 1
1131 1 12 4+1 +3
1141 1 12 4+1 +3
1151 1 12{2,4} {2,4} {2,4}4+1 +3
116(a,1) (a,1) (a,1)
117(a,1) (a,1) (a,1)
118(a,1)+1 +3(a,1) (a,1)(a,2) (a,1),(b,3)
119(a,1)+1 +3(a,1) (a,1)(a,2) (a,1),(b,3)
120(a,1)+1 +3(a,1) (a,1)(a,2) (a,1),(b,3)(a,2),(b,3) (a,2),(b,3) (a,1),(b,3)
121(a,1)+1 +3(a,1) (a,1)(a,2) (a,1),(b,3)(a,2),(b,3) (a,2),(b,3) (a,1),(b,3)=5
122CountersSetsMaps
123CountersSetsMaps
Consistency124
125A/P or C/PPer Bucket Choice
126Single KeyOptimistic CASCounters/Sets/Maps
127Multi PaxosDisjoint EnsemblesScalable
Node 2Node 1Node 3
1291 234567123
1301 234567123234
1311 234567123234345
1321 234567123234345456
1331 234567123234345456567...
1341 234567123Ensembles234345456567...
135EnsembleIndepedent Paxos GroupLeader ElectionSerializability
136write 2111write 2leader
137write 2222write 2leader2X
138333write 3leader3
139333leader
140+1111+1leader
141222+1leader2
142333leader3
143333leader
Riak + Solr144
145Next Generation SearchFull Distributed SolrEmbedded in RiakActive Anti Entropy
End146
147We hiring!
ricon.io
Questions?151