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
Building Resilient Front End Systems (Smashingc...
Search
Ianfeather
September 10, 2018
Technology
0
100
Building Resilient Front End Systems (Smashingconf)
Ianfeather
September 10, 2018
Tweet
Share
More Decks by Ianfeather
See All by Ianfeather
Building Resilient Frontend Systems (All Day Hey)
ianfeather
1
470
Building Resilient Frontend Systems (@frontendne)
ianfeather
1
180
Testing Without Assertions
ianfeather
0
130
Building Resilient Frontend Systems - NationJS
ianfeather
0
190
Establishing Performance Contexts
ianfeather
0
110
Reducing complexity with a Component API
ianfeather
0
150
Web Fonts and Performance
ianfeather
0
160
Other Decks in Technology
See All in Technology
ADRを運用して3年経った僕らの現在地
onk
PRO
13
5.8k
KubeVirt Networking ONIC 2024
orimanabu
4
630
Road to Single Activity Uncovered
yurihondo
0
100
第45回 MLOps 勉強会 - ML Test Score を用いた機械学習システムの定量的なアセスメント
masatakashiwagi
3
320
入門 KRR
donkomura
0
110
Semantic Kernel の Agent 機能試してみた!
okazuki
1
160
Webセキュリティのあるきかた
akiym
32
11k
Perlで始めるeBPF: 自作Loaderの作り方 / Getting started with eBPF in Perl_How to create your own Loader
takehaya
1
950
Amplify Gen 2ではじめる 生成AIアプリ開発入門
tsukuboshi
0
170
WSUSが非推奨に!? Windowsの更新管理を改めて勉強する!
ebibibi
0
190
Develop to Survive - YAPC::Hakodate 2024 Keynote
moznion
8
2.8k
テストを楽に書きたい
tomorrowkey
1
200
Featured
See All Featured
Bash Introduction
62gerente
608
210k
Docker and Python
trallard
40
3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
105
48k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.7k
GraphQLの誤解/rethinking-graphql
sonatard
65
9.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
130k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
46
4.9k
Visualization
eitanlees
143
15k
Making the Leap to Tech Lead
cromwellryan
131
8.9k
Creatively Recalculating Your Daily Design Routine
revolveconf
217
12k
How To Stay Up To Date on Web Technology
chriscoyier
787
250k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Transcript
BUILDING RESILIENT FRONTEND SYSTEMS Ian Feather - BuzzFeed - @ianfeather
None
RESILIENCE IS FUNCTION IN A HOSTILE ENVIRONMENT
GUARANTEE THE MOST BASIC LEVEL OF UX
UNDERSTAND YOUR TIERS OF USER EXPERIENCE
1. HOW OUR SYSTEMS FAIL 2. DESIGNING FOR FAILURE 3.
MITIGATING RISK 4. LEARNING
HOW OUR SYSTEMS FAIL SECTION 1
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE
HTTPS IS TABLE STAKES
None
HTTPS IS TABLE STAKES
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE 2. 3RD PARTY
AVAILABILITY
CONTROL YOUR POINTS OF FAILURE
2016 DYN DNS 5 HRS AWS s3 9 HRS 2017
Fastly CDN 1 HR AWS S3 2 hrs
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE 2. 3RD PARTY
AVAILABILITY
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE 2. 3RD PARTY
AVAILABILITY 3. DEVELOPER ERROR
None
ADD SLIDE ABOUT SENTRY
SLACK ALERTS
KNOWING IT’S BROKEN BEFORE TWITTER DOES
None
None
THEORY VS PRACTICE
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE 2. 3RD PARTY
AVAILABILITY 3. DEVELOPER ERROR
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE 2. 3RD PARTY
AVAILABILITY 3. DEVELOPER ERROR 4. THE NETWORK
THEORY VS PRACTICE
THEORY VS PRACTICE
~1% OF REQUESTS FOR JAVASCRIPT WILL TIMEOUT
13 MILLION REQUESTS FOR JAVASCRIPT WILL TIMEOUT
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE 2. 3RD PARTY
AVAILABILITY 3. DEVELOPER ERROR 4. THE NETWORK
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE 2. 3RD PARTY
AVAILABILITY 3. DEVELOPER ERROR 4. THE NETWORK 5. USER’S PRIVILEGE
~9% OF OUR USERS USE SOME FORM OF CONTENT BLOCKER
~4% WON’T SUCCESSFULLY DOWNLOAD OUR FONTS
40 MILLION PAGEVIEWS PER MONTH
None
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE 2. 3RD PARTY
AVAILABILITY 3. DEVELOPER ERROR 4. THE NETWORK 5. USER’S PRIVILEGE
HOPE FOR THE BEST?
“technical glitches… cost the e-commerce giant an estimated $1.2 million
a minute”
DESIGN FOR FAILURE SECTION 2
DESIGN FOR FAILURE 1. PRIORITIZE CRITICAL PARTS OF THE PAGE
User FONTS html IMAGES DATA (xhr) IMAGES CSS JS IMAGES
Images HTML
None
None
None
DESIGN FOR FAILURE 1. PRIORITIZE CRITICAL PARTS OF THE PAGE
DESIGN FOR FAILURE 1. PRIORITIZE CRITICAL PARTS OF THE PAGE
2. MAKE ERRORS A FIRST CLASS CITIZEN
None
SOMETHING BROKE! SHOULD I TELL THEM?
✘
IT BROKE. SHOULD I TELL THEM?
None
DESIGN FOR FAILURE 1. PRIORITIZE CRITICAL PARTS OF THE PAGE
2. MAKE ERRORS A FIRST CLASS CITIZEN
MITIGATE RISK SECTION 3
MITIGATE RISK 1. LOCK YOUR RUNTIME DEPENDENCIES
{ "name": “my-project", "version": "1.0.0", "dependencies": { "node-fetch": "~2.2.0", "node-fetch":
"^2.2.0", "node-fetch": "2.2.0" } }
CONTROL YOUR POINTS OF FAILURE
None
MITIGATE RISK 1. LOCK YOUR RUNTIME DEPENDENCIES
MITIGATE RISK 1. LOCK YOUR RUNTIME DEPENDENCIES 2. BUILD IN
REDUNDANCY
HAVE TWO OF EVERYTHING
✖ Asset SERVER 1 Asset SERVER 2 www.asset-server-two.com/styles.css www.asset-server-one.com/styles.css
Asset SERVER 1 Asset SERVER 2 www.asset-server.com/styles.css Proxy service
CLOUD PROVIDER CDN STATIC ASSET SERVER IMAGE SERVICE POLYFILL SERVICE
AB TEST SERVICE FONT PROVIDER 2 X ?
PLAN Z
MITIGATE RISK 1. LOCK YOUR RUNTIME DEPENDENCIES 2. BUILD IN
REDUNDANCY
MITIGATE RISK 1. LOCK YOUR RUNTIME DEPENDENCIES 2. BUILD IN
REDUNDANCY 3. SERVE STALE CONTENT
SERVER CDN
CDN ✖ SERVICE WORKER SERVER
MITIGATE RISK 1. LOCK YOUR RUNTIME DEPENDENCIES 2. BUILD IN
REDUNDANCY 3. SERVE STALE CONTENT
LEARN FROM MISTAKES SECTION 4
LEARN FROM MISTAKES 1. POSTMORTEMS
BLAMELESS
HOW DID WE HANDLE IT AS A TEAM?
HOW COULD IT HAVE BEEN PREVENTED?
LEARN FROM MISTAKES 1. POSTMORTEMS
LEARN FROM MISTAKES 1. POSTMORTEMS 2. FIRE DRILLS & CHAOS
TESTING
FIRE DRILLS ARE A SAFE SPACE TO PRACTICE
1. LIMIT IMPACT 2. DIRECT COMMUNICATIONS 3. DELEGATE EARLY
CHAOS TESTING
DELIBERATELY INTRODUCE FAILURE TO ENSURE YOUR SYSTEMS ARE RESILIENT
LEARN FROM MISTAKES 1. POSTMORTEMS 2. FIRE DRILLS & CHAOS
TESTING
IN SUMMARY
KNOW WHAT’S IMPORTANT TO YOUR USERS
IDENTIFY HOW YOUR SYSTEM WILL DEGRADE
IDENTIFY POINTS OF FAILURE AND BUILD IN FAIL-SAFES
LEARN FROM EVERY FAILURE
THANK YOU IAN FEATHER - BUZZFEED - @IANFEATHER