Conditional modules & dynamic bundling, a Netflix original
summary
Netflix builds a Webpack-based system that turns boolean feature flags into a conditional dependency graph using a Webpack plugin that reads the AST, serializes artifacts (dependency graph + transpiled code + resolution metadata), and serves on-demand bundles via Codex dynamic bundler. The combinatorics blow up (4^15 > a billion possible bundles), so artifacts are versioned, CDN-cacheable URLs are templatized, p95 latencies drop to ~70 ms (web) and ~250–300 ms (TV), and the first production rollout takes ~9–14 months by a 4–6 person team.
AI-written summary · about
chapters (19)
- 0:00Start
- 0:46About Netflix
- 3:54Background about How Engineering Is at Netflix
- 12:07Multivariate Ab Test
- 23:31Node Js
- 25:50The Dependency Graph
- 28:25Define a Conditional Module
- 29:12Conditional Modules
- 29:49Concept of Conditional Modules in Javascript
- 32:36Conditional Dependency Graph
- 36:40Resolve Conditional Dependencies at Runtime
- 39:21Graph Traversal
- 41:06What Codex Does
- 42:59Cdn
- 47:24The Life Cycle of the Artifacts
- 56:21Any Plans of like Making Codex Public or Even Open Source
- 59:14Asynchronous Bundling
- 1:04:37Do You Use some Special Database To Store Artifacts
- 1:07:50If Else Statements
related talks
16mRealtime Webpack - Pushing on-demand bundling to the limits
36mUnbundling the JavaScript module bundler
40mBuilding a Platform: Webpack and the Future
45mBundler Bonanza
51mUnpacking Bundling
19mMaking front end modules actually work
23mStreamline your code with webpack
58m10KB or Bust: The Delicate Power of Webpack and Babel
