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
Nosql - getting over the bad parts
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
David Dahl
March 04, 2013
Programming
120
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Nosql - getting over the bad parts
Talk held at Scandinavian Developer Conference in Gothenburg
David Dahl
March 04, 2013
More Decks by David Dahl
See All by David Dahl
Building a real time analytics engine in JRuby
effata
1
550
Other Decks in Programming
See All in Programming
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
160
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.7k
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
2
300
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.9k
MIZARU@SPAJAM2026 第二回予選
1901drama
0
100
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
110
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
380
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
200
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
730
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
110
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
0
340
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
0
410
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
920
How to build a perfect <img>
jonoalderson
1
6k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
970
Agile that works and the tools we love
rasmusluckow
331
22k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Paper Plane
katiecoart
PRO
2
53k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
720
Building a Scalable Design System with Sketch
lauravandoore
463
34k
KATA
mclloyd
PRO
35
15k
Transcript
“nosql” Getting over the bad parts David Dahl @effata
Rant
Overview ‣ Real life lessons ‣ Production systems ‣ Write
heavy ‣ MongoDB ‣ Redis ‣ Cassandra
generic ‣ Took a DB class? - Forget everything you
learned! ‣ Denormalize all the things - Up to a limit ‣ Consistency is your responsibility ‣ Primary keys - Give them a lot of thought
None
{ "_id" : ObjectId("51235a80472689978000004e"), "access" : { "admin": ['some_app'], "deep_access":
{ "another_level": 1 } }, "apps" : [ 'some_app', 'some_other_app' ], "created_at" : ISODate("2012-07-23T13:31:17Z"), "email" : "
[email protected]
", "state" : "active" }
Default behaviour Reckless writes
Brutally Slow Object Notation
Quite the complex beast Sharding
Global Write Lock Really? ... Actually, not anymore.
Deleting stuff
Good stuff ‣ Replication - It just works, and it
works REALLY well - rs.init(), rs.add(“second.node”) ‣ Schemaless + secondary indexes - Add whatever, query however ‣ Javascript CLI - db.find({name: “Clive”, birthdate: {$gte: ISODate(“1975-05-01”)}})
None
‘some/arbitary/key’ => ‘string’ {‘single_level’: ‘hash’} [‘list’, ‘of’, ‘items’] Set(‘a’, ‘b’)
Moar memory! In memory database
Single threaded a.k.a That 30s list command i just ran
blocked the entire production system (that totally never happened)
Persistance ‣ RDB - point in time snapshot - Entire
process forks. - Enable overcommit memory! ‣ AOF - write log - Very slow on startup ‣ AOF has higher priority on startup - Enable at runtime or loose stuff ‣ Monitor your log files!
No clustering ‣ Only master-slave replication - No failover ‣
Redis sentinel - promising but not ready ‣ Redis cluster - unstable/”not production ready” ‣ Twemproxy
Good stuff ‣ Wicked fast - To a limit ‣
Deletion - not a problem ‣ TTL - on key level
None
row_key column_1 column_2 column_3 row_key value value value row_key column_1
column_4 row_key value value
Dynamo By Amazon Not to be confused with DynamoDB -
by Amazon
Black magic Or maybe I’m just dumb
Extremely java centric Some of you might think thats a
good thing... 1.2 and CQL3 makes things a lot better
Data modeling Spend a lot of time on it!
“No” indexes Secondary indexes only good for low uniqueness (make
your own)
Good stuff ‣ Black magic - Complex, but well made
‣ TTL on rows and columns ‣ Writes scale linearly “to infinity” - Netflix benchmarked 1 million writes/s (EC2)
Thank you @effata
[email protected]