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
Small Data: Databases in the Real World
Search
Andrew Godwin
August 04, 2014
Programming
2
630
Small Data: Databases in the Real World
A talk I gave at PyCon AU 2014.
Andrew Godwin
August 04, 2014
Tweet
Share
More Decks by Andrew Godwin
See All by Andrew Godwin
Reconciling Everything
andrewgodwin
1
360
Django Through The Years
andrewgodwin
0
270
Writing Maintainable Software At Scale
andrewgodwin
0
490
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
390
Async, Python, and the Future
andrewgodwin
2
710
How To Break Django: With Async
andrewgodwin
1
770
Taking Django's ORM Async
andrewgodwin
0
760
The Long Road To Asynchrony
andrewgodwin
0
740
The Scientist & The Engineer
andrewgodwin
1
810
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
120
ゆくKotlin くるRust
exoego
1
210
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
820
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
Deno Tunnel を使ってみた話
kamekyame
0
340
AgentCoreとHuman in the Loop
har1101
5
190
CSC307 Lecture 05
javiergs
PRO
0
480
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
260
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
1.9k
Vibe codingでおすすめの言語と開発手法
uyuki234
0
190
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.6k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
330
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Between Models and Reality
mayunak
1
170
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
150
The Spectacular Lies of Maps
axbom
PRO
1
440
Skip the Path - Find Your Career Trail
mkilby
0
44
The Curious Case for Waylosing
cassininazir
0
220
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
84
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.5k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
82
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
Transcript
Andrew Godwin @andrewgodwin SMALL DATA REAL WORLD DATABASES IN THE
Andrew Godwin Core Developer Senior Engineer
BIG DATA What does it mean? What is 'big'?
1,000 rows? 1,000,000 rows? 1,000,000,000 rows? 1,000,000,000,000 rows?
Scalable designs are a tradeoff: NOW LATER vs
Small company? Agency? Focus on ease of change, not scalability
You don't need to scale from day one But always
leave yourself scaling points
Rapid development Continuous deployment Hardware choice Scaling 'breakpoints'
Rapid development It's all about schema change overhead
Explicit Schema ID int Name text Weight uint 1 2
3 Alice Bob Charles 76 84 65 Implicit Schema { "id": 342, "name": "David", "weight": 44, }
Silent Failure { "id": 342, "name": "David", "weight": 74, }
{ "id": 342, "name": "Ellie", "weight": "85kg", } { "id": 342, "nom": "Frankie", "weight": 77, } { "id": 342, "name": "Frankie", "weight": -67, }
Continuous deployment It's 11pm. Do you know where your locks
are?
Add NULL and backfill 1-to-1 relation and backfill DBMS-supported type
changes
Hardware choice ZOMG RUN IT ON THE CLOUD
VMs are TERRIBLE at IO Up to 10x slowdown, even
with VT-d.
Memory is king Your database loves it. Don't let other
apps steal it.
Adding more power goes far Especially with PostgreSQL or read-only
replicas
None
Sharding point Vertical split Consistency leeway
Sharding point Datasets paritioned by primary key
Migration plan Implement consistent hashing on primary key Make large
number of logical shards (2048?) Map logical shards to single physical shard Migrate shards using replication
Vertical split Entirely unrelated tables
Migration plan Replicate database to new server Route split tables
there, disable replication - or - Slowly backfill new datastore with fallback lookup
Denormalisation It's not free!
Migration plan Add NULL fields to dependent tables App code
to fetch and fill if not present Possibly prefill on save of new items
Consistency leeway Can you take inconsistent views?
Migration plan Change your site! Talk to your designers! Deliberately
introduce inconsistency!
Big Data isn't one thing It depends on type, size,
complexity, throughput, latency...
Focus on the current problems Future problems don't matter if
you never get there
Efficiency and iterating fast matters The smaller you are, the
more time is worth
Good architecture affects product You're not writing a system in
a vacuum
Thanks! Andrew Godwin @andrewgodwin
[email protected]
are hiring!