liveBook · Manning

LLM gateway

As explained in Machine Learning Platform Engineering

An LLM gateway is an intermediary service that routes language-model requests across providers or models while applying provider-specific policies.

An LLM gateway routes language-model requests across providers with different APIs, pricing, and rate limits. It extends existing platform infrastructure rather than replacing it. section 12.1.2 section 12.1.2

Production gateways add LLM-specific operational controls:

  • Route requests across providers and models instead of identical backend servers. section 12.1.2
  • Apply token-budget rate limits rather than request-count limits. section 12.1.2
  • Use semantic response caching so differently worded questions can share cached results. section 12.1.2
  • Fall back between providers when failures such as context-length limits occur. section 12.1.2
Figure 12.2 Traditional ML models and LLM applications coexist in the same cluster, managed by identical infrastructure components. The same Horizontal Pod Auto-Scaler (HPA) that scales your XGBoost recommendation engine also scales your LangChain RAG application. No separate infrastructure is needed—just different workload types sharing proven K8s orchestration.
A diagram of a computer

AI-generated content may be incorrect.

Place the gateway within shared platform infrastructure, where Kubernetes ingress and autoscaling support both traditional ML and LLM workloads. section 12.1.2

How Machine Learning Platform Engineering covers it

How deep it goes
Explains routing, semantic caching, token limits, and failure fallback, but does not provide gateway configuration or implementation code.
Examples
Uses refund-policy questions, provider failures, context-window differences, and shared Kubernetes workloads as operational examples.
What it assumes
Assumes familiarity with production platform infrastructure, providers, APIs, rate limits, embeddings, and Kubernetes orchestration.
What you can do after
Operate/configure provider-aware LLM traffic policies within shared production infrastructure.
How it connects
Connects LLM gateways with load balancing, semantic caching, rate limiting, fallback strategies, embeddings, and Kubernetes infrastructure.

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.