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
How Netflix does Failovers in 7 minutes
Search
Amjith
May 12, 2018
Programming
0
690
How Netflix does Failovers in 7 minutes
Amjith
May 12, 2018
Tweet
Share
More Decks by Amjith
See All by Amjith
Awesome Commandline Tools
amjith
0
530
FuzzyFind
amjith
0
95
Awesome Command Line Tools
amjith
1
160
Modern Command Line
amjith
2
350
Introduction to Docker
amjith
8
1.5k
Thread Profiling in Python
amjith
7
860
Python Profiling
amjith
3
360
Statistical Thread Profiler
amjith
1
160
Debugging Live Python Web Applications
amjith
8
1.8k
Other Decks in Programming
See All in Programming
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
2.7k
Advance Your Career with Open Source
ivargrimstad
0
230
iOSDC.pdf
chronos2500
2
640
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
690
フロントエンド開発に役立つクライアントプログラム共通のノウハウ / Universal client-side programming best practices for frontend development
nrslib
7
3.8k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
1.6k
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
2
1.2k
CSC305 Lecture 02
javiergs
PRO
1
260
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
840
defer f()とdefer fの挙動を 誤解していた話
kogamochiduki
2
160
CSC509 Lecture 02
javiergs
PRO
0
400
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
170
Featured
See All Featured
Building Adaptive Systems
keathley
43
2.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
51k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Gamification - CAS2011
davidbonilla
81
5.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
890
Embracing the Ebb and Flow
colly
88
4.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
950
Transcript
None
None
Whoops, something went wrong… Netflix Streaming Error We’re having trouble
playing this title right now. Please try again later or select a different title.
None
None
Cloud Prod Engineering AMJITH RAMANUJAM (@amjithr) Sr. Software Engineer, Traffic
Team
Regional Failover in 7 minutes AMJITH RAMANUJAM (@amjithr) Sr. Software
Engineer, Traffic Team
Regional Standby system takes over when the main system fails
Failover
None
Amazon Web Services Everything else Netflix Open Connect All video
delivery
Regional Failover
Christmas Eve 2012
None
None
None
None
ELB Outage 7 Hours
16,000 years in 1 day content watched ~14,000 BC: First
colonization of America 2018 0 AD 4,600 years in 7 hours
Regional Failover
Active - standby system is also serving traffic Active vs
Passive Passive - standby system is NOT serving traffic
Stateless services Prerequisites Regional replication of data
Infrastructure problem isolated to one region Failover Candidate Problem won’t
follow if we move traffic Bad code deploy in a region
Detect the problem Regional Failover Process Scale the savior regions
Shift traffic
None
Detect the problem
Is it working?
None
One metric to rule them all - Dumbledore
SPS Stream Starts Per Second
None
Scale Saviors
None
None
None
Scaling Pattern Linear Regression
Shift Traffic
Proxy Traffic Traffic Shift Switch DNS
None
Detect the problem - 5 minutes Regional Failover Process Scale
the savior regions - 35 minutes Shift traffic - 10 minutes Total = 45 mins
Nimble Goals • Fast failover (<10mins) ◦ Pre-scale • Transparent
to service owners ◦ No code changes for service owners ◦ No auto-scaling changes
API lolomo nccp Playready us-west
API lolomo nccp nimble_API nimble_lolomo nimble_nccp Playready nimble_Playready us-west
API lolomo nccp nimble_API nimble_lolomo nimble_nccp Playready nimble_Playready us-west
API lolomo nccp nimble_API nimble_lolomo nimble_nccp starting starting starting starting
Playready nimble_Playready us-west
Failover API lolomo nccp Playready nimble_API nimble_Playready nimble_lolomo nimble_nccp
Failover API lolomo nccp Playready nimble_API nimble_Playready nimble_lolomo nimble_nccp
Failover API lolomo nccp Playready nimble_API nimble_Playready nimble_lolomo nimble_nccp
Failover API lolomo nccp nimble_API nimble_lolomo nimble_nccp Playready nimble_Playready
Detect the problem - 2 minutes Regional Failover Process Scale
the savior regions - 4 minutes Shift traffic - 3 minutes Total = 7 mins
Architecture
Actions Periodic Tasks Triggered Tasks
Periodic Tasks Fetch historical data Predict cluster sizes Manage dark
clusters
Triggered Tasks Ungate dark instances Transplant instances Traffic shift
Nanoservices Python Flask RQ - Redis
Characteristics Anticipate Failure Eventually Consistent Garbage Collect
Anticipate Failure Multi-region Rebuild state from scratch Fallbacks
Fallbacks AWS State - EDDA Historical data - ATLAS Local
Cache - Redis, Filesystem
Eventual Consistency AWS is eventually consistent Favor idempotent actions
Orphan Cleaner • Terminate detached instances • Safety features ◦
Terminate slowly ◦ Don’t terminate large volume of instances
FAQs How often do you failover? Why not have dark
clusters take traffic? How much did Nimble cost?
Suggestions Fallbacks, Fallbacks, Fallbacks Exercise it often Provide visibility
We’re hiring! @amjithr