Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR
LITELLM · AI GATEWAY · VIRTUAL KEY · REDIS · POSTGRES

LiteLLM AI Gateway Server: Centralize Provider Keys Instead of Distributing Them to Apps

LiteLLM Proxy can put multiple model/provider deployments behind one OpenAI-compatible gateway. In production, the value is not only endpoint unification; virtual keys, team/model access, budgets, usage tracking, retries/fallbacks, routing and observability become centralized.

protocol / 2026
01Virtual Keys
02Budget / Quota
03Redis
04Postgres
Updated · 18.08.2026
01
On this page

Why do LiteLLM production deployments need Redis and Postgres?

Current LiteLLM production docs use Postgres for persistent state such as virtual keys, users/teams, spend tracking and UI data, while Redis shares rate-limit, cooldown, usage-aware routing and cache state across workers/replicas. Redis is especially recommended once multiple workers are used.

On this pageLiteLLM AI Gateway Server: Centralize Provider Keys Instead of Distributing Them to Apps
01
Gateway flow

LiteLLM flow from applications to providers or self-hosted LLMs

Applications use LiteLLM virtual keys instead of raw provider keys; the gateway applies authentication, budget and routing controls before forwarding to a deployment and recording usage/traces.

01Application
02LiteLLM Gateway
03Auth / Budget / Router
04Provider or vLLM
05Usage / Observability
02
State layers

Postgres and Redis serve different purposes

Persistent key/team/spend data lives in the database, while fast shared state for rate limits, caching and routing lives in Redis.

PostgresVirtual keys/users/teamsPersistentUI + spend
RedisRate limits/cacheShared transient stateMulti-worker
GatewayRequest routingMostly statelessScale-out
03
Routing and resilience

Plan fallbacks and cooldowns instead of relying on one endpoint

LiteLLM Router can load-balance across deployments and provide retries, timeouts, cooldowns and fallbacks. Multiple provider or self-hosted replicas can sit behind one model name.

Multi-deployment routes
Fallback model
Timeout
Retry policy
Cooldown
Health checks
04
Gateway health

Verify LiteLLM proxy and health endpoints

Adapt port and key values to your deployment.

Command 1
curl -s http://127.0.0.1:4000/health | head
Command 2
curl -s http://127.0.0.1:4000/v1/models -H 'Authorization: Bearer sk-your-key' | head
Command 3
docker compose ps
Command 4
docker compose logs --tail=100 litellm
Command 5
ss -lntp | grep ':4000'
05
Key security

Keep provider keys behind virtual keys and tenant controls

Do not distribute master/provider secrets to applications. Apply team/user model allowlists, budgets, rate limits and logging policies at the gateway.

Master key in secret store
Virtual keys
Model allowlists
Budgets
Rate limits
Conditional logging
Official documentation

Official sources

LiteLLMProduction Best Practicesdocs.litellm.aiLiteLLMProduction Deploymentdocs.litellm.aiLiteLLMRouter Load Balancingdocs.litellm.aiLiteLLMRedis Requirementsdocs.litellm.aiLiteLLMHealth Checksdocs.litellm.ai
FAQ

Frequently asked questions

Is LiteLLM an OpenRouter alternative?

It can provide a similar multi-model gateway pattern, but LiteLLM is self-hostable proxy software while OpenRouter is a hosted routing service.

Can LiteLLM run without Postgres?

A basic proxy can, but virtual keys, usage tracking and UI persistence require database-backed state.

Can multi-worker run without Redis?

Some features can, but official docs strongly recommend Redis for multi-worker production because limits and routing state otherwise fragment per worker.

EKA YAZILIM VE BİLİŞİM SİSTEMLERİ

Size the AI gateway by keys, quotas and request traffic

Share models/providers, virtual-key count, peak RPS, budgets and fallbacks; we can design LiteLLM + Redis + Postgres.

Ask on WhatsApp0850 307 34 58
WhatsAppCall NowExplore
Top