Back to Projects

Edge API Gateway.

High-performance custom API Gateway handling 50k+ RPS with dynamic rate limiting and circuit breaking.

Go
Envoy
Redis
Consul

Overview

A centralized entry point for all microservices, managing authentication, request routing, and traffic shaping. It replaces multiple Nginx instances with a single, programmable Go binary that integrates directly with Consul for service discovery.

Technical Challenge

Implementing low-latency distributed rate limiting. Using a 'sliding window log' algorithm in Redis was too heavy. I switched to a local token bucket with eventual consistency synchronization via Gossip protocol, reducing latency added by the gateway to under 2ms.