10. Java Web Server
❖ Java based web server
❖ Renders UI
❖ Accesses data
❖ Individual clients for each service
❖ Different behavior for each client
Java Web server
Route A
Route B
Route C
Route D
Route N
…
Client
Library A
Client
Library B
Client
Library C
Client
Library N
…
Backend Service
A
Backend Service
B
Backend Service
C
Backend Service
N
…
11. Spot the Monolith
Java Web server
Route A
Route B
Route C
Route D
Route N
…
Client
Library A
Client
Library B
Client
Library C
Client
Library N
…
Backend Service
A
Backend Service
B
Backend Service
C
Backend Service
N
…
M
O
N
O
LITH
14. Java Web Server
Java Web server
Route A
Route B
Route C
Route D
Route N
…
Client
Library A
Client
Library B
Client
Library C
Client
Library N
…
Backend Service
A
Backend Service
B
Backend Service
C
Backend Service
N
…
M
O
N
O
LITH
20. API.NEXT
API Server
Script A
Script B
Script C
Script D
Script N
…
Client
Library A
Client
Library B
Client
Library C
Client
Library N
…
Backend Service
A
Backend Service
B
Backend Service
C
Backend Service
N
…
M
O
N
O
LITH
21. Scale
❖ 42.5 billion hours watched in 2015
❖ “Massive” RPS: Billions/day
❖ 1000s of scripts active in prod, 10000s in test
❖ 100s of changes/day
❖ 100s of AB tests with many variants/test
22. All Scripts Live in One Process
❖ Vertical Scale: Running out of headroom
❖ Memory
❖ I/O
❖ Instance cost: Largest instances $ can buy
24. API Server
Script A
Script B
Script C
Script D
Script N
…
Client
Library A
Client
Library B
Client
Library C
Client
Library N
…
Backend Service
A
Backend Service
B
Backend Service
C
Backend Service
N
…
Developer Ergonomics
UI Engineering Systems Engineering
27. Runtime Scalability & Availability
❖ Process isolation
❖ Separation of data access scripts and API
servers
❖ Reduce infrastructure costs
❖ Horizontally scalable architecture
❖ Faster startup times
❖ Immutable deployment artifacts
28. Developer Productivity
❖ JS to rule them all
❖ Run and debug scripts locally, set
breakpoints, step through code
❖ Fast, incremental builds
❖ As closely mirrors production as possible
29. API Evolution
API Server
Script A
Script B
Script C
Script D
Script N
…
Client
Library A
Client
Library B
Client
Library C
Client
Library N
…
Backend Service
A
Backend Service
B
Backend Service
C
Backend Service
N
…
M
O
N
O
LITH
30. API Server
Script A
Script B
Script C
Script D
Script N
…
Client
Library A
Client
Library B
Client
Library C
Client
Library N
…
Backend Service
A
Backend Service
B
Backend Service
C
Backend Service
N
…
Natural Separation
UI Engineering Systems Engineering
31. Next Generation Data Access API
TV
iOS
Android
Windows
Browsers
Remote
Service
Layer
Search
MAP
GPS
Playback
…
Clients Node API Edge API Backend Services
32. Node API Platform
❖ Set of JS data access scripts
❖ Running Node.js + restify
❖ Inside of a Docker
/browse
/search
/account
/signup
Unified
Remote
Service
Layer
/bootstrap
/search
/account
/login
Unified
Remote
Service
Layer
56. Recap: Containers
❖ Process isolation
❖ Layered dependency management
❖ Portability across environments:
prod->test
❖ Fast deployment
❖ Single deployment artifact: Docker
image
57. Recap: Node.js
❖ JS everywhere: client & server
❖ Performant
❖ Lightweight & efficient: run
locally
❖ Non blocking
❖ Superb ecosystem (npm)
❖ Built for the web
58. Recap: Node Platform
❖ Developer productivity
❖ Fast incremental builds
❖ Run, debug, and test locally
❖ Local prod like environment
❖ Scalability & availability
❖ Monolith -> micro-services
❖ Process isolation: better availability
❖ Horizontally scalable architecture
❖ Immutable deployment artifacts
Unified
Remote
Service
Layer
Backend Service
A
Backend Service
B
Backend Service
C
Backend Service
N
…