API Gateway Engineer
Run the front door of your platform: routing, rate limiting, load shedding, request coalescing, and the 502s that tell you the gateway is doing its job badly.
Path overview
网关是所有流量的第一现场,也是过载保护的最后一道闸。本路径从网关与 ingress 的边界讲起,依次落地限流、卸载与请求合并三种流量整形手段,最终亲手实现一个带完整观测的限流网关项目。
The gateway is the first stop for every request and the last gate before overload. This path covers gateway versus ingress boundaries, then rate limiting, load shedding, and request coalescing, ending with a gateway project.
Read "How to Build a Rate Limiter in Node.js" for the "Choose an algorithm" argument, then name the decision in gateway work it would change.
Next step: Add Rate Limiting Middleware
⏱ 1h
Apply "Add Rate Limiting Middleware" to a gateway task, checking that "req.ip reflects the client address appended by the trusted proxy." appears after the "Implement a fixed-window limiter keyed by client and route, with a cap on the map size and" step.
Prerequisites: How to Build a Rate Limiter in Node.js
Next step: Add Load-Shedding Middleware
⏱ 0.5h
Execute "Add Load-Shedding Middleware" end to end, then repeat the last step with one parameter changed and compare "Prevent an overload spike from collapsing latency for every request by bounding concurrency".
Prerequisites: Add Rate Limiting Middleware
Next step: Coalesce Concurrent Requests for the Same Key
⏱ 0.5h
Run "Prevent a hot key from stampeding the origin when it expires or is first requested under" from "Coalesce Concurrent Requests for the Same Key" and confirm the documented result "Concurrent calls for the same key share one promise and one origin request.".
Prerequisites: Add Load-Shedding Middleware
Next step: Refill a Token Bucket Correctly
⏱ 0.5h
Solve "Refill a Token Bucket Correctly" for gateway work: turn JSON object: { capacity, refillPerSecond, tokens, elapsedMs, cost } into {allowed:true,tokensAfter:2} and pass both samples.
Next step: Build a Rate Limiting Reverse Proxy in Node.js
⏱ 0.33h
Deliver the "Build a Rate Limiting Reverse Proxy in Node.js" blueprint with "Proxying streams request and response bodies without buffering the full payload in memory" working and "Token bucket and fixed window limiters selectable per route through a JSON config" recorded as evidence.
Prerequisites: Refill a Token Bucket Correctly
Next step: Apply this path in a capstone project and review the related resources.
⏱ 6h