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
640
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
370
Django Through The Years
andrewgodwin
0
290
Writing Maintainable Software At Scale
andrewgodwin
0
500
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
400
Async, Python, and the Future
andrewgodwin
2
720
How To Break Django: With Async
andrewgodwin
1
780
Taking Django's ORM Async
andrewgodwin
0
770
The Long Road To Asynchrony
andrewgodwin
0
750
The Scientist & The Engineer
andrewgodwin
1
810
Other Decks in Programming
See All in Programming
文字コードの話
qnighy
44
17k
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
670
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
630
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
120
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
210
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
350
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
600
Codex の「自走力」を高める
yorifuji
0
1k
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
360
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
210
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
750
株式会社 Sun terras カンパニーデック
sunterras
0
2k
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
150
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
960
Into the Great Unknown - MozCon
thekraken
40
2.3k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
980
Utilizing Notion as your number one productivity tool
mfonobong
4
250
Rails Girls Zürich Keynote
gr2m
96
14k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Crafting Experiences
bethany
1
81
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
61
52k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
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!