Distributed LLM Gateway & System Design
Back to Projects
System Design2026

Distributed LLM Gateway & System Design

Fault-Tolerant Multi-Provider Router, Semantic Cache & Guardrails

Project Overview

Engineered a fault-tolerant distributed gateway layer serving 10,000+ requests/minute across heterogeneous LLM providers (OpenAI, Anthropic Claude, AWS Bedrock, and self-hosted vLLM).

Implements distributed Redis Lua token-bucket rate limiting, cosine-similarity semantic caching (cutting repeat inference costs by 38%), adaptive circuit breakers for provider outages, and pre/post-flight NeMo Guardrails that block prompt injections and redact PII before tokens ever leave the boundary.

99.99%
Availability
10K+ RPM
Throughput
-38%
Cache Hit Cost
99.8%
Shield Block

Gallery

Distributed LLM Gateway & System Design screenshot 1
Distributed LLM Gateway & System Design screenshot 2

Key Features

  1. 01
    Multi-region active-active API gateway with circuit breaker failover
  2. 02
    Distributed Redis Lua token-bucket rate limiting & backpressure
  3. 03
    Vector semantic cache eliminating redundant upstream LLM calls
  4. 04
    NeMo Guardrails prompt-injection firewall & automated PII masking
  5. 05
    Full Prometheus/Grafana latency histograms & per-tenant cost metering

Technology Stack

PythonFastAPILiteLLMvLLMRedisNeMo GuardrailsNginxOpenTelemetry