A Frontend Server, Front to Back
summary
Fitbit builds a 3k‑line async frontend server on Netty that uses a granular passport state machine to stamp and emit timings, a router and channel pool for connections, and an EWMA‑aware least‑inflight load balancer. Moving from round‑robin to least‑inflight cuts deploy spikes — p99.9 latency drops from 9s to 1.5s — and p999 overhead sits around 4ms. The implementation is pragmatic, observable (few key alerts: overhead, volume, error rate), and demonstrably reduces tail latency in production.
AI-written summary · about
chapters (24)
- 0:00FITBIT HAS A MONOLITH
- 0:51BREAKING IT APART
- 1:12ABSOLUTE FRONTEND
- 1:43OUR SERVER'S ROLE
- 2:39TRANSPARENT
- 3:04STABLE
- 4:03EXTENSIBLE
- 5:29ASYNC, VIA NETTY
- 12:00PASSPORT
- 12:44ROUTER
- 13:09CHANNEL POOL
- 13:28HTTP SOCKET
- 14:27REQUEST STATE MACHINE
- 18:56CALLBACK HELL
- 19:36PROMISE COMPOSITION
- 24:42SINGLE QUEUE
- 27:24FACTORIES MAXIMIZE THROUGHPUT
- 27:54CARNIVALS BALANCE THROUGHPUT AND LATENCY
- 29:02WHAT ABOUT THE GIANT PUMPKINS?
- 29:41LOAD BALANCING
- 30:18ROUND ROBIN
- 31:16LEAST IN-FLIGHT
- 33:53DEPLOY-TIME BLUES
- 37:09OUR KEY METRICS
related talks
41mReal Time Architectures Real Fast
33mHow We Achieved Even Load Balancing on the Frontend Cluster
25mMicro Frontend: a microservice architecture from your frontend web apps
37mServerless from Scratch
13mLow-Maintenance Backend Architectures for Scalable Applications
27mFundamentals of Front End Ops
13mServerless: Fast to Market, Faster to the Future
51mServerless - a backend thing that gives superpowers to frontend developers
