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 Frontend Systems (@frontendne)
Search
Ianfeather
April 06, 2018
1
180
Building Resilient Frontend Systems (@frontendne)
Ianfeather
April 06, 2018
Tweet
Share
More Decks by Ianfeather
See All by Ianfeather
Building Resilient Front End Systems (Smashingconf)
ianfeather
0
100
Building Resilient Frontend Systems (All Day Hey)
ianfeather
1
470
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
160
Web Fonts and Performance
ianfeather
0
170
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Facilitating Awesome Meetings
lara
50
6.1k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Faster Mobile Websites
deanohume
305
30k
Six Lessons from altMBA
skipperchong
27
3.5k
It's Worth the Effort
3n
183
27k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Visualization
eitanlees
145
15k
Being A Developer After 40
akosma
86
590k
Building Applications with DynamoDB
mza
90
6.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Transcript
BUILDING RESILIENT FRONTEND SYSTEMS Ian Feather - BuzzFeed - @ianfeather
None
RESILIENCE IS FUNCTION IN A HOSTILE ENVIRONMENT
UNDERSTAND YOUR TIERS OF USER EXPERIENCE
GUARANTEE THE MOST BASIC LEVEL OF UX
1. HOW OUR SYSTEMS FAIL 2. DESIGNING FOR FAILURE 3.
MITIGATING RISK 4. LEARNING FROM FAILURE
HOW OUR SYSTEMS FAIL SECTION 1
HOW OUR SYSTEMS FAIL 1. MALICIOUS INTERFERENCE
HTTPS IS TABLE STAKES
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
2016 DYN DNS 5 HRS
2016 DYN DNS 5 HRS AWS s3 9 HRS 2017
2016 DYN DNS 5 HRS AWS s3 9 HRS 2017
Fastly CDN 1 HR
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
ADD SLIDE ABOUT SENTRY
SLACK ALERTS
KNOWING IT’S BROKEN BEFORE TWITTER DOES
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.04% OF REQUESTS FOR JAVASCRIPT WILL TIMEOUT
13 MILLION OF 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
8.9% OF USERS USE SOME FORM OF CONTENT BLOCKER
3.84% WON’T SUCCESSFULLY DOWNLOAD OUR FONTS
38 MILLION PAGEVIEWS PER MONTH
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?
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
User FONTS html IMAGES DATA (xhr) IMAGES CSS JS IMAGES
Images
User FONTS html IMAGES DATA (xhr) IMAGES CSS JS 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
SOMETHING BROKE! SHOULD I TELL THEM?
IT BROKE. SHOULD I TELL THEM?
IT BROKE. SHOULD I TELL THEM? ✘
IT 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
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 1 www.asset-server-one.com/styles.css
Asset SERVER 1 www.asset-server-one.com/styles.css
✖ Asset SERVER 1 www.asset-server-one.com/styles.css
✖ Asset SERVER 1 Asset SERVER 2 www.asset-server-one.com/styles.css
✖ 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-two.com/styles.css www.asset-server-one.com/styles.css
Asset SERVER 1 Asset SERVER 2 Proxy service
Asset SERVER 1 Asset SERVER 2 www.asset-server.com/styles.css Proxy service
Asset SERVER 1 Asset SERVER 2 www.asset-server.com/styles.css Proxy service
Asset SERVER 1 Asset SERVER 2 www.asset-server.com/styles.css Proxy service
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
SERVER CDN
SERVER CDN
SERVER CDN
SERVER CDN
SERVER CDN
SERVER CDN
CDN SERVER
CDN ✖ SERVER
CDN ✖ SERVICE WORKER SERVER
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. BE DECISIVE 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