Architecture of the TrueFoundry AI Gateway, designed for high availability, low latency, and scalable LLM integration in production environments.
The AI Gateway plane comprises of one or more deployments of the TrueFoundry AI Gateways.The AI Gateway is like a proxy between your application and the LLM provider. It lies in the critical path of production traffic, and hence needs to be highly available and performant. TrueFoundry AI Gateway has been designed to be a low-latency, and high throughput AI Gateway.The AI Gateway is written using the Hono framework which is ultra-fast, minimalistic, and is designed for the edge. The architecture of AI Gateway is based on the following principles:
There are no external calls in the pathway of executing a request from the client to the LLM provider (unless we are using cache).
All checks for rate and budget limits, load balancing, authentication, and authorization are done in memory.
The logs and metrics are written to a queue in an async manner.
The AI Gateway never fails a request even if the external queue is down.
The AI Gateway is designed to be horizontally scalable and CPU bound so that it scaled nicely as number of requests increases.
It has a control plane, and proxy separation so that multiple AI Gateways can be deployed cross-region and configuration can be managed from a single place.
The AI Gateway plane is completely stateless, and subscribes to the control plane queue to fetch the configuration. If the queue is down, the AI Gateway will try to fetch the configuration from the control plane backend service via HTTP request.
TrueFoundry AI Gateway Architecture
The key components in the above diagram are:
Global Autentication/Licensing Server: This is a global licensing/authentication server. It is used to authenticate every user who logs into the control plane. In case, you are installing the control plane on your end, the Global Authentication server remains within TrueFoundry.
The only information that flows to global licensing/authentication server is the emails of the employees logging into the control plane, and the number of requests flowing through the AI Gateway.
Control Plane: This is the control plane that manages the configuration for the AI Gateway like models, virtual models, users, teams, virtual accounts, rate and budget limiting config, legacy routing configuration, and related settings. The configuration is synced to the AI Gateway via the NATS queue.
Gateway Plane: The AI Gateway plane handles all the requests from the users/applications to the LLM/MCP servers.
Request Flow
Here’s how an LLM request flows through the AI Gateway:The key steps in the request flow are:
1
User makes a request to the AI Gateway
The user will make a request to the AI Gateway with a valid JWT key, and in the OpenAI-compatible API format.
2
AI Gateway validates the request
The AI Gateway will validate the request to check if the JWT token is valid. It also validates if the user has access to the model. The AI Gateway subscribes to all the authorization rules and updates from control plane, and performs in-memory checks to ensure that the request is authenticated and authorized.
3
AI Gateway checks for rate and budget limiting rules
The AI Gateway will check for rate and budget limiting rules to ensure that the user is not exceeding any of the threshold limits.
4
AI Gateway selects the model based on the load balancing rules
AI Gateway then checks the load balancing rules to select the appropriate model for the request.
5
Router/Adapter translates the request to the appropriate model
Since the AI Gateway unifies the API of different LLM providers, it needs to translate the request to the format expected by the target LLM model. It then forwards the translated request to the model.
6
Handle Response from the model
If the model responds with a successful response, the response is forwarded to the user. The request data is sent for logging and metrics collection to the queue in an async manner. If the model responds with an error, the AI Gateway will check if any fallback model is configured. It will then retry the request to the fallback model.
7
Log the request and response
The request and response will be stored in the queue from where it is picked by the backend service and written to blob storage. The aggregation service calculates the metrics required for rate and budget limiting. The metrics are sent back to the queue to which the AI Gateway subscribes. Hence, all the AI Gateway pods refresh the updated rate and budget limits, and latency metrics in an async way.
AI Gateway Performance and Benchmarks
The AI Gateway has been benchmarked to handle 250 RPS on a single pod with 1 CPU and 1 GB of RAM. The key results of the benchmark are:Benchmarking Results:
High Scalability: TrueFoundry AI Gateway can scale without any degradation in performance until about 350 RPS with 1 vCPU & 1 GB machine before the CPU utilisation reaches 100%, and latencies start to get affected. With more CPU or more replicas, the AI Gateway can scale to tens of thousands of requests per second.
Minimal Overhead: TrueFoundry AI Gateway is continuously optimized and benchmarked to add as little latency as possible.
RPS
Tracing Disabled
Tracing Enabled (w/o Request Logs)
Complete Tracing
200 - 220
+7 ms
+7 ms
+8 ms
350 - 370
+7 ms
+7 ms
+12 ms
There is minimal overhead on the AI Gateway even after applying multiple authorization rules, load balancing, and rate and budget limiting configs.
🚀 Learn more on AI Gateway Benchmarks here: Read more
FAQ
Why does request and response data pass through the control plane instead of going directly from the gateway plane to S3?
TrueFoundry does more than archive raw request and response logs. It indexes and compacts the data in the control plane before writing it to S3. TrueFoundry has built a custom LLM database on top of S3 to support fast queries over this data. LLM observability can generate a high volume of data, with individual requests reaching several megabytes, so this processing lets observability scale while keeping storage and query costs low.The processing engine and infrastructure required for indexing and compaction are substantial. Hosting them in the control plane keeps the gateway plane lightweight and focused on serving LLM requests. Log ingestion happens asynchronously, outside the live request and response path.The following diagram separates asynchronous ingestion from viewing stored traces. Long-term request and response storage remains in S3 in your data plane; the control plane processes the data in transit during ingestion and retrieves it when you view traces.Even if the gateway wrote directly to S3, viewing those traces in TrueFoundry would require the data to flow from your data plane through the control plane. The ingestion path follows the same data-handling boundary: data passes through the control plane for processing, while long-term storage stays in your data plane. Writing raw logs directly to S3 does not provide the indexing, compaction, or query capabilities of TrueFoundry’s LLM database.
Can I keep request and response data out of the control plane and send it directly to S3 or my own monitoring solution?
If you self-host the gateway plane, you can use your own observability destination instead of relying on TrueFoundry for request and response body storage:
Disable request and response body logging in TrueFoundry using Logging Configuration, with rules that cover the traffic you want to exclude.
Metrics such as cost, token usage, and latency continue to be forwarded to the control plane. You can stop sending LLM prompt and response bodies, as well as MCP tool inputs and outputs, to the control plane using Logging Configuration.
We recommend keeping TrueFoundry observability enabled. Without LLM prompt and response bodies or MCP tool inputs and outputs, you lose the ability to inspect that content while debugging in TrueFoundry and the insights TrueFoundry derives from it. Metrics remain available. A direct S3 archive is not a replacement for TrueFoundry’s indexed LLM database.
What role does NATS play in the architecture?
NATS is used as the message broker between the control plane and the AI Gateway pods. The control plane publishes all updates to this queue which is instantly propagated to all the AI Gateway pods. This data includes the users, authorization data between users and models, the load-balancing configs, and the aggregated data for each segment and model for the AI Gateway to perform ratelimiting with in-memory checks. NATS also serves as a cache to store the data temporarily since it provides key-value store with TTL functionality.After every request that passes through the AI Gateway, the AI Gateway pod publishes an event to NATS containing the input tokens, output tokens, latency, cost, model name, etc. The control plane has an aggregator service that subscribes to NATS for all these updates. It then calculates aggregates of latency per model, total cost per user, model, team or any other custom segment defined by the user in the load-balancing / rate and budget limiting configs. The aggregated data is then again published to NATS by the aggregator service. The AI Gateway pods subscribe to NATS for this aggregated data. The aggregated data is updated in the in-memory store of the AI Gateway pods, using which all the checks for rate and budget limiting, and load-balancing are performed.
How does the AI Gateway enforce rate limiting?
TrueFoundry AI Gateway uses the Sliding Window Token Bucket algorithm to enforce rate limiting. Since the minimum unit of rate limiting is on a per-minute window for LLM traffic, the AI Gateway maintains a sliding window of 60 seconds to track the number of requests. The AI Gateway also maintains a token bucket for each user, model, team, or any other custom segment defined by the user in the load-balancing / rate and budget limiting configs for every 5 seconds. So to calculate the counter in the last 50 seconds, it sums up the tokens in the last 12 buckets. The older buckets are removed from the sliding window.
How is the AI Gateway updated about the configuration changes in control plane?
The AI Gateway uses the control plane to fetch all the configuration data for models, users, virtual accounts, ratelimiting, routing configs, SSO configuration when it starts up. It also subscribes to the NATS queue to remain updated about any configuration changes realtime. If the NATS queue is down for some reason and the AI Gateway cannot connect to it, it also tries to get the configuration from the control plane backend service via HTTP request. If this also fails, the AI Gateway will not startup and the readiness probe of gateway pods will fail - which will instruct Kubernetes to not direct any traffic to the AI Gateway pod. Getting the configuration from control plane via the REST API call is implemented as an additional fail-safe mechanism in case the control plane is up partially.If NATS queue is up, the AI Gateway will sync configs in realtime. If NATS queue is down, and backend service is up, the sync will happen only at startup and no further sync will happen till NATS comes back online. Once it comes back up, all configuration will be automatically synced to Gateway and it will be fully reconciled with th control-plane configuration.
Will AI Gateway continue to work if control plane is down?
The AI Gateway continues to work with whatever configuration it has already fetched from the control plane and doesn’t go down even if the control plane is down. Once control plane is back up, all the configuration that hasn’t synced automatically syncs up with the AI Gateway. If the AI Gateways pods restart while the control plane is down and both NATS and backend service are down in the control plane, the AI Gateway pod that has restarted will not startup. We recommend to keep multiple pods of AI Gateway in a deployment so that the chances of all of them restarting when the control plane is down are minimal. The AI Gateway pods’ readiness probe succeeds only when all configuration has been synced from the control plane - before that, no traffic is directed by Kubernetes to the AI Gateway pod.
Is there a chance of configuration drift between control plane and AI Gateway?
We use NATS with at least once guarantee. The payload in NATS is idempotent - which means that the entire state of configuration is published from the control plane to NATS. So publishing the same payload multiple times has no impact on the state of the configuration and hence AI Gateway functionality.However, in some failure scenarios, its possible that AI Gateway misses one of the updates from the control plane. To mitigate this case further, the control plane publishes the entire configuration every 10 mins. This makes sure that all AI Gateways are synced every 10 mins even if one intermediate update was missed. This ensures eventual consistency and makes sure that there is no configuration drift between control plane and AI Gateway.
How does authentication and authorization work in the AI Gateway?
The AI Gateway syncs the SSO configuration from the control plane via NATS. Once the AI Gateway knows the Issuer URl, we download the public keys to verify the JWT token and cache them in the AI Gateway pod. Every request that hits the AI Gateway is verified using the public key cached and hence doesn’t require any external calls to verify the JWT token. For authorization, the entire map of users, models and their associations are kept in memory in the AI Gateway pod. The authorization check is done in memory and hence doesn’t require any external calls. Since users and models are essentially small strings, this doesn’t take any significant memory and the authorization checks are very fast.
How to configure forward proxy for air-gapped clusters?
In air-gapped environments where the AI Gateway cannot directly access the internet, you can configure a forward proxy to enable external connectivity. The forward proxy acts as an intermediary that routes all external requests (model calls, MCP requests, guardrails) from the AI Gateway to the internet.
Air-gapped Environment with Forward Proxy Architecture
Configure Gateway Environment Variables
Ensure you have a forward proxy deployed and accessible before configuring these environment variables.
Set these environment variables in your Gateway deployment:
HTTPS_PROXY: Proxy endpoint URL for HTTPS requests
NO_PROXY: Comma-separated list of endpoints (hostnames, domains, or IPs) that should bypass the proxy
For same-cluster proxy: Use Kubernetes service DNS format: <service-name>.<namespace>.svc.cluster.local:<port>
For external proxy: Use the exposed proxy URL and ensure TCP traffic is allowed from gateway pods to the proxy endpoint
I don't have a forward proxy. How do I deploy one?
If you don’t have an existing forward proxy, you can use the TrueFoundry Squid Proxy Helm chart to deploy a Squid proxy.Example Squid configuration:
# Listens on 3128http_port 3128# No cachingcache deny all# Allow all by defaulthttp_access allow all
Customize the Squid config based on your security requirements (authentication, domain restrictions).
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TrueFoundry Docs","description":"TrueFoundry documentation — enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","colors":{"primary":"#4f46e5","light":"#4f46e5","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20","dark":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/dark.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=c1cb26554a546d84500b40f7057bece8"},"favicon":"https://mintcdn.com/truefoundry/6bbtTt95c1iCcyph/favicon.svg?fit=max\u0026auto=format\u0026n=6bbtTt95c1iCcyph\u0026q=85\u0026s=f55bde34214b38034126d05b08ea16c7","appearance":{"default":"light"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"https://www.truefoundry.com/book-demo","label":"Book Demo"},{"href":"https://www.truefoundry.com/blog","label":"Blog"}],"primary":{"type":"button","label":"Sign Up","href":"https://www.truefoundry.com/register"}},"footer":{"socials":{"x":"https://twitter.com/truefoundry","linkedin":"https://in.linkedin.com/company/truefoundry"}},"seo":{"metatags":{"og:type":"website","og:site_name":"TrueFoundry Docs","og:image":"https://assets.production.truefoundry.com/logo.svg","og:description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane."}},"icons":{"library":"fontawesome"},"styling":{"codeblocks":"dark","latex":true},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"truefoundry","hasAudioNarration":false,"actualSubdomain":"truefoundry","customDomains":["www.truefoundry.com"],"gitSource":{"type":"github","owner":"truefoundry","repo":"docs-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b044b687a57ff01f3ebe2e1","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"AI Gateway","count":253},{"language":"default","tag":"API Reference","count":202},{"language":"default","tag":"Platform","count":198},{"language":"default","tag":"Integrations","count":138},{"language":"default","tag":"LLM Gateway","count":118},{"language":"default","tag":"AI Deployment","count":109},{"language":"default","tag":"Integrate Models","count":51},{"language":"default","tag":"Guardrails and Security","count":48},{"language":"default","tag":"Observability","count":47},{"language":"default","tag":"MCP Servers","count":44}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"[email protected]","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".line-highlight{background:rgb(var(--primary-light)/.7)!important}.tfy-cat-anchor{scroll-margin-top:6rem;margin-block:1.75rem}.line-highlight:before{background:rgb(var(--primary-light)/.7)!important}.line-highlight:after{background:rgb(var(--primary-light)/.7)!important}"}]}
{"page":{"pagePath":"docs/platform/gateway-plane-architecture","slug":"/docs/platform/gateway-plane-architecture","pageMetadata":{"title":"TrueFoundry AI Gateway Plane Architecture","sidebarTitle":"Gateway Plane","description":"Architecture of the TrueFoundry AI Gateway, designed for high availability, low latency, and scalable LLM integration in production environments.","href":"/docs/platform/gateway-plane-architecture"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Architecture of the TrueFoundry AI Gateway, designed for high availability, low latency, and scalable LLM integration in production environments.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,Frame,Heading,Info,Mermaid,Note,OptimizedImage,Step,Steps,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The AI Gateway plane comprises of one or more deployments of the TrueFoundry AI Gateways.`}),`\n`,_jsx(_components.p,{children:`The AI Gateway is like a proxy between your application and the LLM provider. It lies in the critical path of production traffic, and hence needs to be highly available and performant. TrueFoundry AI Gateway has been designed to be a low-latency, and high throughput AI Gateway.`}),`\n`,_jsxs(_components.p,{children:[`The AI Gateway is written using the `,_jsx(_components.a,{href:`https://hono.dev/`,children:`Hono`}),` framework which is ultra-fast, minimalistic, and is designed for the edge. The architecture of AI Gateway is based on the following principles:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`There are no external calls in the pathway of executing a request from the client to the LLM provider (unless we are using cache).`}),`\n`,_jsx(_components.li,{children:`All checks for rate and budget limits, load balancing, authentication, and authorization are done in memory.`}),`\n`,_jsx(_components.li,{children:`The logs and metrics are written to a queue in an async manner.`}),`\n`,_jsx(_components.li,{children:`The AI Gateway never fails a request even if the external queue is down.`}),`\n`,_jsx(_components.li,{children:`The AI Gateway is designed to be horizontally scalable and CPU bound so that it scaled nicely as number of requests increases.`}),`\n`,_jsx(_components.li,{children:`It has a control plane, and proxy separation so that multiple AI Gateways can be deployed cross-region and configuration can be managed from a single place.`}),`\n`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`The AI Gateway plane is completely stateless, and subscribes to the control plane queue to fetch the configuration. If the queue is down, the AI Gateway will try to fetch the configuration from the control plane backend service via HTTP request.`})}),`\n`,_jsx(Frame,{caption:`TrueFoundry AI Gateway Architecture`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/Gz34IEy99_S9XhHC/images/docs/platform/gateway-plane-architecture.png?fit=max\u0026auto=format\u0026n=Gz34IEy99_S9XhHC\u0026q=85\u0026s=69c594438268a63376d17c818ddffc67`,alt:`TrueFoundry AI Gateway Architecture`,\"data-og-width\":`3972`,width:`3972`,\"data-og-height\":`2327`,height:`2327`,\"data-path\":`images/docs/platform/gateway-plane-architecture.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/Gz34IEy99_S9XhHC/images/docs/platform/gateway-plane-architecture.png?w=280\u0026fit=max\u0026auto=format\u0026n=Gz34IEy99_S9XhHC\u0026q=85\u0026s=e39db9b92cd60ae03ee5ce48836a882d 280w, https://mintcdn.com/truefoundry/Gz34IEy99_S9XhHC/images/docs/platform/gateway-plane-architecture.png?w=560\u0026fit=max\u0026auto=format\u0026n=Gz34IEy99_S9XhHC\u0026q=85\u0026s=7cc7bff014c4ae19f76e830fe0c1683d 560w, https://mintcdn.com/truefoundry/Gz34IEy99_S9XhHC/images/docs/platform/gateway-plane-architecture.png?w=840\u0026fit=max\u0026auto=format\u0026n=Gz34IEy99_S9XhHC\u0026q=85\u0026s=2c7fc0fe525530a198f950a008a493b6 840w, https://mintcdn.com/truefoundry/Gz34IEy99_S9XhHC/images/docs/platform/gateway-plane-architecture.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Gz34IEy99_S9XhHC\u0026q=85\u0026s=07fe5d215e208967e0b4d4df72993068 1100w, https://mintcdn.com/truefoundry/Gz34IEy99_S9XhHC/images/docs/platform/gateway-plane-architecture.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Gz34IEy99_S9XhHC\u0026q=85\u0026s=dc31b1a94236559982d646650b036150 1650w, https://mintcdn.com/truefoundry/Gz34IEy99_S9XhHC/images/docs/platform/gateway-plane-architecture.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Gz34IEy99_S9XhHC\u0026q=85\u0026s=262be2c1ecd40e1b739e19a0c8d1cbb9 2500w`})}),`\n`,_jsx(_components.p,{children:`The key components in the above diagram are:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Global Autentication/Licensing Server`}),`: This is a global licensing/authentication server. It is used to authenticate every user who logs into the control plane. In case, you are installing the control plane on your end, the Global Authentication server remains within TrueFoundry.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`The only information that flows to global licensing/authentication server is the emails of the employees logging into the control plane, and the number of requests flowing through the AI Gateway.`})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Control Plane`}),`: This is the control plane that manages the configuration for the AI Gateway like models, virtual models, users, teams, virtual accounts, rate and budget limiting config, legacy routing configuration, and related settings. The configuration is synced to the AI Gateway via the NATS queue.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Gateway Plane`}),`: The AI Gateway plane handles all the requests from the users/applications to the LLM/MCP servers.`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-flow`,children:`Request Flow`}),`\n`,_jsx(_components.p,{children:`Here’s how an LLM request flows through the AI Gateway:`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/JFTbQOWMkMfvFjDC/images/ai-gateway-request-flow-dia-2.png?fit=max\u0026auto=format\u0026n=JFTbQOWMkMfvFjDC\u0026q=85\u0026s=3544ba2cabb27b90d902cd55382fffaa`,alt:`Diagram illustrating the request flow through the AI Gateway, from user to LLM provider and back`,\"data-og-width\":`6179`,width:`6179`,\"data-og-height\":`3992`,height:`3992`,\"data-path\":`images/ai-gateway-request-flow-dia-2.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/JFTbQOWMkMfvFjDC/images/ai-gateway-request-flow-dia-2.png?w=280\u0026fit=max\u0026auto=format\u0026n=JFTbQOWMkMfvFjDC\u0026q=85\u0026s=4e7f41d2fc16dbc208cbcfdf8128f9a0 280w, https://mintcdn.com/truefoundry/JFTbQOWMkMfvFjDC/images/ai-gateway-request-flow-dia-2.png?w=560\u0026fit=max\u0026auto=format\u0026n=JFTbQOWMkMfvFjDC\u0026q=85\u0026s=ba8c0a3ee76f4f1493f13c2491028830 560w, https://mintcdn.com/truefoundry/JFTbQOWMkMfvFjDC/images/ai-gateway-request-flow-dia-2.png?w=840\u0026fit=max\u0026auto=format\u0026n=JFTbQOWMkMfvFjDC\u0026q=85\u0026s=78f5830392b30a43831f68914161feff 840w, https://mintcdn.com/truefoundry/JFTbQOWMkMfvFjDC/images/ai-gateway-request-flow-dia-2.png?w=1100\u0026fit=max\u0026auto=format\u0026n=JFTbQOWMkMfvFjDC\u0026q=85\u0026s=0b2ca7e2a1465c9e888c49b90e8248d0 1100w, https://mintcdn.com/truefoundry/JFTbQOWMkMfvFjDC/images/ai-gateway-request-flow-dia-2.png?w=1650\u0026fit=max\u0026auto=format\u0026n=JFTbQOWMkMfvFjDC\u0026q=85\u0026s=1cceec37b621f0745e3a204e516dc158 1650w, https://mintcdn.com/truefoundry/JFTbQOWMkMfvFjDC/images/ai-gateway-request-flow-dia-2.png?w=2500\u0026fit=max\u0026auto=format\u0026n=JFTbQOWMkMfvFjDC\u0026q=85\u0026s=b6d626a5f4302b7313c7a5dc88a5e98b 2500w`}),`\n`,_jsx(_components.p,{children:`The key steps in the request flow are:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`User makes a request to the AI Gateway`,children:_jsx(_components.p,{children:`The user will make a request to the AI Gateway with a valid JWT key, and in the OpenAI-compatible API format.`})}),_jsx(Step,{title:`AI Gateway validates the request`,children:_jsx(_components.p,{children:`The AI Gateway will validate the request to check if the JWT token is valid. It also validates if the user has access to the model. The AI Gateway subscribes to all the authorization rules and updates from control plane, and performs in-memory checks to ensure that the request is authenticated and authorized.`})}),_jsx(Step,{title:`AI Gateway checks for rate and budget limiting rules`,children:_jsx(_components.p,{children:`The AI Gateway will check for rate and budget limiting rules to ensure that the user is not exceeding any of the threshold limits.`})}),_jsx(Step,{title:`AI Gateway selects the model based on the load balancing rules`,children:_jsx(_components.p,{children:`AI Gateway then checks the load balancing rules to select the appropriate model for the request.`})}),_jsx(Step,{title:`Router/Adapter translates the request to the appropriate model`,children:_jsx(_components.p,{children:`Since the AI Gateway unifies the API of different LLM providers, it needs to translate the request to the format expected by the target LLM model. It then forwards the translated request to the model.`})}),_jsx(Step,{title:`Handle Response from the model`,children:_jsx(_components.p,{children:`If the model responds with a successful response, the response is forwarded to the user. The request data is sent for logging and metrics collection to the queue in an async manner. If the model responds with an error, the AI Gateway will check if any fallback model is configured. It will then retry the request to the fallback model.`})}),_jsx(Step,{title:`Log the request and response`,children:_jsxs(_components.p,{children:[`The request and response will be stored in the queue from where it is picked by the backend service and written to blob storage. `,_jsx(_components.strong,{children:`The aggregation service calculates the metrics required for rate and budget limiting`}),`. The metrics are sent back to the queue to which the AI Gateway subscribes. Hence, all the AI Gateway pods refresh the updated rate and budget limits, and latency metrics in an async way.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`ai-gateway-performance-and-benchmarks`,children:`AI Gateway Performance and Benchmarks`}),`\n`,_jsx(_components.p,{children:`The AI Gateway has been benchmarked to handle 250 RPS on a single pod with 1 CPU and 1 GB of RAM. The key results of the benchmark are:`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Benchmarking Results:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`High Scalability`}),`: TrueFoundry AI Gateway can scale without any degradation in performance until about 350 RPS with 1 vCPU \u0026 1 GB machine before the CPU utilisation reaches 100%, and latencies start to get affected. With more CPU or more replicas, the AI Gateway can scale to tens of thousands of requests per second.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Minimal Overhead`}),`: TrueFoundry AI Gateway is continuously optimized and benchmarked to add as little latency as possible.`]}),`\n`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`RPS`}),_jsx(_components.th,{children:`Tracing Disabled`}),_jsx(_components.th,{children:`Tracing Enabled (w/o Request Logs)`}),_jsx(_components.th,{children:`Complete Tracing`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`200 - 220`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`+7 ms`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`+7 ms`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`+8 ms`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`350 - 370`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`+7 ms`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`+7 ms`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`+12 ms`})]})]})]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`There is minimal overhead on the AI Gateway even after applying multiple authorization rules, load balancing, and rate and budget limiting configs.`}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(Heading,{level:`3`,id:`-learn-more-on-ai-gateway-benchmarks-here-read-more`,children:[`🚀 Learn more on AI Gateway Benchmarks here: `,_jsx(_components.a,{href:`https://www.truefoundry.com/blog/truefoundry-llm-gateway-is-blazing-fast`,children:`Read more`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`faq`,children:`FAQ`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Why does request and response data pass through the control plane instead of going directly from the gateway plane to S3?`,id:`why-does-request-and-response-data-pass-through-the-control-plane-instead-of-going-directly-from-the-gateway-plane-to-s3`,children:[_jsx(_components.p,{children:`TrueFoundry does more than archive raw request and response logs. It indexes and compacts the data in the control plane before writing it to S3. TrueFoundry has built a custom LLM database on top of S3 to support fast queries over this data. LLM observability can generate a high volume of data, with individual requests reaching several megabytes, so this processing lets observability scale while keeping storage and query costs low.`}),_jsx(_components.p,{children:`The processing engine and infrastructure required for indexing and compaction are substantial. Hosting them in the control plane keeps the gateway plane lightweight and focused on serving LLM requests. Log ingestion happens asynchronously, outside the live request and response path.`}),_jsx(_components.p,{children:`The following diagram separates asynchronous ingestion from viewing stored traces. Long-term request and response storage remains in S3 in your data plane; the control plane processes the data in transit during ingestion and retrieves it when you view traces.`}),_jsx(Mermaid,{chart:`flowchart TB\n accTitle: Request and response log ingestion and viewing\n accDescr: The gateway asynchronously sends logs to the control plane for indexing and compaction before they are stored in S3 in the data plane. When a user views traces, the control plane reads the stored data from S3 and returns it to the user.\n subgraph GP[\"Gateway plane\"]\n GW[\"AI Gateway\"]\n end\n subgraph CP[\"Control plane\"]\n ING[\"Index and compact logs\"]\n QUERY[\"Query stored traces\"]\n end\n subgraph DP[\"Your data plane\"]\n S3[(\"S3: long-term storage\")]\n end\n UI[\"User viewing traces\"]\n\n GW -- \"Asynchronous log ingestion\" --> ING\n ING -- \"Write processed data\" --> S3\n UI -. \"View traces\" .-> QUERY\n QUERY -. \"Read stored data\" .-> S3\n S3 -. \"Return matching data\" .-> QUERY\n QUERY -. \"Display traces\" .-> UI`}),_jsx(_components.p,{children:`Even if the gateway wrote directly to S3, viewing those traces in TrueFoundry would require the data to flow from your data plane through the control plane. The ingestion path follows the same data-handling boundary: data passes through the control plane for processing, while long-term storage stays in your data plane. Writing raw logs directly to S3 does not provide the indexing, compaction, or query capabilities of TrueFoundry’s LLM database.`})]}),_jsxs(Accordion,{title:`Can I keep request and response data out of the control plane and send it directly to S3 or my own monitoring solution?`,id:`can-i-keep-request-and-response-data-out-of-the-control-plane-and-send-it-directly-to-s3-or-my-own-monitoring-solution`,children:[_jsx(_components.p,{children:`If you self-host the gateway plane, you can use your own observability destination instead of relying on TrueFoundry for request and response body storage:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Disable request and response body logging in TrueFoundry using `,_jsx(_components.a,{href:`/docs/ai-gateway/logging-config#log-requests`,children:`Logging Configuration`}),`, with rules that cover the traffic you want to exclude.`]}),`\n`,_jsxs(_components.li,{children:[`Configure `,_jsx(_components.a,{href:`/docs/ai-gateway/export-opentelemetry-data#exporting-traces-to-otel-compatible-platforms-via-gateway-plane`,children:`OpenTelemetry export from the gateway plane`}),` to send traces to your own monitoring solution. The same guide includes a `,_jsx(_components.a,{href:`/docs/ai-gateway/export-opentelemetry-data#how-do-i-send-traces-to-an-amazon-s3-bucket-directly-from-the-gateway-plane`,children:`direct Amazon S3 sink configuration`}),`.`]}),`\n`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Metrics such as cost, token usage, and latency continue to be forwarded to the control plane. You can stop sending LLM prompt and response bodies, as well as MCP tool inputs and outputs, to the control plane using `,_jsx(_components.a,{href:`/docs/ai-gateway/logging-config#log-requests`,children:`Logging Configuration`}),`.`]})}),_jsx(_components.p,{children:`We recommend keeping TrueFoundry observability enabled. Without LLM prompt and response bodies or MCP tool inputs and outputs, you lose the ability to inspect that content while debugging in TrueFoundry and the insights TrueFoundry derives from it. Metrics remain available. A direct S3 archive is not a replacement for TrueFoundry’s indexed LLM database.`})]}),_jsxs(Accordion,{title:`What role does NATS play in the architecture?`,id:`what-role-does-nats-play-in-the-architecture`,children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://nats.io/`,children:`NATS`}),` is used as the message broker between the control plane and the AI Gateway pods. The control plane publishes all updates to this queue which is instantly propagated to all the AI Gateway pods. This data includes the users, authorization data between users and models, the load-balancing configs, and the aggregated data for each segment and model for the AI Gateway to perform ratelimiting with in-memory checks. NATS also serves as a cache to store the data temporarily since it provides `,_jsx(_components.a,{href:`https://docs.nats.io/nats-concepts/jetstream/key-value-store`,children:`key-value store with TTL functionality`}),`.`]}),_jsx(_components.p,{children:`After every request that passes through the AI Gateway, the AI Gateway pod publishes an event to NATS containing the input tokens, output tokens, latency, cost, model name, etc. The control plane has an aggregator service that subscribes to NATS for all these updates. It then calculates aggregates of latency per model, total cost per user, model, team or any other custom segment defined by the user in the load-balancing / rate and budget limiting configs. The aggregated data is then again published to NATS by the aggregator service. The AI Gateway pods subscribe to NATS for this aggregated data. The aggregated data is updated in the in-memory store of the AI Gateway pods, using which all the checks for rate and budget limiting, and load-balancing are performed.`})]}),_jsx(Accordion,{title:`How does the AI Gateway enforce rate limiting?`,id:`how-does-the-ai-gateway-enforce-rate-limiting`,children:_jsxs(_components.p,{children:[`TrueFoundry AI Gateway uses the `,_jsx(_components.a,{href:`https://blog.algomaster.io/p/rate-limiting-algorithms-explained-with-code`,children:`Sliding Window Token Bucket`}),` algorithm to enforce rate limiting. Since the minimum unit of rate limiting is on a per-minute window for LLM traffic, the AI Gateway maintains a sliding window of 60 seconds to track the number of requests. The AI Gateway also maintains a token bucket for each user, model, team, or any other custom segment defined by the user in the load-balancing / rate and budget limiting configs for every 5 seconds. So to calculate the counter in the last 50 seconds, it sums up the tokens in the last 12 buckets. The older buckets are removed from the sliding window.`]})}),_jsxs(Accordion,{title:`How is the AI Gateway updated about the configuration changes in control plane?`,id:`how-is-the-ai-gateway-updated-about-the-configuration-changes-in-control-plane`,children:[_jsxs(_components.p,{children:[`The AI Gateway uses the control plane to fetch all the configuration data for models, users, virtual accounts, ratelimiting, routing configs, SSO configuration when it starts up. It also subscribes to the NATS queue to remain updated about any configuration changes realtime. If the NATS queue is down for some reason and the AI Gateway cannot connect to it, it also tries to get the configuration from the control plane backend service via HTTP request. If this also fails, the AI Gateway will not startup and the readiness probe of gateway pods will fail - which will instruct Kubernetes to not direct any traffic to the AI Gateway pod. `,_jsx(_components.strong,{children:`Getting the configuration from control plane via the REST API call is implemented as an additional fail-safe mechanism in case the control plane is up partially.`})]}),_jsx(_components.p,{children:`If NATS queue is up, the AI Gateway will sync configs in realtime. If NATS queue is down, and backend service is up, the sync will happen only at startup and no further sync will happen till NATS comes back online. Once it comes back up, all configuration will be automatically synced to Gateway and it will be fully reconciled with th control-plane configuration.`})]}),_jsx(Accordion,{title:`Will AI Gateway continue to work if control plane is down?`,id:`will-ai-gateway-continue-to-work-if-control-plane-is-down`,children:_jsxs(_components.p,{children:[`The AI Gateway continues to work with whatever configuration it has already fetched from the control plane and doesn’t go down even if the control plane is down. Once control plane is back up, all the configuration that hasn’t synced automatically syncs up with the AI Gateway. If the AI Gateways pods restart while the control plane is down and both NATS and backend service are down in the control plane, the AI Gateway pod that has restarted will not startup. `,_jsx(_components.strong,{children:`We recommend to keep multiple pods of AI Gateway in a deployment so that the chances of all of them restarting when the control plane is down are minimal`}),`. The AI Gateway pods’ readiness probe succeeds only when all configuration has been synced from the control plane - before that, no traffic is directed by Kubernetes to the AI Gateway pod.`]})}),_jsxs(Accordion,{title:`Is there a chance of configuration drift between control plane and AI Gateway?`,id:`is-there-a-chance-of-configuration-drift-between-control-plane-and-ai-gateway`,children:[_jsx(_components.p,{children:`We use NATS with at least once guarantee. The payload in NATS is idempotent - which means that the entire state of configuration is published from the control plane to NATS. So publishing the same payload multiple times has no impact on the state of the configuration and hence AI Gateway functionality.`}),_jsx(_components.p,{children:`However, in some failure scenarios, its possible that AI Gateway misses one of the updates from the control plane. To mitigate this case further, the control plane publishes the entire configuration every 10 mins. This makes sure that all AI Gateways are synced every 10 mins even if one intermediate update was missed. This ensures eventual consistency and makes sure that there is no configuration drift between control plane and AI Gateway.`})]}),_jsx(Accordion,{title:`How does authentication and authorization work in the AI Gateway?`,id:`how-does-authentication-and-authorization-work-in-the-ai-gateway`,children:_jsx(_components.p,{children:`The AI Gateway syncs the SSO configuration from the control plane via NATS. Once the AI Gateway knows the Issuer URl, we download the public keys to verify the JWT token and cache them in the AI Gateway pod. Every request that hits the AI Gateway is verified using the public key cached and hence doesn’t require any external calls to verify the JWT token. For authorization, the entire map of users, models and their associations are kept in memory in the AI Gateway pod. The authorization check is done in memory and hence doesn’t require any external calls. Since users and models are essentially small strings, this doesn’t take any significant memory and the authorization checks are very fast.`})}),_jsxs(Accordion,{title:`How to configure forward proxy for air-gapped clusters?`,id:`how-to-configure-forward-proxy-for-air-gapped-clusters`,children:[_jsx(_components.p,{children:`In air-gapped environments where the AI Gateway cannot directly access the internet, you can configure a forward proxy to enable external connectivity. The forward proxy acts as an intermediary that routes all external requests (model calls, MCP requests, guardrails) from the AI Gateway to the internet.`}),_jsx(Frame,{caption:`Air-gapped Environment with Forward Proxy Architecture`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/hSvkwO1g5HqmgwD5/images/Screenshot2025-12-03at6.33.34PM.png?fit=max\u0026auto=format\u0026n=hSvkwO1g5HqmgwD5\u0026q=85\u0026s=fa713c4de8b5cbd135519d3239f21afb`,alt:`Air-gapped Environment with Forward Proxy Architecture`,\"data-og-width\":`2024`,width:`2024`,\"data-og-height\":`1050`,height:`1050`,\"data-path\":`images/Screenshot2025-12-03at6.33.34PM.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/hSvkwO1g5HqmgwD5/images/Screenshot2025-12-03at6.33.34PM.png?w=280\u0026fit=max\u0026auto=format\u0026n=hSvkwO1g5HqmgwD5\u0026q=85\u0026s=3fa18a1de45431ccb4445eece8e1023f 280w, https://mintcdn.com/truefoundry/hSvkwO1g5HqmgwD5/images/Screenshot2025-12-03at6.33.34PM.png?w=560\u0026fit=max\u0026auto=format\u0026n=hSvkwO1g5HqmgwD5\u0026q=85\u0026s=ecb29b644f3ffb8667948e6948238173 560w, https://mintcdn.com/truefoundry/hSvkwO1g5HqmgwD5/images/Screenshot2025-12-03at6.33.34PM.png?w=840\u0026fit=max\u0026auto=format\u0026n=hSvkwO1g5HqmgwD5\u0026q=85\u0026s=d697120e828bf2eaf4b5fde455c3f0dc 840w, https://mintcdn.com/truefoundry/hSvkwO1g5HqmgwD5/images/Screenshot2025-12-03at6.33.34PM.png?w=1100\u0026fit=max\u0026auto=format\u0026n=hSvkwO1g5HqmgwD5\u0026q=85\u0026s=f98c8ffcf3b72223a953dcf38de3b2cf 1100w, https://mintcdn.com/truefoundry/hSvkwO1g5HqmgwD5/images/Screenshot2025-12-03at6.33.34PM.png?w=1650\u0026fit=max\u0026auto=format\u0026n=hSvkwO1g5HqmgwD5\u0026q=85\u0026s=62c714b60e856a14ebefb25848b4c639 1650w, https://mintcdn.com/truefoundry/hSvkwO1g5HqmgwD5/images/Screenshot2025-12-03at6.33.34PM.png?w=2500\u0026fit=max\u0026auto=format\u0026n=hSvkwO1g5HqmgwD5\u0026q=85\u0026s=3b49b53880119cba38eb2d632a371d85 2500w`})}),_jsx(Heading,{level:`2`,id:`configure-gateway-environment-variables`,children:`Configure Gateway Environment Variables`}),_jsx(Note,{children:_jsx(_components.p,{children:`Ensure you have a forward proxy deployed and accessible before configuring these environment variables.`})}),_jsx(_components.p,{children:`Set these environment variables in your Gateway deployment:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`HTTP_PROXY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`http://forward-proxy.namespace.svc.cluster.local:3128`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`HTTPS_PROXY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`http://forward-proxy.namespace.svc.cluster.local:3128`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`NO_PROXY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`servicefoundry-server.truefoundry.svc.cluster.local,nats.truefoundry.svc.cluster.local`})]}),`\n`]})})}),_jsx(Info,{children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`HTTP_PROXY`}),`: Proxy endpoint URL for HTTP requests`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`HTTPS_PROXY`}),`: Proxy endpoint URL for HTTPS requests`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`NO_PROXY`}),`: Comma-separated list of endpoints (hostnames, domains, or IPs) that should bypass the proxy`]}),`\n`,_jsxs(_components.li,{children:[`For same-cluster proxy: Use Kubernetes service DNS format: `,_jsx(_components.code,{children:`\u003cservice-name>.\u003cnamespace>.svc.cluster.local:\u003cport>`})]}),`\n`,_jsx(_components.li,{children:`For external proxy: Use the exposed proxy URL and ensure TCP traffic is allowed from gateway pods to the proxy endpoint`}),`\n`]})}),_jsxs(Accordion,{title:`I don't have a forward proxy. How do I deploy one?`,id:`i-dont-have-a-forward-proxy-how-do-i-deploy-one`,children:[_jsxs(_components.p,{children:[`If you don’t have an existing forward proxy, you can use the `,_jsx(_components.a,{href:`https://github.com/truefoundry/infra-charts/tree/main/charts/tfy-squid-proxy`,children:`TrueFoundry Squid Proxy Helm chart`}),` to deploy a Squid proxy.`]}),_jsx(_components.p,{children:`Example Squid configuration:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Listens on 3128`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`http_port 3128`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# No caching`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cache deny all`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Allow all by default`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`http_access allow all`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(Note,{children:_jsx(_components.p,{children:`Customize the Squid config based on your security requirements (authentication, domain restrictions).`})})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"TrueFoundry AI Gateway Plane Architecture","sidebarTitle":"Gateway Plane","description":"Architecture of the TrueFoundry AI Gateway, designed for high availability, low latency, and scalable LLM integration in production environments.","href":"/docs/platform/gateway-plane-architecture"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request Flow","slug":"request-flow","depth":2,"children":[]},{"title":"AI Gateway Performance and Benchmarks","slug":"ai-gateway-performance-and-benchmarks","depth":2,"children":[{"title":"🚀 Learn more on AI Gateway Benchmarks here: Read more","slug":"-learn-more-on-ai-gateway-benchmarks-here-read-more","depth":3,"children":[]}]},{"title":"FAQ","slug":"faq","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/truefoundry/9e0085f7ed271180/scripts.js"],"subdomain":"truefoundry","siteName":"TrueFoundry Docs","title":"TrueFoundry AI Gateway Plane Architecture - TrueFoundry Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-15T23:49:52.201Z","originalFileLocation":"docs/platform/gateway-plane-architecture.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Architecture of the TrueFoundry AI Gateway, designed for high availability, low latency, and scalable LLM integration in production environments.\">\u003cmeta data-mint-head name=\"application-name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"TrueFoundry AI Gateway Plane Architecture - TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"TrueFoundry AI Gateway Plane Architecture - TrueFoundry Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/platform/gateway-plane-architecture.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.truefoundry.com/#organization\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.truefoundry.com#website\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture#webpage\",\"url\":\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture\",\"name\":\"TrueFoundry AI Gateway Plane Architecture\",\"description\":\"Architecture of the TrueFoundry AI Gateway, designed for high availability, low latency, and scalable LLM integration in production environments.\",\"dateModified\":\"2026-11-15T23:49:52.201Z\",\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platform\",\"item\":\"https://www.truefoundry.com/docs/platform/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Architecture\",\"item\":\"https://www.truefoundry.com/docs/platform/architecture\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"TrueFoundry AI Gateway Plane Architecture\",\"item\":\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture#article\",\"headline\":\"TrueFoundry AI Gateway Plane Architecture\",\"name\":\"TrueFoundry AI Gateway Plane Architecture\",\"description\":\"Architecture of the TrueFoundry AI Gateway, designed for high availability, low latency, and scalable LLM integration in production environments.\",\"url\":\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture\",\"mainEntityOfPage\":{\"@id\":\"https://www.truefoundry.com/docs/platform/gateway-plane-architecture#webpage\"},\"image\":\"https://assets.production.truefoundry.com/logo.svg\",\"dateModified\":\"2026-11-15T23:49:52.201Z\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TrueFoundry Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"TrueFoundry Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/platform/gateway-plane-architecture.md","siteName":"TrueFoundry Docs","nav":{"global":null,"tabs":[{"tab":"AI Gateway","pages":[{"title":"AI Gateway","href":"/docs/ai-gateway/intro-to-llm-gateway"}]},{"tab":"Agent Platform","pages":[{"title":"Agent Platform","href":"/docs/agent-platform/agent-harness/overview"}]},{"tab":"Platform","groups":[{"group":"Platform","pages":[{"title":"TrueFoundry Overview","sidebarTitle":"Overview","href":"/docs/platform/overview"},{"group":"Architecture","pages":[{"title":"TrueFoundry Architecture","sidebarTitle":"Overview","href":"/docs/platform/architecture"},{"title":"TrueFoundry Control Plane","sidebarTitle":"Control Plane","description":"Architecture of the TrueFoundry Control Plane which is the brain of the TrueFoundry platform.","href":"/docs/platform/control-plane-architecture"},{"title":"TrueFoundry AI Gateway Plane Architecture","sidebarTitle":"Gateway Plane","href":"/docs/platform/gateway-plane-architecture"},{"title":"TrueFoundry Compute Plane Architecture","sidebarTitle":"Compute Plane","description":"Architecture of the TrueFoundry Compute Plane which handles all the models, services, jobs, and pipelines deployed by the users.","href":"/docs/platform/compute-plane-architecture"}]},{"group":"Identity and Access Management","pages":[{"title":"Identity and Access Management Overview","sidebarTitle":"Overview","href":"/docs/platform/user-team-account-management"},{"title":"Manage Users","href":"/docs/platform/user-management"},{"title":"Manage Teams","href":"/docs/platform/team-management"},{"title":"Manage Virtual Accounts","href":"/docs/platform/virtual-account-management"},{"title":"Manage User Roles \u0026 Permissions","href":"/docs/platform/manage-user-roles-and-permissions"},{"title":"API Keys","sidebarTitle":"API Keys","href":"/docs/generating-truefoundry-api-keys"},{"group":"Identity Providers","pages":[{"title":"Identity Providers","sidebarTitle":"Overview","href":"/docs/platform/identity-providers/overview"},{"title":"External JWT","sidebarTitle":"External JWT","href":"/docs/platform/identity-providers/external-jwt"},{"group":"Workload Identity Federation","pages":[{"title":"Workload Identity Federation","sidebarTitle":"Overview","href":"/docs/platform/identity-providers/workload-identity-federation/overview"},{"title":"GitHub Actions","sidebarTitle":"GitHub Actions","href":"/docs/platform/identity-providers/workload-identity-federation/github-actions"},{"title":"Kubernetes","sidebarTitle":"Kubernetes","href":"/docs/platform/identity-providers/workload-identity-federation/kubernetes"},{"title":"AWS","sidebarTitle":"AWS","href":"/docs/platform/identity-providers/workload-identity-federation/aws"},{"title":"GCP","sidebarTitle":"GCP","href":"/docs/platform/identity-providers/workload-identity-federation/gcp"}]}]}]},{"group":"SSO \u0026 SCIM Provisioning","pages":[{"title":"SSO \u0026 SCIM Overview","sidebarTitle":"Overview","href":"/docs/platform/sso/overview"},{"group":"Microsoft Entra ID","pages":[{"title":"SAML with Microsoft Entra ID","sidebarTitle":"SSO via SAML","href":"/docs/platform/sso/entra/saml"},{"title":"OIDC with Microsoft Entra ID","sidebarTitle":"SSO via OIDC","href":"/docs/platform/sso/entra/oidc"},{"title":"SCIM with Microsoft Entra ID","sidebarTitle":"Setup SCIM","href":"/docs/platform/sso/entra/scim"}]},{"group":"Okta","pages":[{"title":"SAML with Okta","sidebarTitle":"SSO via SAML","href":"/docs/platform/sso/okta/saml"},{"title":"SSO: OIDC with Okta","sidebarTitle":"SSO via OIDC","href":"/docs/platform/sso/okta/oidc"},{"title":"SSO: Okta OIN","sidebarTitle":"SSO via OIN","href":"/docs/platform/sso/okta/oin"},{"title":"SCIM with Okta","sidebarTitle":"Setup SCIM","href":"/docs/platform/sso/okta/scim"}]},{"group":"Google Workspace","pages":[{"title":"SAML with Google Workspace","sidebarTitle":"SSO via SAML","href":"/docs/platform/sso/google/saml"}]},{"group":"JumpCloud","pages":[{"title":"SAML with JumpCloud","sidebarTitle":"SSO via SAML","href":"/docs/platform/sso/jumpcloud/saml"},{"title":"SCIM with JumpCloud","sidebarTitle":"Setup SCIM","href":"/docs/platform/sso/jumpcloud/scim"}]},{"group":"OneLogin","pages":[{"title":"SAML with OneLogin","sidebarTitle":"SSO via SAML","href":"/docs/platform/sso/onelogin/saml"},{"title":"SCIM with OneLogin","sidebarTitle":"Setup SCIM","href":"/docs/platform/sso/onelogin/scim"}]},{"group":"Auth0","pages":[{"title":"OIDC with Auth0","sidebarTitle":"SSO via OIDC","href":"/docs/platform/sso/auth0/oidc"},{"title":"SAML with Auth0","sidebarTitle":"SSO via SAML","href":"/docs/platform/sso/auth0/saml"}]},{"group":"Keycloak","pages":[{"title":"SSO: OIDC with Keycloak","sidebarTitle":"SSO via OIDC","href":"/docs/platform/sso/keycloak/oidc"}]},{"group":"Microsoft AD FS","pages":[{"title":"SAML with Microsoft AD FS","sidebarTitle":"SSO via SAML","href":"/docs/platform/sso/adfs/saml"}]},{"group":"PingOne","pages":[{"title":"SAML with PingOne","sidebarTitle":"SSO via SAML","href":"/docs/platform/sso/pingone/saml"}]},{"group":"Rippling","pages":[{"title":"SAML with Rippling","sidebarTitle":"SSO via SAML","href":"/docs/platform/sso/rippling/saml"}]},{"title":"SAML with a Custom Identity Provider","sidebarTitle":"Custom SAML","href":"/docs/platform/sso/custom-saml"},{"title":"OIDC with a Custom Identity Provider","sidebarTitle":"Custom OIDC","href":"/docs/platform/sso/custom-oidc"},{"title":"External SSO (OIDC/SAML)","href":"/docs/deploy-control-plane-with-external-oauth"}]},{"title":"Setup For CLI","href":"/docs/setup-cli"},{"title":"Repositories","href":"/docs/platform/repositories"},{"group":"Integrations","pages":[{"title":"Integrations","sidebarTitle":"Overview","href":"/docs/integrations-overview"},{"title":"AWS Integration","sidebarTitle":"AWS","href":"/docs/integration-provider-aws"},{"title":"GCP Integration","sidebarTitle":"GCP","href":"/docs/integration-provider-gcp"},{"title":"Azure Integration","sidebarTitle":"Azure","href":"/docs/integration-provider-azure"},{"title":"Github","href":"/docs/github-integration-set-up"},{"title":"Gitlab","href":"/docs/gitlab-integration-set-up"},{"title":"Bitbucket","href":"/docs/bitbucket-integration-set-up"},{"title":"Bitbucket Integration using PAT","href":"/docs/bitbucket-data-center-pat-integration"},{"title":"Azure Repos","href":"/docs/azure-repos-integration-set-up"},{"title":"PagerDuty","href":"/docs/pagerduty-integration"},{"title":"MS Teams","href":"/docs/ms-teams-integration"},{"title":"Slack","href":"/docs/slack-bot-integration"},{"title":"Email Integration","href":"/docs/email-integration"},{"title":"Webhook Notification Channel","href":"/docs/webhook-notification-integration"},{"title":"HashiCorp Vault","href":"/docs/hashicorp"}]},{"title":"Setup GitOps","href":"/docs/setup-gitops-using-truefoundry"},{"title":"Audit Logging","href":"/docs/platform/audit-logging"},{"title":"Interact with TrueFoundry using AI","sidebarTitle":"Interact using AI","href":"/docs/interact-with-tfy-using-ai"},{"group":"Installation Guides","pages":[{"title":"Installation and Deployment Overview","sidebarTitle":"Overview","href":"/docs/platform/deployment-overview"},{"group":"Deploy Compute Plane","pages":[{"title":"Deploy Compute Plane","sidebarTitle":"Overview","href":"/docs/infrastructure/deploy-compute-plane"},{"group":"Installation Guides","pages":[{"title":"AWS Compute Plane Setup","sidebarTitle":"AWS","href":"/docs/infrastructure/aws-compute-plane-setup"},{"title":"GCP Compute Plane Setup","sidebarTitle":"GCP","href":"/docs/infrastructure/gcp-compute-plane-setup"},{"title":"Azure Compute Plane Setup","sidebarTitle":"Azure","href":"/docs/infrastructure/azure-compute-plane-setup"},{"title":"Generic","href":"/docs/infrastructure/generic-compute-plane-setup"}]},{"group":"Advanced Configuration","pages":[{"title":"LoadBalancer/Ingress","href":"/docs/loadbalancers"},{"title":"TFY Agent","href":"/docs/tfy-agent"},{"title":"Multiple clusters with one TFY Agent","href":"/docs/infrastructure/multi-logical-clusters-tfy-agent"},{"title":"Custom CA Certificate Injection","href":"/docs/infrastructure/custom-ca-certificate-injection"},{"title":"Cluster migration with Velero","href":"/docs/cluster-migration-with-velero"},{"title":"Infra Set Up For Workflows","href":"/docs/infra-set-up-for-workflows"}]}]},{"title":"Deploy Gateway Plane","href":"/docs/platform/deploy-gateway-plane"},{"group":"Deploy Control Plane and Gateway Plane","root":{"title":"Deploy AI Gateway (Control Plane)","sidebarTitle":"Overview","href":"/docs/platform/deploy-control-plane-and-gateway-plane"},"expanded":false,"directory":"accordion","pages":[{"title":"Deploy AI Gateway (Control Plane)","sidebarTitle":"Overview","href":"/docs/platform/deploy-control-plane-and-gateway-plane"},{"group":"Installation Guides","pages":[{"title":"Install on AWS","sidebarTitle":"AWS","href":"/docs/platform/deploy-control-plane-install-aws"},{"title":"Install on GCP","sidebarTitle":"GCP","href":"/docs/platform/deploy-control-plane-install-gcp"},{"title":"Install on Azure","sidebarTitle":"Azure","href":"/docs/platform/deploy-control-plane-install-azure"},{"title":"Install on OpenShift","sidebarTitle":"OpenShift","href":"/docs/platform/deploy-control-plane-install-openshift"},{"title":"Install on-prem","sidebarTitle":"On-prem","href":"/docs/platform/deploy-control-plane-install-onprem"}]},{"title":"Deploy AI Gateway FAQs","sidebarTitle":"FAQs","href":"/docs/platform/deploy-control-plane-faq"}]},{"group":"Deploy Control Plane and Compute Plane","pages":[{"title":"Deploy Control Plane and Compute Plane","sidebarTitle":"Overview","href":"/docs/deploy-control-and-compute-plane"},{"group":"Installation Guides","pages":[{"title":"AWS Control Plane Setup","sidebarTitle":"AWS","href":"/docs/aws-control-plane"},{"title":"GCP Control Plane Setup","sidebarTitle":"GCP","href":"/docs/gcp-control-plane"},{"title":"Azure Control Plane Setup","sidebarTitle":"Azure","href":"/docs/azure-control-plane"},{"title":"Deploy Generic Control Plane","sidebarTitle":"Generic","href":"/docs/generic-control-plane"},{"title":"Deploy on OpenShift / ROSA","sidebarTitle":"OpenShift / ROSA","href":"/docs/openshift-control-plane"}]},{"group":"Advanced Configuration","pages":[{"title":"Customize Build Workflow","href":"/docs/customize-build-workflow"},{"title":"Customizing CI/CD Templates","href":"/docs/customizing-cicd-templates"},{"title":"Customizing Workbench Images","href":"/docs/customizing-workbench-images"}]}]}]},{"group":"Control Plane Management","pages":[{"title":"Control Plane Monitoring","href":"/docs/platform/controlplane-monitoring"},{"title":"Manage Multi-Tenancy on the Control Plane","sidebarTitle":"Multi-Tenancy","href":"/docs/platform/controlplane-multitenant"},{"title":"Releases, Upgrades, and Rollbacks","href":"/docs/platform/control-plane-upgrade"}]},{"group":"Security","pages":[{"title":"Security settings","sidebarTitle":"Security Settings","href":"/docs/platform/security-settings"},{"title":"SaaS security","sidebarTitle":"SaaS Security","href":"/docs/platform/saas-security"},{"title":"Self-hosted security","sidebarTitle":"Self-Hosted Security","href":"/docs/platform/onprem-security"},{"title":"Rotate credentials","sidebarTitle":"Rotate Credentials","href":"/docs/platform/rotate-credentials"},{"title":"Delete the organization account","sidebarTitle":"Delete Tenant","href":"/docs/platform/tenant-deletion"}]},{"title":"Support","href":"/docs/platform/support"},{"group":"Reliability","pages":[{"title":"Disaster Recovery","sidebarTitle":"Disaster Recovery","href":"/docs/platform/disaster-recovery"}]}]}]},{"tab":"AI Deployment","pages":[{"title":"AI Deployment","href":"/docs/ai-deployment-overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/docs/truefoundry_sdk"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/docs/ai-gateway/ecosystem"}]},{"tab":"Changelog","groups":[{"group":" ","pages":[{"title":"Changelog","href":"/docs/changelog"},{"group":"Announcements","pages":[{"title":"Deprecation of Rate Limiting V1 — 2nd November, 2026","href":"/docs/change-announcements/deprecation-of-rate-limiting-v1"},{"title":"Move to Named Guardrail Policies — v0.179","href":"/docs/change-announcements/named-guardrails-config-v0.179"},{"title":"Perplexity Models Move to the Agent API","href":"/docs/change-announcements/perplexity-agent-api-migration"},{"title":"Plan-Based Feature Gating — v0.174.0","href":"/docs/change-announcements/plan-based-feature-gating-v0.174.0"},{"title":"Agent Builder Moving to Trueforge \u0026 Agent APIs Deprecated — v0.172","href":"/docs/change-announcements/agents-moving-to-trueforge"},{"title":"Removing Collaborators from Resources — v0.172.0","href":"/docs/change-announcements/removing-collaborators-from-resources"},{"title":"Deprecation of MCP tool_settings — 26th October, 2026","href":"/docs/change-announcements/deprecation-of-mcp-tool-settings"},{"title":"Deprecation of truefoundry \u003c 0.17.0 and truefoundry-sdk \u003c 0.4.0 packages","sidebarTitle":"Deprecation of truefoundry \u003c 0.17.0 and truefoundry-sdk \u003c 0.4.0 packages - 19th August 2026","href":"/docs/change-announcements/deprecation-of-truefoundry-below-0.17-and-api-ml"},{"title":"Minimum Python Version Raised to 3.10 — truefoundry v0.17.0","href":"/docs/change-announcements/python-3.10-minimum-truefoundry-cli-v0.17.0"},{"title":"Budget Limiting V2 — v0.158.0","href":"/docs/change-announcements/budget-limiting-v2-v0.158.0"},{"title":"Deprecation of MCP Servers APIs — 30th September, 2026","href":"/docs/change-announcements/deprecation-of-mcp-servers-v1-apis"},{"title":"Deprecation of Images and Plots in Job Runs — v0.156.0","href":"/docs/change-announcements/deprecation-of-images-and-plots-in-job-runs-v0.156.0"},{"title":"Moving to External Secrets Operator for Secrets Management — v0.151.5","href":"/docs/change-announcements/moving-to-eso-for-secret-management-v0.151.5"},{"title":"MCP DCR client_id \u0026 Redirect URL Validation — v0.148","href":"/docs/change-announcements/mcp-dcr-client-id-validation-v0.148"},{"title":"Deprecation of Routing Config","href":"/docs/change-announcements/deprecation-of-routing-config"},{"title":"Identity and Access Revamp — v0.143","href":"/docs/change-announcements/identity-and-access-revamp-v0.143"},{"title":"AI Gateway Metrics Rename — v0.136","href":"/docs/change-announcements/refactoring-of-ai-gateway-metrics"},{"title":"Deprecation of MCP Servers in Prompts","href":"/docs/change-announcements/deprecation-of-mcp-servers-in-prompts"},{"title":"Deprecation of Common Tools in Playground and Settings — v0.135","href":"/docs/change-announcements/deprecation-of-common-tools-v0-135-0"},{"title":"x-tfy-routing-config Header Removal — v0.133","href":"/docs/change-announcements/routing-config-header-removal-v0.133"},{"title":"Simplified GitOps CI/CD with tfy apply — v0.132","href":"/docs/change-announcements/simplified-gitops-cicd-v0.132"},{"title":"Legacy MCP OAuth Routes Removal — v0.134","href":"/docs/change-announcements/legacy-mcp-oauth-routes-removal"},{"title":"MCP Gateway URL and Transport Changes — v0.130","href":"/docs/change-announcements/mcp-gateway-url-transport-v0.130"},{"title":"Gemini CLI Model Registration Requirement — v0.118","href":"/docs/change-announcements/gemini-cli-model-registration-v0.118"},{"title":"Guardrails YAML Schema Change — v0.116","href":"/docs/change-announcements/guardrails-yaml-schema-change-v0.116"},{"title":"MCP Server Groups Removal — v0.112","href":"/docs/change-announcements/mcp-server-groups-removal-v0.112"}]}]}]}]},"basePath":"","title":"TrueFoundry AI Gateway Plane Architecture - TrueFoundry Docs","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DMn5ZJp6.js","DynamicMarkdown-5yMTCLas.js","zoom-image-lightbox-BUkqX3JF.js","lightbox-handle-r17bVUz3.js"]}