Engineering Review — Q1 2026
From monolith proxy to edge-native routing
Why the current gateway can't scale
Current State
Before
After
How the new system works
graph LR Client["Client"] --> Edge["Edge Worker"] Edge --> Auth["Auth Cache"] Edge --> RL["Rate Limiter
Durable Object"] Edge --> Router["Route Resolver"] Router --> API["API Service"] Router --> Static["Static Assets"] API --> DB["Database"] classDef primary fill:#d4a73a22,stroke:#d4a73a,stroke-width:2px classDef secondary fill:#60a5fa22,stroke:#60a5fa,stroke-width:2px classDef storage fill:#4ade8022,stroke:#4ade80,stroke-width:2px class Client,Edge primary class Auth,RL,Router secondary class API,Static,DB storage
| Phase | Scope | Timeline | Risk |
|---|---|---|---|
| 1. Shadow mode | Mirror traffic to edge, compare responses | Week 1–2 | Low |
| 2. Canary rollout | 5% traffic to edge, monitor errors | Week 3 | Low |
| 3. Gradual shift | 25% → 50% → 75% traffic | Week 4–5 | Medium |
| 4. Full cutover | 100% traffic, decommission old proxy | Week 6 | Medium |
| 5. Cleanup | Remove feature flags, archive old code | Week 7 | Low |
export default {
async fetch(req: Request, env: Env) {
// Auth check with edge-cached keys
const identity = await verifyAuth(req, env);
// Distributed rate limiting
const limit = env.RATE_LIMITER.get(identity.id);
if (await limit.check()) return tooMany();
// Route to upstream
return route(req, env.SERVICES);
}
};
The fastest request is the one that never leaves the edge.— Edge Computing Principle
Next Steps
Full cutover targeted for end of Q1