Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
etcd - mission-critical key-value store - OSCON...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Brandon Philips
May 20, 2016
Programming
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
etcd - mission-critical key-value store - OSCON 2016
Brandon Philips
May 20, 2016
Transcript
72 slides
Brandon Philips @BrandonPhilips |
[email protected]
etcd - mission-critical key-value store
Demos https://github.com/philips/2016-OSCON-etcd
Uncoordinated Upgrades
... ... ... ... ... ... Unavailable Uncoordinated Upgrades
Motivation CoreOS cluster reboot lock - Decrement a semaphore key
atomically - Reboot and wait... - After reboot increment the semaphore key
3 CoreOS updates coordination
CoreOS updates coordination 3
... CoreOS updates coordination 2
... ... ... CoreOS updates coordination 0
... ... ... CoreOS updates coordination 0
... ... CoreOS updates coordination 0
... ... CoreOS updates coordination 0
... ... CoreOS updates coordination 1
... ... ... CoreOS updates coordination 0
CoreOS updates coordination
Store Application Configuration config
config Start / Restart Start / Restart Store Application Configuration
config Update Store Application Configuration
config Unavailable Store Application Configuration
Requirements Strong Consistency - mutual exclusive at any time for
locking purpose Highly Available - resilient to single points of failure & network partitions Watchable - push configuration updates to application
Requirements CAP - We want CP - We want something
like Paxos
Common problem GFS Paxos Big Table Spanner CFS Chubby Google
- “All” infrastructure relies on Paxos
Common problem Amazon - Replicated log powers ec2 Microsoft -
Boxwood powers storage infrastructure Hadoop - ZooKeeper is the heart of the ecosystem
COMMON PROBLEM #GIFEE and Cloud Native Solution
10,000 Stars on Github 250 contributors Google, Red Hat, EMC,
Cisco, Huawei, Baidu, Alibaba...
THE HEART OF CLOUD NATIVE Kubernetes, Cloud Foundry Diego, Project
Calico, many others
ETCD KEY VALUE STORE Fully Replicated, Highly Available, Consistent
PUT(foo, bar), GET(foo), DELETE(foo) Watch(foo) CAS(foo, bar, bar1) Key-value Operations
DEMO play.etcd.io
Runtime Reconfiguration Point-in-time Backup Extensive Metrics etcd Operationality
ETCD v3 Successor of etcd v2
ETCD v3 Better Performance
ETCD v3 More Efficient APIs
Multi-Version Put(foo, bar) Put(foo, bar1) Put(foo, bar2) Get(foo) -> bar2
Multi-Version Put(foo, bar) Put(foo, bar1) Put(foo, bar2) Get(foo, 1) ->
bar
Tx.If( Compare(Value("foo"), ">", "bar"), Compare(Version("foo"), "=", 2), ... ).Then( Put("ok","true")...
).Else( Put("ok","false")... ).Commit() Mini-Transactions
l = CreateLease(15 * second) Put(foo, bar, l) l.KeepAlive() l.Revoke()
Leases
w = Watch(foo) for { r = w.Recv() print(r.Event) //
PUT print(r.KV) // foo,bar } Streaming Watch
Synchronization LoC
ETCD v2 machine coordination -> O(10k)
ETCD v3 app/container coordination -> O(1M)
Performance 1K keys
Performance Snapshot caused performance degradation etcd2 - 600K keys
Performance etcd2 - 600K keys Snapshot triggered elections
ZooKeeper Performance Non-blocking full snapshot Efficient memory management
Performance ZooKeeper default
Performance Snapshot triggered election ZooKeeper default
Performance Snapshot ZooKeeper default
Performance GC ZooKeeper snapshot disabled
Reliable Performance - Similar to ZooKeeper with snapshot disabled -
Incremental snapshot - No Garbage Collection Pauses - Off-heap storage
Performance etcd3 /ZooKeeper snapshot disabled
Performance etcd3 /ZooKeeper snapshot disabled
Memory 10GB 2.4GB 0.8GB 512MB data - 2M 256B keys
Reliability 99% at small scale is easy - Failure is
infrequent and human manageable 99% at large scale is not enough - Not manageable by humans 99.99% at large scale - Reliable systems at bottom layer
HOW DO WE ACHIEVE RELIABILITY WAL, Snapshots, Testing
Write Ahead Log Append only - Simple is good Rolling
CRC protected - Storage & OSes can be unreliable
Snapshots Torturing DBs for Fun and Profit (OSDI2014) - The
simpler database is safer - LMDB was the winner Boltdb an append only B+Tree - A simpler LMDB written in Go
Testing Clusters Failure Inject failures into running clusters White box
runtime checking - Hash state of the system - Progress of the system
Testing Cluster Health with Failures Issue lock operations across cluster
Ensure the correctness of client library
TESTING CLUSTER dash.etcd.io
etcd/raft Reliability Designed for testability and flexibility Used by large
scale db systems and others - Cockroachdb, TiKV, Dgraph
etcd vs others Do one thing
etcd vs others Only do the One Thing
etcd vs others Do it Really Well
etcd Reliability Do it Really Well
ETCD v3.0 BETA Efficient and Scalable
BETA AVAILABLE TODAY github.com/coreos/etcd
FUTURE WORK Proxy, Caching, Watch Coalescing, Secondary Index
GET INVOLVED github.com/coreos/etcd
The smartest way to run your container infrastructure. tectonic.com @tectonic
QUAY Secure hosting for private Docker repositories quay.io @quayio
Brandon Philips @BrandonPhilips |
[email protected]
etcd - mission-critical key-value store
Thank you!
More Decks by Brandon Philips
See All by Brandon Philips
Node.js Workflow with Minikube and Skaffold
philips
0
310
Manage the App on Kubernetes
philips
0
390
Production Backbone Monitoring Containerized Apps
philips
0
260
KubeCon EU 2017: Dancing on the Edge of a Volcano
philips
1
900
rkt - KubeCon EU keynote - 2017
philips
1
330
FOSDEM_Keynote_2017-_.pdf
philips
0
190
Tectonic Summit Day 2 Keynote
philips
0
440
Kubernetes: Simple to Manage Anywhere (self-hosted, Tectonic upgrade demo)
philips
0
470
KubeCon Keynote 2016- Distributed Systems Simplified on Kubernetes
philips
2
610
Other Decks in Programming
See All in Programming
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
120
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
300
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
210
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
220
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
260
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
430
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.3k
オーケストレーション記述言語 Katari
yukikurage
0
250
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
120
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.9k
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
470
The Mindset for Success: Future Career Progression
greggifford
PRO
0
560
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
350
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
800
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.7k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
1
300
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
980
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
330
Paper Plane (Part 1)
katiecoart
PRO
3
12k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
300