CodeWithJay
Home/Courses/Build Your Own Zuul: A Netflix-Style Edge Gateway with Node.js and Fastify
course

Build Your Own Zuul: A Netflix-Style Edge Gateway with Node.js and Fastify

Build a scaled down Zuul in Node.js: a filter chain, Edge Authentication Tokens and Passports, Hystrix style commands with fallbacks, and a LoLoMo home screen assembled at the edge for a video

5 lessons
Build Your Own Zuul: A Netflix-Style Edge Gateway with Node.js and Fastify course thumbnail

About this course

Anyone can write a proxy in twenty five lines. Netflix wrote an edge gateway instead, and this five episode advanced course is you writing a small one of your own.

The system is a video streaming platform with four services behind it, catalogue, playback, profiles and recommendations, and in front of them a gateway built on Fastify with undici underneath, Node 20 and ESM throughout, following the architecture Zuul established. Episode three is the one people come for.

Before a route is written it explains what an edge actually does and why the companies running the biggest ones built their own instead of buying one, Zuul and the rewrite into Zuul 2 that traded thread per connection for an event loop, Uber's edge gateway and its generated handlers, Amazon API Gateway as the managed answer, and Google Front End as the answer when you own the network.

Then you build the mechanism Zuul 2 uses: a filter chain with real inbound, endpoint and outbound phases and one shared request context passed through them, a routing table, hop by hop header hygiene, and a playback proxy that streams bytes through the gateway instead of buffering a manifest into memory.

Episode four is the door. You implement Netflix's edge authentication shape, verifying a customer Edge Authentication Token once at the perimeter and minting an internal Passport identity that travels downstream, so no upstream service ever parses a customer credential.

Then rate limiting with a token bucket keyed by the caller's identity, falling back to client IP, and the resilience set: every upstream call wrapped in a Hystrix style command with a timeout, a bulkhead that caps concurrency, a circuit breaker with half open probes, and an explicit fallback, on the rule that made Netflix famous for staying up, a failing dependency degrades one row of the page and never the page.

Hedged requests fire a second attempt when the first is slow. You prove it by turning a service into a black hole and watching the edge stay healthy.

Episode five assembles what the client actually renders: a LoLoMo, Netflix's real name for the home screen, a List of Lists of Movies built at the edge from catalogue, profiles and recommendations with a per row fallback so a dead recommender costs you one row, then device specific shaping for TV, phone and browser, structured logs with a propagated request id, RED metrics per route, canary routing that sends a percentage of traffic to a new build, and a load test that proves the numbers under concurrency.

A note on honesty, because this audience reads the Netflix tech blog: Hystrix has been in maintenance for years and Netflix's API layer moved on from Falcor to federated GraphQL.

These are the patterns Netflix established, taught because they are the right patterns, not a claim about what runs in their data centres this quarter. Each teaching episode is a twenty five minute deep dive, diagrams before code, and ships a runnable source snapshot.

It is the sequel to the short beginner gateway episode, not a replacement for it.

What you'll learn

Build a scaled down Zuul with real inbound, endpoint and outbound filter phases
Mint an internal Passport at the edge so no service ever parses a customer token
Wrap every upstream call in a Hystrix style command with bulkhead and fallback
Assemble a LoLoMo home screen that loses one row, never the whole page
Stream playback through the edge and shape responses per TV, phone and browser
Know when to build an edge and when to reach for Kong or Amazon API Gateway

Course curriculum

5 lessonsUnlocks with the course
  • Course Trailer
  • Setup: Fastify, undici and the Services
  • How an Edge Works: Zuul, Routing and Proxying
  • Edge Auth, Rate Limits and Hystrix-Style Resilience
  • LoLoMo, Aggregation, Observability and Canary Routing

Your instructor

Jay Gogoi

Software Architect

@codewithjay
Subscribe on YouTube

Jay is a well-known Best Tutor on YouTube

Prerequisites

  • Comfortable writing Express or Fastify routes and shipping an HTTP API in Node.js, with async/await, JSON over HTTP and JWTs at a working level. No gateway, proxy, service mesh or infrastructure experience is required. If you have never seen a gateway at all, watch the short beginner episode first.
$14.99$29.99
Save 50%

5

Lessons

Full course accessOne payment

One payment unlocks all 5 lessons, and they stay in your library for good.

  • Certificate when you complete it
Or get it with MembershipThis course and every other premium course

One payment, no subscription · lifetime access · Refund policy

Related courses

View all

Build a scaled down Zuul in Node.js: a filter chain, Edge Authentication Tokens and Passports, Hystrix style commands with fallbacks, and a LoLoMo home screen assembled at the edge for a video

What you'll learn

  • Build a scaled down Zuul with real inbound, endpoint and outbound filter phases
  • Mint an internal Passport at the edge so no service ever parses a customer token
  • Wrap every upstream call in a Hystrix style command with bulkhead and fallback
  • Assemble a LoLoMo home screen that loses one row, never the whole page
  • Stream playback through the edge and shape responses per TV, phone and browser
  • Know when to build an edge and when to reach for Kong or Amazon API Gateway

Frequently asked questions

What is Build Your Own Zuul: A Netflix-Style Edge Gateway with Node.js and Fastify about?

Build a scaled down Zuul in Node.js: a filter chain, Edge Authentication Tokens and Passports, Hystrix style commands with fallbacks, and a LoLoMo home screen assembled at the edge for a video

What does this course cover?

5 lessons, including: Course Trailer; Setup: Fastify, undici and the Services; How an Edge Works: Zuul, Routing and Proxying; Edge Auth, Rate Limits and Hystrix-Style Resilience; LoLoMo, Aggregation, Observability and Canary Routing.

Which topics does this course relate to?

Observability & Logging, Node.js, Fastify, REST APIs, Authentication & Authorization.