A high-performance backend API gateway proxying downstream requests, performing high-speed memory caching, and throttling traffic with rate-limiting algorithms.

The microservices API Gateway coordinates routing behaviors across independent backend nodes. It handles CORS configs, decrypts authorization keys, checks rate limits, and caches requests to minimize core CPU cycles.
As applications scale, each microservice must repeat authorization checks and rate-limiting gates. This redundancy increases service latency, duplicates codebase requirements, and leaves downstream services vulnerable.
Created a unified Node.js API Gateway. Configured high-performance Redis cache middlewares reducing repetitive downstream database reads by 75%, and created a token bucket rate-limiter in memory to throttle requests.
Serves as the entry boundary routing incoming HTTP requests to target downstream microservices dynamically.
Trigger request methods to observe latency changes between database fetches (cache misses) and RAM queries (cache hits), and see rate-limit throttling in action.
Problem: Public endpoints (e.g. GET articles or auth checks) can be targets of massive script queries, increasing PostgreSQL connection limits and taking down services.
Solution: Engineered a Token Bucket rate-limiter middleware. User IP tokens are stored in high-speed Redis keys, decrementing values on queries. When capacity falls below limits, requests are returned directly with HTTP status 429 in under 2ms, saving core computing power.
Problem: Keeping queries cached forever causes database parity logs—for example, if users update record titles, other guests continue reading stale cached details.
Solution: Configured a Stale-While-Revalidate TTL strategy in memory keys. Furthermore, database write endpoints automatically dispatch eviction requests, removing keys in memory whenever a POST, PUT, or DELETE request completes successfully, keeping caches accurate.