SlideShare a Scribd company logo
Scaling A/B testing
on Netflix.com with
welcome
Alex Liu
@stinkydofu @mjr578
Micah Ransdell
a/b testing
data-driven
product development
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Test 1
A
B
Test 1
A
B
C
D
E
F
G
Test 1
A
B
C
D
E
F
G
Test 2
A
B
C
D
E
F
G
Test 3
A
B
C
D
E
F
G
Test 4
A
B
C
D
E
F
G
Test 5
A
B
C
D
E
F
G
Test 6
A
B
C
D
E
F
G
Test 7
A
B
C
D
E
F
G
Test 1
A
B
C
D
E
F
G
Test 2
A
B
C
D
E
F
G
Test 3
A
B
C
D
E
F
G
Test 4
A
B
C
D
E
F
G
Test 5
A
B
C
D
E
F
G
Test 6
A
B
C
D
E
F
G
Test 7
A
B
C
D
E
F
G
2,097,152
unique experiences across
seven tests
hundreds
of new A/B tests per year
984545041164535
824477853104281
030346308437926
36618855...
2,105 566 685
CSS JSTemplates
2.5 million
unique css/js packages
per push cycle
<html/>
<link/>
<script/>
problem:
conditional dependencies
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
➔ Iterate Quickly
➔ Complex Concepts, Minimal Code
➔ Give the Power to the People
Why Node?
➔Templating
Packaging
Bonus Round
Templating
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Payment
Test
Testing the addition of
Direct Debit
Payment
Test
Testing the addition of
Direct Debit
Payment
Test
Testing the addition of
Direct Debit
Payment
Test
Testing the addition of
Direct Debit
Payment
Test
Testing the addition of
Direct Debit
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
payment template
Control Cell 2 Cell 3 Cell 4 Cell 5
if if ifif if
payment templatepayment template
Control Cell 2 Cell 3 Cell 4 Cell 5
if if ifif if
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
payment template
Control Cell 2 Cell 3 Cell 4 Cell 5
if if ifif if
payment_method_cc payment_method_dd
payment templatepayment template
Control Cell 2 Cell 3 Cell 4 Cell 5
if if ifif if
payment_method_cc payment_method_dd
payment template
Control Cell 2 Cell 3 Cell 4 Cell 5
payment_method_cc payment_method_dd
if if if if if
payment template
Control Cell 2 Cell 3 Cell 4 Cell 5
payment_method_cc payment_method_dd
if if if if if
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
payment
template
Control Cell 2 Cell 3 Cell 4 Cell 5
payment_method_cc payment_method_dd
?
payment
template
Control Cell 2 Cell 3 Cell 4 Cell 5
payment_method_cc payment_method_dd
payment_method.json
payment
template
Control Cell 2 Cell 3 Cell 4 Cell 5
payment_method_cc payment_method_dd
payment_method.json
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
require(‘nf-template-resolver’)
Resolver Rules
Template Resolver
Mappings
require(‘nf-template-loader’)
Resolver
Template
Inclusion
Template Loader
Template
Cache
➔ Developers can combine rules
➔ Improves template legibility
➔ Increases template reuse
Benefits
Templating
➔Packaging
Bonus Round
Packaging
everything
is a module
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
app.js
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
app.js
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
app.js
app.js
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
app.js
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
app.js
685
files...?
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
app.js
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
app.js
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
app.js
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
app.js
oldSearch newSearch
dep1 dep2 dep3 dep4 dep5 dep6
sub-dep sub-dep sub-dep sub-dep sub-dep sub-dep sub-depsub-dep
app.js
problem:
conditional dependencies
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
RequestBuild
require(‘nf-include-when’)
oldSearch.js
newSearch.js
anatomy of a rule
require(‘nf-asset-registry’)
app.js
app.js
oldSearch.js
newSearch.js
jquery
registry
what’s in the
registry?
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
nf-include-when
require(‘nf-packager’)
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Step 1: Get the full
dependency tree for the
requested package from the
registry.
Step 2: Run the rules.
Step 3: Filter out all deps
that resolved false.
Step 3: Filter out all deps
that resolved false.
Step 3: Filter out all deps
that resolved false.
✓
✓
Step 4: Filter out all
extraneous sub-deps.
Step 5: Concatenate the
files.
registry
javascript / css
Build
Request registry
rulespackage
➔ Leverage build time tools
➔ Leverage the server when you can
➔ Divide and conquer with modules
Take aways
Templating
Packaging
➔Bonus Round
Bonus Round
be creative
with the registry
dependency
counting
dependency
pruning
file
sizes
CSS modules
@import
CSS
analysis
and now, the
coolest part...
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
templates
mappings
css
javascript
templates
mappings
css
javascript
templates
mappings
css
javascript
UI Bundle
UI BundleUI Bundle
UI Bundle
UI Bundle
UI BundleUI Bundle
UI BundleUI Bundle UI Bundle
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
anytime
deploy UI bundles
we never touch
the file system
< 5ms
average response time
➔ Static analysis FTW
➔ Independent UI deployments
➔ Requests never touch the file system
➔ Fast package response times
Wins
final thoughts
learn by doing
move faster
fail fast
I have not failed.
I’ve just found 10,000 ways
that won’t work.”
Thomas Edison
“
simplify
thank you
questions?
Alex Liu
@stinkydofu @mjr578
Micah Ransdell

More Related Content

What's hot (20)

PDF
From Idea to Execution: Spotify's Discover Weekly
Chris Johnson
 
PPTX
Spotify Discover Weekly: The machine learning behind your music recommendations
Sophia Ciocca
 
PDF
Data at Spotify
Danielle Jabin
 
PDF
Algorithmic Music Recommendations at Spotify
Chris Johnson
 
PPTX
SAMPLE SIZE – The indispensable A/B test calculation that you’re not making
Zack Notes
 
PDF
How data drives spotify
Ali Sarrafi
 
PDF
Recommending and searching @ Spotify
Mounia Lalmas-Roelleke
 
PDF
Context Aware Recommendations at Netflix
Linas Baltrunas
 
PDF
Making Netflix Machine Learning Algorithms Reliable
Justin Basilico
 
PDF
Time, Context and Causality in Recommender Systems
Yves Raimond
 
PDF
UX STRAT Online 2020: Dr. Martin Tingley, Netflix
UX STRAT
 
PDF
Deep Learning for Recommender Systems
Justin Basilico
 
PDF
Git advanced
Peter Vandenabeele
 
PDF
Netflix Recommendations - Beyond the 5 Stars
Xavier Amatriain
 
PDF
Personalized Playlists at Spotify
Rohan Agrawal
 
PDF
Past, Present & Future of Recommender Systems: An Industry Perspective
Justin Basilico
 
PPTX
Google Cloud and Data Pipeline Patterns
Lynn Langit
 
PDF
Streaming Auto-scaling in Google Cloud Dataflow
C4Media
 
PPTX
Ab testing 101
Ashish Dua
 
PDF
Artwork Personalization at Netflix Fernando Amat RecSys2018
Fernando Amat
 
From Idea to Execution: Spotify's Discover Weekly
Chris Johnson
 
Spotify Discover Weekly: The machine learning behind your music recommendations
Sophia Ciocca
 
Data at Spotify
Danielle Jabin
 
Algorithmic Music Recommendations at Spotify
Chris Johnson
 
SAMPLE SIZE – The indispensable A/B test calculation that you’re not making
Zack Notes
 
How data drives spotify
Ali Sarrafi
 
Recommending and searching @ Spotify
Mounia Lalmas-Roelleke
 
Context Aware Recommendations at Netflix
Linas Baltrunas
 
Making Netflix Machine Learning Algorithms Reliable
Justin Basilico
 
Time, Context and Causality in Recommender Systems
Yves Raimond
 
UX STRAT Online 2020: Dr. Martin Tingley, Netflix
UX STRAT
 
Deep Learning for Recommender Systems
Justin Basilico
 
Git advanced
Peter Vandenabeele
 
Netflix Recommendations - Beyond the 5 Stars
Xavier Amatriain
 
Personalized Playlists at Spotify
Rohan Agrawal
 
Past, Present & Future of Recommender Systems: An Industry Perspective
Justin Basilico
 
Google Cloud and Data Pipeline Patterns
Lynn Langit
 
Streaming Auto-scaling in Google Cloud Dataflow
C4Media
 
Ab testing 101
Ashish Dua
 
Artwork Personalization at Netflix Fernando Amat RecSys2018
Fernando Amat
 

Viewers also liked (6)

PDF
[JSDC 2016] Codex: Conditional Modules Strike Back
Alex Liu
 
PDF
Node Interactive Debugging Node.js In Production
Yunong Xiao
 
PDF
Observable Node.js Applications - EnterpriseJS
Yunong Xiao
 
PDF
To Err Is Human
Alex Liu
 
PDF
Slaying Monoliths with Node and Docker
Yunong Xiao
 
PDF
Debugging node in prod
Yunong Xiao
 
[JSDC 2016] Codex: Conditional Modules Strike Back
Alex Liu
 
Node Interactive Debugging Node.js In Production
Yunong Xiao
 
Observable Node.js Applications - EnterpriseJS
Yunong Xiao
 
To Err Is Human
Alex Liu
 
Slaying Monoliths with Node and Docker
Yunong Xiao
 
Debugging node in prod
Yunong Xiao
 
Ad

Similar to Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js (18)

PDF
[NodeConf.eu 2014] Scaling AB Testing on Netflix.com with Node.js
Alex Liu
 
PPTX
ReactWeek 2019 Conditional Modules & Dynamic Bundling: A Netflix Original
Rajat Kumar
 
PPTX
JS Essence
Uladzimir Piatryka
 
PDF
Flexible design systems by Charlie Robbins
OdessaJS Conf
 
PPTX
Netflix seminar pptx for minor projecttt and major project
dharmikmangukiya2
 
PDF
Knowledge and Scalability Through Graph Composition
Neo4j
 
PDF
UI developer
Nilesh Patel
 
PDF
Patterns and practices for building enterprise-scale HTML5 apps
Phil Leggetter
 
PDF
Dynamic XPath In Selenium WebDriver A Complete Guide.pdf
Appdeveloper10
 
PDF
Performance and Fault Tolerance for the Netflix API - QCon Sao Paulo
Ben Christensen
 
KEY
Modular Web Applications With Netzke
netzke
 
PDF
Gdsc IIIT Surat Orientation 2022.pdf
SparshJhariya2
 
PDF
What Is Node.js And Why You Should Use It For Enterprise Software.pdf
SatawareTechnologies6
 
PDF
jsDay 2016 recap
Giorgio Cefaro
 
PPTX
Javascript first-class citizenery
toddbr
 
PPTX
Js tacktalk team dev js testing performance
Артем Захарченко
 
PDF
Why ReactJS Has Become Popular Among Developers (1) (1).pdf
goodcoders
 
PPTX
Scale Your Mission-Critical Applications With Neo4j Fabric and Clustering Arc...
Neo4j
 
[NodeConf.eu 2014] Scaling AB Testing on Netflix.com with Node.js
Alex Liu
 
ReactWeek 2019 Conditional Modules & Dynamic Bundling: A Netflix Original
Rajat Kumar
 
JS Essence
Uladzimir Piatryka
 
Flexible design systems by Charlie Robbins
OdessaJS Conf
 
Netflix seminar pptx for minor projecttt and major project
dharmikmangukiya2
 
Knowledge and Scalability Through Graph Composition
Neo4j
 
UI developer
Nilesh Patel
 
Patterns and practices for building enterprise-scale HTML5 apps
Phil Leggetter
 
Dynamic XPath In Selenium WebDriver A Complete Guide.pdf
Appdeveloper10
 
Performance and Fault Tolerance for the Netflix API - QCon Sao Paulo
Ben Christensen
 
Modular Web Applications With Netzke
netzke
 
Gdsc IIIT Surat Orientation 2022.pdf
SparshJhariya2
 
What Is Node.js And Why You Should Use It For Enterprise Software.pdf
SatawareTechnologies6
 
jsDay 2016 recap
Giorgio Cefaro
 
Javascript first-class citizenery
toddbr
 
Js tacktalk team dev js testing performance
Артем Захарченко
 
Why ReactJS Has Become Popular Among Developers (1) (1).pdf
goodcoders
 
Scale Your Mission-Critical Applications With Neo4j Fabric and Clustering Arc...
Neo4j
 
Ad

Recently uploaded (20)

PPSX
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
 
PDF
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
PDF
PRIZ Academy - Process functional modelling
PRIZ Guru
 
PDF
Validating a Citizen Observatories enabling Platform by completing a Citizen ...
Diego López-de-Ipiña González-de-Artaza
 
PPTX
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
 
PDF
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
PPTX
Functions in Python Programming Language
BeulahS2
 
PPTX
How to Un-Obsolete Your Legacy Keypad Design
Epec Engineered Technologies
 
PDF
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
 
PPTX
Kel.3_A_Review_on_Internet_of_Things_for_Defense_v3.pptx
Endang Saefullah
 
PPTX
Introduction to Python Programming Language
merlinjohnsy
 
PPTX
Work at Height training for workers .pptx
cecos12
 
PDF
Decision support system in machine learning models for a face recognition-bas...
TELKOMNIKA JOURNAL
 
PPTX
Mobile database systems 20254545645.pptx
herosh1968
 
PDF
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
PDF
輪読会資料_Miipher and Miipher2 .
NABLAS株式会社
 
PPTX
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
grilcodes
 
PDF
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
 
PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
PDF
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
 
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
 
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
PRIZ Academy - Process functional modelling
PRIZ Guru
 
Validating a Citizen Observatories enabling Platform by completing a Citizen ...
Diego López-de-Ipiña González-de-Artaza
 
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pptx
AsadShad4
 
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
Functions in Python Programming Language
BeulahS2
 
How to Un-Obsolete Your Legacy Keypad Design
Epec Engineered Technologies
 
May 2025: Top 10 Read Articles in Data Mining & Knowledge Management Process
IJDKP
 
Kel.3_A_Review_on_Internet_of_Things_for_Defense_v3.pptx
Endang Saefullah
 
Introduction to Python Programming Language
merlinjohnsy
 
Work at Height training for workers .pptx
cecos12
 
Decision support system in machine learning models for a face recognition-bas...
TELKOMNIKA JOURNAL
 
Mobile database systems 20254545645.pptx
herosh1968
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
輪読会資料_Miipher and Miipher2 .
NABLAS株式会社
 
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
grilcodes
 
Plant Control_EST_85520-01_en_AllChanges_20220127.pdf
DarshanaChathuranga4
 
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
 

Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js