Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
New Intro to Riak
Search
Joel Jacobson
August 21, 2013
Technology
1
45
New Intro to Riak
Joel Jacobson
August 21, 2013
Tweet
Share
More Decks by Joel Jacobson
See All by Joel Jacobson
Microsoft Azure Meetup
joeljacobson
0
72
CRDTs and Eventual Consistency
joeljacobson
0
71
Killing Pigs and Saving Danish Bacon
joeljacobson
0
76
Conflict-Free Replicated Data Types in Eventually Consistent Systems
joeljacobson
0
110
Intro to Riak
joeljacobson
0
86
Other Decks in Technology
See All in Technology
InsightX 会社説明資料/ Company deck
insightx
0
210
Raycast AI APIを使ってちょっと便利なAI拡張機能を作ってみた
kawamataryo
1
250
NOT A HOTEL SOFTWARE DECK (2025/11/06)
notahotel
0
3.3k
AIでデータ活用を加速させる取り組み / Leveraging AI to accelerate data utilization
okiyuki99
6
1.8k
Mackerelにおけるインシデント対応とポストモーテム - 現場での工夫と学び
taxin
0
110
プロダクト開発と社内データ活用での、BI×AIの現在地 / Data_Findy
sansan_randd
1
830
今のコンピュータ、AI にも Web にも 向いていないので 作り直そう!!
piacerex
0
660
設計に疎いエンジニアでも始めやすいアーキテクチャドキュメント
phaya72
27
19k
Data Engineering Guide 2025 #data_summit_findy by @Kazaneya_PR / 20251106
kazaneya
PRO
8
1.5k
短期間でRAGシステムを実現 お客様と歩んだ生成AI内製化への道のり
taka0709
1
190
CloudComposerによる大規模ETL 「制御と実行の分離」の実践
leveragestech
0
190
Logik: A Free and Open-source FPGA Toolchain
omasanori
0
150
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
4.9k
The Invisible Side of Design
smashingmag
302
51k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
192
56k
Thoughts on Productivity
jonyablonski
72
4.9k
Optimizing for Happiness
mojombo
379
70k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
How to train your dragon (web standard)
notwaldorf
97
6.3k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Speed Design
sergeychernyshev
32
1.2k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Transcript
Introduction to Riak 2013
Who am I? Joel Jacobson Technical Evangelist @Basho @joeljacobson
Distributed computing is hard COncurrency scaLIng Latency consIstency avaILabILIty MuLtI
Tenancy faILover SLA’s
What is Riak? Key Value store + extras Distributed /
Horizontally Scalable Fault Tolerant Highly available built for the web
inspired by amazon dynamo white paper released to describe a
database system to be used for their shopping cart Masterless, peer coordinated replication Consistent Hashing Eventually Consistent
Riak Key-value store Simple operations; GET, PUT, DELETE Value is
Opaque, with metadata Extras; Secondary indexes MapReduce full text search
Horizontal Scalability Near linear Scalability Query load and data are
spread evenly Add more nodes and get more; Ops/second storage capacity compute power (mapreduce)
Fault tolerant no Single point of failure (SPOF) All Data
is replicated CLusters self heal; Handoff, Active Anti Entropy cluster transparently survives Node Failure Network partition
Highly Available Any Node Can Serve Client requests Fallbacks are
used when nodes are down Always available for read and write requests Per-request quorums
Quorums n = 3 r / w = 2 R
= 1 - faster response time, less likely consistent r = all - slower response, greater consistency
the ring
Replication replicated to 3 nodes by default (n_val , which
is configurable)
Node fails Request goes to fallback Handoff - data retuned
to recovered node X X X X X X X X hash(“user_id”) Disaster scenario
Automatically repair inconsistencies in data runs as a background process
or Can be configured as a manual process active anti-entropy
Network partitions or concurrent actors modifying the same data Riak
provides two solutions to manage this: Last Write Wins Vector Clocks Conflict resolution
Vector Clocks Every node has an ID Send last-seen vector
clock in every “put” request Can be viewed as ‘commit history’ e.g. Git Lets you decide conflicts
sibling creation 0 3 2 1 Object v1 Object v1
0 3 2 1 Object v1 Siblings can be created by: Simultaneous writes Anti-entropy [{a,3}] [{a,2},{b,1}] [{a,3}] Object v1 Object v1 [{a,2},{b,1}]
storage backends Bitcask Leveldb memory multi
bitcask A fast, append-only key-value store Key space must fit
in memory Suitable for bounded data, e.g. reference data
Leveldb Append-only for very large data sets multiple levels Allows
for more advanced querying (2i) includes compression (Snappy algorithm) Suitable for unbounded data
memory Data is never persisted to disk Definable memory limits
per vnode Configurable object expiry Useful for highly transient data supports secondary indexes
multi Configure multiple storage engines for different types of data
Choose storage engine on per bucket basis
clients apis Protocol Buffers REST based HTTP Interface
client libraries Client libraries supported by Basho: Community supported languages
and frameworks: C/C++, Clojure, Common Lisp, Dart, Django, Go, Grails, Griffon, Groovy, Haskell, .NET, Node.js, OCaml , Perl, PHP, Play, Racket, Scala, Smalltalk
Using Riak as datastore for all back-end systems supporting Angry
Birds Game-state storage, ID/Login, Payments, Push notifications, analytics, advertisements 9 clusters in use with over 100 nodes 263 million active monthly users
Spine2 - storing 80 million+ patient data 500 complex messages
per second 20,000 integrated end points 0% data loss 99.9% availability SLA
Push to talk application Billions of requests daily > 50
dedicated servers Everything stored in Riak
MDC Allows data to be replicated between clusters in different
data centers real-time and full sync uni-directional or bi-directional replication global load-balancing backups
riak-cs S3 compatible object store Supports Objects of Arbitrary Content
Type Up to 5TB multi-tenancy Per-tenant usage data and statistics on network I/O supports MDC
try it? http://docs.basho.com/riak/latest/references/appendices/ community/Sample-Applications/ https://github.com/basho/riak-dev-cluster
thanks
[email protected]