Join the AI Security Webinar with Palo Alto. Register here

No items found.

AI Gateway On Premise : All You Need To Know

June 16, 2025
|
9:30
min read
SHARE

In today’s AI-driven world, businesses across industries, from healthcare to finance, need systems that deliver fast, secure, and reliable intelligence. On‑premise deployment of AI infrastructure addresses these needs by keeping data within organizational boundaries, reducing latency, and minimizing dependence on public clouds. This setup ensures stringent compliance with regulations like HIPAA or GDPR, while enabling real-time user experiences and full operational autonomy.

TrueFoundry’s on-prem AI Gateway offers a unified OpenAI-compatible API to access over 250 models securely within your infrastructure. It integrates essential governance like access control, rate limiting, guardrails, and audit logging at the gateway to ensure compliance and accountability. Designed with in-memory decision-making and no external calls in the request path, it achieves ultra-low latency and high reliability. 

In this blog, you will learn how its architecture works, why on-prem deployment matters, and best practices for deployment and management.

Why On‑Premise Matters

Organizations increasingly opt for on‑premise AI deployments to strengthen control, security, performance, and cost stability.

First, on‑premise environments provide data sovereignty. Sensitive information, such as healthcare records, financial transactions, or proprietary R&D remains within a company’s own network. This approach ensures compliance with regulations like GDPR, HIPAA, and PCI-DSS, reducing exposure risk and simplifying audits.

Second, these setups enhance security and governance. Internal teams directly oversee encryption, access management, and audit trails, creating tighter control over data handling and reducing reliance on external vendors. This is essential for industries with high data sensitivity and regulatory scrutiny.

Third, performance benefits are significant. By colocating compute next to data, these systems minimize latency, crucial for real-time applications like fraud detection, predictive maintenance, and autonomous systems. On-premise deployment bypasses internet variability and cloud throttling, delivering more consistent performance.

Fourth, although the upfront CapEx for hardware and infrastructure can be substantial, on-premise AI often offers greater long-term cost predictability for sustained workloads. It eliminates variable costs like cloud token pricing and egress fees. Studies show that, over time, maintaining hardware in your own data center can be more cost-effective than relying on cloud services.

Many companies are now embracing hybrid architectures, combining on‑premise and cloud deployments. This strategy allows sensitive workloads to remain on-site while leveraging the cloud’s scalability for less critical tasks. It offers a balanced approach combining regulatory compliance, performance, and flexibility.

In summary, choosing on‑premise AI delivers unmatched data control, enhanced security, low-latency performance, and stable cost structures. These factors make it a strategic priority for organizations handling sensitive or mission-critical workloads. In the next section, we will explore how TrueFoundry’s on‑premise AI Gateway lets you implement these benefits in a scalable, governance-first way.

Key Metrics for Evaluating Gateway

Criteria What should you evaluate ? Priority TrueFoundry
Latency Adds <10ms p95 overhead for time-to-first-token? Must Have Supported
Data Residency Keeps logs within your region (EU/US)? Depends on use case Supported
Latency-Based Routing Automatically reroutes based on real-time latency/failures? Must Have Supported
Key Rotation & Revocation Rotate or revoke keys without downtime? Must Have Supported
Key Rotation & Revocation Rotate or revoke keys without downtime? Must Have Supported
Key Rotation & Revocation Rotate or revoke keys without downtime? Must Have Supported
Key Rotation & Revocation Rotate or revoke keys without downtime? Must Have Supported
Key Rotation & Revocation Rotate or revoke keys without downtime? Must Have Supported
Evaluating an AI Gateway?
A practical guide used by platform & infra teams

Core Principles and Architecture 

On-premise AI gateways must uphold several essential principles to support enterprise-grade deployments.

High availability ensures the gateway never becomes a single point of failure. Even if dependent components like databases or queues fail, inferencing must continue uninterrupted.

Low latency is critical; gateways should add negligible delay to live requests to maintain responsive AI experiences.

High throughput and scalability are also crucial. Each gateway node should handle high concurrency and scale with demand, ensuring consistent performance under load.

No external dependencies in the request path means live request handling cannot rely on network or disk calls. Non-essential tasks like logging are deferred to the background.

In-memory decision making supports sub-millisecond enforcement of policies such as authentication, authorization, rate-limiting, and routing.

Separation of control plane and data plane allows configuration and management logic to operate independently from live traffic handling, facilitating resilience, easy updates, and horizontal scaling.

Architecture

The architecture of an on-premise AI gateway applies these principles in a modular and distributed system.

  • The data plane consists of stateless proxy nodes handling real-time inference traffic. All policy checks occur in memory during request processing. Logs and metrics are sent asynchronously to background pipelines, avoiding latency impact. Even if the telemetry infrastructure fails, traffic continues uninterrupted.
  • The control plane manages configuration and policies such as model access rules, rate limits, and guardrails. It distributes updates to data-plane nodes using event-based mechanisms, enabling seamless updates without service disruption.
  • An asynchronous telemetry pipeline aggregates logs and metrics via buffered queues into performant data stores. This design ensures observability without coupling it to request handling performance.

Finally, both planes are designed for horizontal scaling. Stateless data-plane nodes can be replicated behind load balancers, while control-plane nodes scale independently to support policy orchestration and system resilience.

These combined principles and architecture enable on-premise AI gateways to be fast, resilient, secure, and manageable at enterprise scale. In the next section, we will dive deeper into TrueFoundry’s implementation of these constructs.

TrueFoundry’s On‑Prem AI Gateway

TrueFoundry’s on‑prem AI Gateway builds upon foundational principles to deliver a scalable, secure, and high-performance platform for AI workloads. Here's a refined breakdown of its capabilities and internal workings, based solely on official TrueFoundry documentation.

1. High-Performance Core

TrueFoundry’s gateway is built on the Hono framework, a lightweight, edge-optimized runtime designed for speed. Benchmarks show that a single proxy instance, on just 1 CPU and 1 GB of RAM, can handle 250 requests per second with only a few milliseconds of added latency. All key enforcement operations, authentication, authorization, rate limiting, and routing are executed in memory, and absolutely no external calls occur during request handling. This ensures sub-millisecond response times and consistent performance under load.

2. Clean Separation of Responsibilities

The gateway follows a classic control plane/proxy plane split:

  • Proxy Plane
    Deploys stateless pods that directly handle live AI inference traffic. They enforce policies and route requests without reaching out to databases or external services. This design supports horizontal scaling, ensuring the system elastically grows with demand.
  • Control Plane
    Centralizes configuration, policies, and metadata. It manages model access rules, rate limits, guardrails, and distributes updates via an internal bus. This separation allows config changes without disrupting ongoing traffic.

3. Resilient and Asynchronous Logging

To preserve performance, logging and telemetry are managed asynchronously:

  • Proxy pods emit metrics and audit logs to a message queue (NATS).
  • Logs are picked up by separate systems like ClickHouse, providing search, analytics, and observability dashboards.
  • The queue is non-blocking: even if downstream systems fail, requests continue to be processed, ensuring no single dependency can cause outages.

4. Core System Components

TrueFoundry’s gateway comprises several tightly integrated components:

  • Frontend / UI: Offers an interactive API playground and consoles to configure policies, view analytics, and manage models.
  • Postgres: Stores metadata including user teams, permissions, rate settings, and routing configurations.
  • ClickHouse: A high-performance data store for logs, usage metrics, and audit trails.
  • NATS: A lightweight message queue responsible for real-time propagation of config and telemetry data.
  • Backend Service: Bridges UI, proxy, NATS, Postgres, and ClickHouse, orchestrating overall gateway functionality.
  • Gateway Pods: Stateless, edge-optimized containers that manage inference, enforce policies, collect telemetry, and forward AI requests.

5. Scalability & Benchmarking

TrueFoundry’s documentation highlights strong linear scalability:

  • A single pod handles 250 RPS with minimal latency impact.
  • Latency remains low until CPU saturation around 350 RPS per pod.
  • Deploying multiple pods lets the system effortlessly scale to tens of thousands of requests.

6. Governance and Unified API

  • OpenAI-compatible interface grants seamless access to 250+ models with consistent request formats.
  • Integrated governance covers access control, rate limiting, model selection, fallback rules, and audit logs. These policies are enforced inline at the gateway, making advanced controls transparent to users.

7. Observability & Analytics

The gateway delivers deep telemetry insights:

  • Latency breakdowns (e.g., time-to-first-token, inter-token spacing)
  • Request volume and guardrail/rate-limit triggers
  • Audit logs detailing model usage, policy decisions, and team-level segmentation
    All analytics are accessible via dashboards with export capabilities for compliance and management reporting.

TrueFoundry’s on-prem AI Gateway embodies the ideal blend of performance, scalability, resilience, and governance, all orchestrated within a user-friendly platform. Next, we’ll guide you through deployment steps and best practices to bring this gateway into your infrastructure.

Deployment Workflow

Deploying TrueFoundry’s on‑prem AI Gateway starts with verifying connectivity, licensing, and domain configurations to ensure secure and seamless operations. The installation leverages a Helm-based chart that brings together core components, control plane, database, telemetry, and stateless gateway pods into your Kubernetes cluster.

1. Prerequisites & Infrastructure Readiness

Before deploying the AI Gateway on-premise, ensure the following elements are in place:

  • Egress connectivity to auth.truefoundry.com and analytics.truefoundry.com, enabling licensing and analytics operations.
  • A valid domain name, mapped via ingress (e.g., NGINX or Istio), to serve both the control-plane UI and gateway endpoints.
  • TrueFoundry credentials (tenant name, license key, and container registry pull secret), provided by the TF team.

These prerequisites ensure secure, authorized communication with TrueFoundry’s control plane while maintaining self-managed hosting of core components.

2. Installation and Configuration

With prerequisites in place, you configure the core installation via a Helm-based deployment:

  • A centralized configuration file specifies tenant details, license, ingress settings, and enables AI-gateway-specific flags.
  • The Helm chart deploys control-plane services (frontend, backend service, Postgres, ClickHouse, NATS) alongside stateless gateway pods into your Kubernetes cluster.

This structure abstracts away manual setup complexity, ensuring consistent and repeatable deployment.

3. Network Setup & Security

During deployment:

  • Configure your ingress controller to expose the control-plane and gateway endpoints, with proper TLS certificates.
  • Ensure internal network policies allow gateway pods to send telemetry to NATS and analytics endpoints.
  • For secure environments, make sure pods communicate with backend services over HTTPS, and that authentication secrets are stored securely (e.g. via K8s Secrets).

4. Scaling & Multi-Node Design

  • The stateless gateway pods can be scaled horizontally to meet demand—adding replicas increases request throughput seamlessly.
  • Corresponding control-plane components (Postgres, ClickHouse, NATS) should be deployed with resilience in mind, using multi-replica or cluster setups to handle config updates and logging reliably.

This pattern ensures high availability, elasticity, and system separation for enhanced stability.

5. Continuous Configuration Management

Once deployed, the control plane propagates updates to gateway pods via NATS:

  • Changes like policy updates, new model endpoints, rate-limit rules, or routing specs are pushed in real-time.
  • Gateway pods apply these parameters in-memory immediately, without restart or downtime.

This enables dynamic changes via UI or GitOps workflows, without service disruption.

6. Monitoring & Observability

  • The gateway streams logs, metrics, and audit data asynchronously into ClickHouse for observability and analytics.
  • Even if telemetry systems are temporarily unavailable, core inference traffic remains unaffected, thanks to decoupling via message queue buffering.
  • Use dashboard views or exported logs for monitoring TTF, token usage, guardrail events, and audit trails.

7. Maintenance, Upgrades & Multi-Cluster Support

  • Upgrades to new TF releases are handled at the Helm chart level; most component upgrades (e.g., gateway pods, control-plane apps) can be done without downtime.
  • For larger setups, deploy gateway pods in multiple clusters or regions for disaster recovery and compliance segmentation.

With the gateway deployed, configured, and monitored, your on-prem AI stack is ready for production workloads. Next, we’ll cover best practices for operational excellence, security hardening, and governance-aligned scaling.

Challenges and Best Practices 

Deploying an on-prem AI gateway presents specific hurdles alongside proven solutions:

Security & resilience: On-prem setups face increased exposure to threats like DDoS attacks, prompt injection, data leakage, and model poisoning. Best practice is to adopt a zero-trust model with hardened per-request inspection and scalable DDoS protection systems.

Data protection & compliance: Enterprises must enforce stringent encryption for data at rest and in transit. Auditable access controls and robust audit logging are critical to meet GDPR, HIPAA, and similar regulatory standards; hence, using HSM-based key management within an air-gapped environment is recommended.

Scalability & performance: Gateway infrastructure must support horizontal scaling to avoid bottlenecks. Stateless proxy nodes combined with event-driven autoscaling help maintain low-latency throughput. Meanwhile, asynchronous logging ensures observability does not impair performance.

Operational best practices: Automate deployment and configuration using GitOps, integrate continuous monitoring, and maintain observability pipelines. Proactively audit model usage and guardrails to ensure ongoing compliance, safety, and cost control. These measures together ensure a reliable, secure, and compliant on-prem AI deployment.

Conclusion

On‑premise GenAI is evolving from a compliance fallback into a strategic differentiator. TrueFoundry’s on‑prem AI Gateway empowers enterprises with full control over infrastructure, models, and data, making it ideally suited for industries with stringent privacy and regulatory needs such as healthcare, finance, and government. While the setup requires initial investment, it offers long‑term cost predictability, auditability, and deep integration with internal systems. More than just a temporary solution, on‑prem deployment delivers agility, sovereignty, and scalability. As AI solutions become more mission‑critical, having a foundation in your environment ensures you can innovate confidently, securely, and at scale.

The fastest way to build, govern and scale your AI

Discover More

No items found.
December 30, 2025
|
5 min read

Turning AI Chaos into Control: A Conversation on Agentic AI with Tesseract Talks

No items found.
December 30, 2025
|
5 min read

Breaking Down AI Gateway Usage: Customer and User-Level Analytics

No items found.
December 30, 2025
|
5 min read

Rate Limiting in AI Gateway : The Ultimate Guide

No items found.
December 30, 2025
|
5 min read

AI Gateway: The Central Control Pane of Today’s Generative AI Infrastructure

Engineering and Product
No items found.

The Complete Guide to AI Gateways and MCP Servers

Simplify orchestration, enforce RBAC, and operationalize agentic AI with battle-tested patterns from TrueFoundry.
Take a quick product tour
Start Product Tour
Product Tour