What are common use cases for NoSQL? When should I avoid NoSQL? When is RDBMS just fine?
This presentation, delivered at the GOTO NoSQL Roadshow events in London and Stockholm in November of 2011 by Basho co-founder and COO, Antony Falco, take a no-BS look at the tradeoffs one must make to gain the advantages offered by distributed databases like Riak.
12. Would you trade….
35 years of RDBMS success
for
technology used by a few companies of which
you may have heard?
13. Would you trade….
Two million developers worldwide
for
“It’s a piece of plumbing; it has never been
a root cause of any of our problems.”
Coda Hale, Yammer
18. Lie # 1:
Distributed Systems:
Desirable Properties
Highly Available Fault Tolerant
Low Latency Ops-Friendly
Scalable Predictable
Any new app must use
this newfangled NoSQL.
Wednesday, November 16, 11
19. Lie # 2:
Distributed Systems:
Desirable Properties
Highly Available Fault Tolerant
Low Latency Ops-Friendly
Scalable Predictable
Non-distributed databases
provide these properties.
Wednesday, November 16, 11
20. Lie # 3:
MongoDB Cassandra
CouchDB Riak
Neo4J Voldemort
Words like “distributed”
have “relative” meaning.
21. Lie # 4: The Big One
When really I
I say I want: want:
1. safety 1. speed
2. scale out 2. speed
3. speed 3. speed
The lie developers tell
themselves.
23. REMEMBER
At small scale everything works.
At large scale
things start to
brea
24. RIAK – THE TECHNOLOGY
An open-source, globally distributed database with trade-offs
25. DISTRIBUTE
Replicate client data
to your Riak clusters
anywhere in the world
Clients run Riak
clusters in
Your data centers
26. RIAK DETAILS
Dynamo-inspired
modular – core plus storage (or…)
1) bitcask
2) levelDB
Document-oriented AND key-value
Tunable CAP values
Open-source and commercial
27. BITCASK AND ydir is atomically updated withTRADEOFF st dat
Whe awriteoccurs, thekeTHE LATENCY theloca
n tion of thenewe
still pre nt on disk, but a ne re dswill usethela st ve
se ny w a te rsion a ila
va blein thekeydir. Asw
Tradeoff: Index must fit in memory
me Latency: All ntua re hash lookup . 1 seek
Low
ke
rgeproce sswill e reads =
Re ding ava
a
ve lly movetheold va +
lueissimple a doe
ydir, aTRADEOFF: All a
ndfromthe
, nd
lue
sn’t e r re
ve quiremoretha asingledisk se k. W
n
rewerekeys must fit in memoryposition, a
dthedatausingthefile id, ndsizetha a
e
t rere
elook
turne fro
d
ma ca s, theope ting syste
ny se ra m’sfilesystemre d-a a ca
a he d chema sthisamuch fa r ope
ke ste
29. Who cares about latency?
Sometimes high latency looks like an outage to the end user.
30. Who cares about latency?
I do
I do I do
I do
I do I do
I do I do
I do
I do
I do
31. USE CASES
“We would not have been 1. Cloud Storage (S3)
able to build this application
without node.js and Riak 2. Low-latency interactive
Search.”
apps
Clipboard
3. Smartphone apps
4. CDN
5. Medical
6. Session Store
7. Gaming
8. Mobile Infrastructure
32. STUFF
CO.
Real-time Search
US Retailer Online Inventory
Mochi – casual interactive gaming
Social Media Networks
“REAL-TIME” APPS
Advantages: fast, reliable, scalable. Distribute to a global audience.
33. DANISH HEALTH SERVICES
Advantages: Doctors manage prescriptions from highly-available servers and, soon,
smartphones, 95% cheaper than Oracle, easier to run
34. Telco distributes content to 10 data centers
MULTI-TENANT OBJECT STORAGE
Advantages: build competitive services to Amazon, reliable storage, easy to operate
35. Write to Riak
Next…sync with each other
SMARTPHONE APPS
Advantages: better quality of service for write-intensive smartphone users; reduce
infrastructure costs
37. USE RIAK IF YOU
NEED…
Predictable latency
Predictable scaling profile
Predictable operations
and if data unavailability costs
thousands of $$$’s/minute
or is even more important.
38. DON’T USE RIAK IF
YOU NEED…
Familiar query patterns
Familiar hiring patterns
Familiar operational problems
and if you
don’t have a problem right now.