← Back to Overview
99.99% Uptime SLAArchitecture & Telemetry Case Study

Microservices API Gateway

High-throughput API routing engine built with Node.js, Express, and Redis token-bucket rate-limiting algorithm to protect downstream backend microservices from traffic surges.

Proxmox VE Node Telemetry & Telemetry Monitor

Node: gateway-sg-01.arhab.net

Status: Online • Uptime: 7d 12:32:00 • Kernel: Linux 6.12.101-edge (32 GB RAM)

Cluster: sg-production-01
Throughput
1420 req/s
Cache Hit Ratio
94.2%
P99 Latency
18 ms
429 Blocks/min
12 req
vCPU Core UtilizationsAvg Load: 28%
Core 0[|||......................] 12%
Core 1[||.......................] 8%
Core 2[|||||||||||..............] 45%
Core 3[||||||...................] 23%
Core 4[||||.....................] 14%
Core 5[|........................] 5%
Core 6[||||||||||||||||||||||...] 89%
Core 7[||||||||.................] 31%
System Resources & I/O
RAM Usage12.42 GB / 32.00 GB
Redis Cache RAM128.4 MB / 1.00 GB
Network RX199.1 MB/s
Network TX233.4 MB/s
session: gateway-sg-01 [htop-monitor]
TASKS: 48 total, 1 running
1 [|||......................] 12%
2 [||.......................] 8%
3 [|||||||||||..............] 45%
4 [||||||...................] 23%
5 [||||.....................] 14%
6 [|........................] 5%
Uptime: 7d 12:32:00
Load average: 0.42 0.38 0.31
PIDUSERPRINIVIRTRESSHRSCPU%MEM%TIME+Command
1402gateway2001.2G142M45MS4.2%3.5%12h:04:12node gateway/server.js
1408redis200512M128M12MS2.1%3.2%14d:06:12redis-server *:6379
1412envoy200890M64M28MS1.8%1.6%14d:06:12envoy -c gateway.yaml
1420nginx200120M12M8MS0.8%0.3%14d:06:12nginx: worker process
1422root20085M8M4MS0.1%0.2%0h:00:15htop
F1HelpF2SetupF3SearchF4FilterF5TreeF6SortByF9KillF10Quit

Problem & Challenge

Uncontrolled traffic bursts on public endpoints were causing database thread pool exhaustion and cascading HTTP 504 timeouts across dependent downstream microservices.

Engineering Solution

Deployed a stateless API gateway layer backed by atomic Redis Lua scripts implementing a sliding-window token bucket algorithm. Excess requests are instantly rejected at the edge with HTTP 429 without hitting core application servers.