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
51
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
New Intro to Riak
Joel Jacobson
August 21, 2013
More Decks by Joel Jacobson
See All by Joel Jacobson
Microsoft Azure Meetup
joeljacobson
0
75
CRDTs and Eventual Consistency
joeljacobson
0
76
Killing Pigs and Saving Danish Bacon
joeljacobson
0
80
Conflict-Free Replicated Data Types in Eventually Consistent Systems
joeljacobson
0
120
Intro to Riak
joeljacobson
0
97
Other Decks in Technology
See All in Technology
気軽に使える"情報のハブ"としてのNotion活用 〜フロー情報の集積点 と、 Claude Code × Notion AI〜
syucream
1
150
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
240
AIAU_UMEMOGU_ninomiya_slide
ninomiya_ii
0
230
マルチアカウント環境での コーディングエージェントを使った障害調査が大変なので AIエージェントにReadOnly権限を付与してみた / ReadOnly AI Agents for Multi-Account AWS Incident Response
yamaguchitk333
2
110
コミュニティの有益性 ~JAWS Days 2026 での体験を通して~ / The Benefits of a Community ~Through My Experience at JAWS Days 2026~
seike460
PRO
0
150
Oracle Cloud Infrastructure:2026年6月度サービス・アップデート
oracle4engineer
PRO
0
120
SteampipeとExcel Power QueryでAWS構成定義書の作成を自動化する
jhashimoto
0
150
OTel × Datadog で 「AI活用」を計測し、改善に繋げる
shihochan
1
400
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
1.3k
LayerXにおけるセキュリティ管理の現在地と次の一手
tosho
0
240
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
2.3k
手塩にかけりゃいいってもんじゃない
ming_ayami
0
610
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Are puppies a ranking factor?
jonoalderson
1
3.6k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
200
エンジニアに許された特別な時間の終わり
watany
107
250k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
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]