LiteLLM monolithic vs microservices: which deployment shape fits your gateway
The choice for a platform team running a shared AI gateway is between one LiteLLM image that serves proxy traffic, management APIs and the admin UI together, and separate gateway, backend and UI services that scale independently. Both shapes run the same LiteLLM proxy code, so the decision is about scaling, upgrade risk and blast radius rather than features. LiteLLM is both a Python SDK and an AI gateway (proxy server) that calls more than 100 LLM providers using the OpenAI request format. Its code under the enterprise/ directory is licensed separately, and everything else is under the MIT license, so the license does not change which shape you choose.
Start by measuring where the load and the risk sit. If request volume is modest and one team owns the gateway, a single image is simpler to deploy, monitor and roll back, with fewer moving parts behind the same database and Redis. If proxy traffic spikes far above management use, or if the admin UI and key management need separate access controls and network exposure, a split layout lets you scale and restrict each part on its own. Confirm in the release notes for your chosen version which components are published as separate images or Helm charts, because the available split depends on the release you run.
Whichever shape you pick, check three things before committing. First, how each option changes autoscaling signals, since a proxy-only tier scales on request load while a combined pod also carries UI and API work. Second, how upgrades roll out, because a single image means one version for every surface and one migration job, while split services can drift if their versions are not pinned together. Third, how a failure spreads, since a bad release or a crashing admin path can take down proxy traffic in the monolith. Ask your vendor or partner to show the upgrade and rollback sequence for both shapes in your own cluster before you decide.
Which deployment shape fits which team
This table compares a single LiteLLM image that serves gateway traffic, management APIs and the UI against separate gateway, backend and UI services. Read each row as a question to answer for your own team, and treat the cost and effort cells as the components to price, not as figures.
| Factor | Single image | Split services |
|---|---|---|
| Traffic profile | Steady, moderate request volume where all traffic shares one scaling curve | Spiky or uneven load, where admin or UI traffic should not compete with inference calls |
| Team size and skills | Small platform team that can run one workload and one upgrade path | Platform team comfortable operating several deployables, service discovery and separate health checks |
| Autoscaling signals | One scaling metric covers every function, so scaling is coarse | Gateway pods can scale on request load while UI or backend pods scale on their own signals |
| Upgrade cadence | One image change touches gateway and management functions together | Gateway and UI can be rolled separately, but versions must be matched and tested as a set |
| Blast radius | A fault in one function can take down the whole gateway | Failures are narrower, though a shared database or Redis still forms a common failure point |
| Operational load | Fewer objects to monitor, configure and back up | More components to monitor, more configuration to keep in sync, more places to troubleshoot |
| Database and Redis | Same backing services, with connection counts set per pod | Connection counts multiply across each service, so pool sizing needs recalculating |
| Cost to run | Fewer pods and lower idle capacity, with recurring cost driven by peak replicas | More baseline pods across services, with recurring cost driven by minimum replicas per service |
| Confirm before choosing | Ask which chart or image layout the vendor currently supports for your release line | Ask which components are officially supported as separate services and how versions must align |
How the choice changes autoscaling, upgrades and blast radius
The packaging decision shows up after go-live, when traffic grows, a release ships, or one component misbehaves. The three cards below cover the operational effects that matter most to a platform team: how capacity is added, how versions move, and how far a failure spreads. Read them together, because a layout that scales well can still make upgrades harder.
Autoscaling the gateway separately
In a single-image layout, every replica carries the request path, the admin UI and the management APIs, so adding capacity for model traffic also adds capacity for dashboard and key administration you did not need. A split layout lets the gateway tier scale on request load while the UI and management tier stays small. Scale the gateway on signals tied to proxy work, such as request concurrency, latency and CPU, and check that database connection counts stay within limits as replicas are added. Confirm how your chosen topology exposes these metrics before you write autoscaling rules.
Coordinating versions across components
A single image means one tag moves for every role, so an upgrade is one rollout with one set of release notes to read. Separate services can run different tags, which is useful for canary releases but creates a compatibility matrix you must test and document. Either way, the database migration step runs once against the shared PostgreSQL database and must finish before new pods serve traffic. Plan upgrades inside the supported window: LiteLLM maintains support for the four most recent stable minor versions for both open source and Enterprise deployments, so a gateway that falls behind will lose vendor coverage.
- Supported minor versions
- 4
Limiting blast radius of a bad release
In a single image, a faulty release or a crash loop in the UI code can take the request path down with it, because both run in the same process. Separating the UI and management tier keeps model traffic flowing when the admin interface fails, and a canary on the gateway tier limits exposure to a bad build. Be aware that a split does not isolate the shared PostgreSQL and Redis dependencies, so a database outage still stops both tiers. Test an outage of each component on purpose and record which callers are affected.
How gateway, management and data services connect in each shape
The diagram starts with client applications and developer tools sending requests across the trust boundary to the LiteLLM gateway. In the single image shape, one process serves gateway traffic, the management API and the admin UI together. In the split shape, separate gateway, backend and UI services scale apart. Both shapes share the same PostgreSQL database for virtual keys, budgets and spend, and the same Redis for shared rate limits, router state and cache. Check which paths cross the boundary and which services can reach both data stores.
Both deployment shapes share one PostgreSQL database and one Redis, inside the same trust boundary.
Setting up the chosen deployment shape safely
This sequence takes a chosen LiteLLM shape from artifact selection to a verified staging proxy, so the team knows the gateway routes calls, enforces keys and budgets, and can be promoted without surprises. Each step closes with a check that gates the next one.
Confirm the chart or image that matches the shape
The platform or infrastructure engineer confirms which artifact matches the chosen shape before anything is installed. A monolithic deployment uses one image that serves proxy traffic, management APIs and the admin UI, while a microservices deployment uses separate gateway, backend and UI components. Record the exact image tag and chart version in the change record, and confirm with the vendor's current documentation that the chosen artifact supports the shape you picked. The step is done when the pinned image tag and chart version are written down and reviewed by someone other than the author.
Provision external PostgreSQL and Redis
The platform team provisions PostgreSQL as the primary database, because virtual keys, budgets and spend records depend on it. Provision Redis 7.0 or newer as well, since more than one proxy instance needs it for shared rate limits, router state and cache. Confirm network paths from the cluster or runtime to both services, and confirm that connection limits can absorb the replicas you plan to run. The step is done when a test connection succeeds from the target runtime to each service and the connection limits have been recorded against the planned replica count.
Store the master key in a secret manager
The security engineer generates LITELLM_MASTER_KEY, which must start with sk-, and stores it in the organization's secret manager instead of in a values file or source repository. Grant read access only to the service identity that runs the proxy, and limit human access to a named break-glass group. Confirm that the deployment pulls the key at runtime and that the key is absent from chart values, environment files and CI logs. The step is done when a search of the deployment repository and pipeline logs finds no copy of the key and the proxy starts with the key injected from the secret store.
Run the database migration before traffic
The platform engineer runs the database migration as a separate job that completes before any proxy pod receives traffic. Keeping migration out of the serving path prevents several replicas from racing to change the schema at startup. Check the migration logs for errors and confirm the schema version reported by the proxy matches the image version deployed. The step is done when the migration job exits successfully, the schema matches the release notes for the pinned version, and the proxy reports healthy against the migrated database.
Deploy one proxy version to staging
The platform team deploys the pinned proxy version to a staging environment built with the same shape, the same database and Redis types, and the same secret wiring as production. Use the same replica layout you plan for production, so that Redis-backed rate limits and router state behave as they will in production. Confirm that the ingress or load balancer, health probes and autoscaling rules point at the components you intended. The step is done when staging runs the pinned version, all pods pass readiness checks, and the configuration diff against production shows only environment-specific values.
Verify health and the admin paths
The operations engineer checks the health endpoints for each component in the chosen shape and confirms the admin UI and management APIs answer through their intended routes. In a monolithic shape, this confirms one service handles all paths. In a microservices shape, confirm each component is reachable and that the gateway reaches the backend. Review logs for database or Redis errors during startup. The step is done when every health check returns healthy, the admin UI loads through the intended route, and logs show no connection errors to PostgreSQL or Redis.
Test virtual keys, budgets and routing
The platform and security teams create a test team, a test virtual key restricted to specific models, and a low test budget, then send requests through the gateway. Confirm the key reaches only its permitted models, that spend is recorded against the key and team, and that the budget blocks requests once exceeded. Send traffic across a model group with at least two deployments and confirm the router distributes, retries and fails over as its configuration says. The step is done when restricted models are refused for the test key, spend appears in the database, the budget stops calls at the limit, and failover is observed in logs.
Approve the promotion to production
The change owner reviews the staging results against a written checklist and decides whether to promote the same pinned version to production. Record the staging evidence, including health results, key and budget tests, routing behavior and any errors, and confirm the rollback path, which is redeploying the previous image tag against the same migrated database only if the release notes allow it. Confirm which team owns the on-call response. The step is done when the signed checklist and evidence are attached to the change record and the production rollout uses the identical image tag tested in staging.
Choosing the shape by environment and team
When one platform team runs a LiteLLM proxy for a small set of applications on one cluster, a single image serving the proxy, management APIs and admin UI is usually the simplest shape to operate. There is one release to test, one set of logs to read and one rollout to watch. The cost of that simplicity is that the gateway, the admin UI and the management routes share a process lifecycle, so a UI change or a management API problem can touch live model traffic.
- Traffic profile: Confirm whether request volume is steady or bursty, since a single deployment scales as one unit.
- Release cadence: Check whether the same team owns every upgrade, which keeps the single image practical.
- Replica planning: Ask how many proxy replicas you need and whether Redis is already required for shared rate limits.
- Autoscaling signals: Confirm which metric drives scale-out, because the proxy and admin functions will scale together.
- Exit path: Note the conditions that would trigger a split, such as a second team or separate change windows.
Before you commit, confirm your replica and database sizing with the production guidance in the LiteLLM production best practices and with your own load tests.
A shared gateway serving several teams often has one group that runs the traffic path and another that manages the admin UI, keys, teams and models. In that case the ownership boundary is a reason to consider separate components, so each group can deploy, scale and roll back without waiting on the other. Splitting the gateway from the management and UI services lets the traffic path scale on request signals while admin workloads stay small.
- Ownership map: Write down who approves changes to routes, keys, budgets and the UI, and confirm each group has a deploy path.
- Scaling split: Confirm that gateway replicas and UI replicas will have different scaling needs before you adopt a componentized layout.
- Shared state: Verify that every component uses the same PostgreSQL database and Redis, since split services that disagree on state cause confusing budget and rate-limit results.
- Upgrade order: Decide whether the gateway and UI must run the same release, and test that version skew is supported for the release line you pick.
- Blast radius: Identify which failures should stop only the UI and which should stop traffic.
Confirm version compatibility between components for your chosen release line before you split anything.
In a regulated environment, the admin UI and management APIs often need their own change control, access review and audit evidence, even when the traffic path is stable. Changes to models, keys, budgets and admin settings can alter who sees which data and what gets logged, so they may need approvals that routine gateway releases do not. Separating the admin surface from the traffic path lets the security and compliance teams review management changes without slowing down the gateway release train.
- Change classes: Define which changes are traffic-path releases and which are administrative changes, each with its own approval step.
- Admin access: Restrict who can reach the admin UI and management endpoints, and confirm how those routes are exposed on the network.
- Audit evidence: Confirm which admin actions are logged and where those logs are retained, since audit logs are part of the Enterprise feature set.
- Separate rollback: Make sure the admin surface can be rolled back or frozen without affecting live model traffic.
- Evidence for assessors: Prepare records of who approved each change, which release ran and how access was reviewed.
Ask your compliance team which change records they require, and confirm with LiteLLM which admin-related features your chosen edition includes through the LiteLLM Enterprise documentation.
Security and operational considerations for either shape
Whether you run LiteLLM as one image or as separate services, the admin surface, secrets, network paths and audit trail stay the same security problem. These four cards cover what to check in each area before you choose a shape, since the choice changes where each control sits rather than whether it is needed.
Admin UI and management API exposure
The admin UI and management API both sit behind the same proxy endpoint in a monolithic deployment, and in a split deployment they may be served by a separate UI service. Decide which paths are reachable from users, which only from your internal network, and who can reach the admin surface at all. SSO is free for up to 5 users from v1.76.0, and an Enterprise license is needed beyond that, so plan the identity model for the number of administrators you will have. Confirm how SSO is configured for each service that serves the UI.
Admin UI SSO docsMaster key and database credential handling
The LITELLM_MASTER_KEY grants administrative access, and it must start with sk-. Keep it and the database connection string in a secret manager rather than in image layers, Helm values or plain environment files. In a split deployment, every component that needs the key or database credentials multiplies the places a secret must be delivered and rotated, so list each service and its secret dependencies before you build. Ask your team how rotation will be done without a full outage.
Network paths between services and data stores
A monolithic gateway opens connections to PostgreSQL, Redis and upstream model providers from one workload. A split layout adds internal hops between the gateway, backend and UI services, each of which needs its own allow rule. Map every path, then restrict database and Redis access to the workloads that need it. Redis matters here because multiple proxy instances share rate limits, router state and cache through it, so a path that is open by accident can expose those controls to other workloads.
Logging and audit needs Enterprise adds
The open-source proxy gives you request logging and spend data, but the audit trail, organization and team RBAC, and team-level logging controls are Enterprise features. Decide early whether your compliance team needs an audit trail of administrative changes, and who reviews it. Confirm which log events each service emits in your chosen shape, where they are stored, and how long they are kept, since a split deployment produces logs from several workloads that must be correlated.
Enterprise docsQuestions buyers ask before choosing a LiteLLM deployment shape
Is a single LiteLLM image enough for production?
For many production gateways, yes, as long as PostgreSQL and Redis run outside the pod and the deployment stays on a supported release line. LiteLLM's production guide names PostgreSQL as the primary supported database and requires Redis 7.0 or newer once more than one proxy instance runs, because rate limits, router state and cache must be shared. On Kubernetes, LiteLLM recommends one Uvicorn worker per pod and horizontal scaling, with about 1 vCPU and 4 GiB of memory per worker as a starting point. The risk with one image is that the proxy, management APIs and admin UI share the same resources, so heavy admin activity can compete with inference traffic. Load test with your own request mix before deciding.
What drives the cost and effort of splitting LiteLLM into separate services?
Most of the cost is design and platform work, not the software itself. Separating the gateway, backend and UI means separate deployments, service routing, internal authentication, secret distribution, health checks and observability for each tier, plus load tests for each one. After go-live, the recurring cost is operating more workloads and keeping their configuration and versions aligned. Costs rise with the number of environments, the number of providers and routes, and whether your team already runs Helm or GitOps tooling. Costs fall when the cluster, database and Redis are already standardized. When you ask for a quote, request line items for design, manifests or charts, testing, handover documentation and any ongoing retainer, so you can see what is one-time and what recurs.
How long does a migration between deployment shapes take?
Duration depends on the work involved, and no fixed figure applies to every environment. The main drivers are how much gateway configuration lives in the database versus files, how many environments must move, whether virtual keys, budgets and spend history must be preserved, and whether old and new shapes can run side by side during cutover. Database migrations between LiteLLM versions add review time, and change windows set by your operations team often determine the schedule. Ask for the duration in the written scope, with the assumptions listed beside it, such as the number of environments, the cutover approach and the rollback plan. A timeline without those assumptions is hard to compare across proposals.
What does the work need from our team?
The work needs named people who can make decisions and grant access on your side. Typically that means a Kubernetes cluster or cloud account where the gateway will run, access to provision or connect PostgreSQL and Redis, a secrets manager for the master key and provider credentials, DNS and TLS for the endpoint, and an identity provider if admin SSO is required. You will also need a staging environment for testing, a description of real traffic patterns, and an owner for gateway configuration such as models, teams and keys. For cutover, someone must be available to watch dashboards and approve the rollback decision. Agree these responsibilities in the written scope so delays are not discovered mid-build.
Can our own platform team run a split LiteLLM deployment?
Yes, if the team already operates Kubernetes, PostgreSQL, Redis and a deployment pipeline. Running a split shape adds work in three areas: connection pool planning per worker and replica, Redis sizing for shared state, and upgrade ordering across services so that version differences are tested before they reach production. Teams without that background usually find the first upgrade cycle the hardest part. An outside partner can take the fixed-scope build, leave documented runbooks and hand over the environment, and ongoing support or upgrades can be covered by a retainer if your team wants help after handover. Decide based on the skills you have today, and check them against the component list in the written scope.
When does Enterprise support and its response times matter?
Enterprise support matters most when the gateway sits in the path of production traffic and an outage would stop applications that depend on model access. LiteLLM Enterprise support includes a dedicated channel with the engineering team, and optional 24/7 SLAs with a 1 hour response for critical issues and 72 hours for security patches, according to LiteLLM's Enterprise documentation. Those response times are offered by LiteLLM, so confirm the contract terms directly with the vendor. Enterprise also matters if you need SSO beyond the free limit, which LiteLLM sets at 5 users from v1.76.0. DeployOpen's own support is separate and is available as a retainer under its written scope.
How does the deployment shape change upgrades and blast radius?
In a single image, one upgrade changes the proxy, management APIs and UI together, so a bad release can affect all three at once. Splitting the tiers lets you roll the gateway separately from the UI and to test each tier on its own schedule, but it also introduces version skew that must be tested. LiteLLM maintains support for the four most recent stable minor versions for both open source and Enterprise deployments, so you need a cadence that keeps you inside that window. Check the releases page before each planned upgrade, test database migrations in staging, and record the rollback path for each tier. Blast radius is smaller for split tiers only if the shared database and Redis are also designed for failure.
Which deployment shape scales better under variable traffic?
Autoscaling signals come from the gateway that handles inference traffic, so the shape should let that tier grow without also growing the UI. A single image scales whole pods, including components that receive little load. A split shape lets the gateway scale on its own metrics, which can reduce idle capacity, but it adds more workloads to monitor and tune. Under either shape, LiteLLM's guidance favors one Uvicorn worker per pod and horizontal scaling, with shared Redis and PostgreSQL behind them. Measure request latency, connection use and database write load under realistic peaks before choosing. Ask your partner to show how each shape was tested against your traffic profile.
Limits to confirm in your environment before you commit
A monolithic or microservices layout only works if the packaging, service boundaries, data tiers and identity features in your chosen release match what you plan to run. Treat each card below as a question to put to the vendor in writing, and record the answers against the version you intend to deploy.
Supported packaging for each shape
Ask which chart, image or Terraform module the current release supports for a single combined deployment and for a split deployment with separate gateway, backend and UI services. Confirm whether both shapes are covered by the same release line, or whether one of them is community-maintained only. Ask how the vendor maps chart values to the components you intend to scale, and whether a split layout can be upgraded in place from a single image without a rebuild of your deployment manifests. Record the exact image tag you will pin.
- Latest listed release
- v1.105.1
Exact service boundaries in your version
Service boundaries are not fixed across releases, so ask the vendor which processes handle request routing, management API calls, admin UI serving and background spend writes in the version you plan to run. Confirm which of these can be scaled separately, which must share a database connection pool, and which components are required for the admin UI to function. Ask for the list of environment variables that switch each role on or off, and test the split layout in a non-production environment before you rely on it.
Redis and database tier match
The production guidance names PostgreSQL as the primary supported database and requires Redis 7.0 or newer once more than one proxy instance runs, for shared rate limits, router state and cache. Confirm that your Redis version, persistence settings and database sizing meet that guidance for the shape you chose, and ask how many connections each worker and replica opens. If you run a split layout, ask whether the backend services need the same Redis and database endpoints as the gateway, because a mismatch there is a common source of inconsistent budgets.
Production guideIdentity and audit need Enterprise?
The free admin UI SSO covers a small number of users, and SCIM, JWT authentication with identity provider tokens, audit logs, organization and team RBAC and IP allowlisting sit in the Enterprise license. Map your requirements to those features before choosing a shape, because a split deployment does not remove the need for them. Ask the vendor which Enterprise features apply to each service, whether audit logs cover administrative changes made through the API as well as the UI, and what the license check requires at runtime.
- Free SSO limit
- 5 users
How DeployOpen works on this
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own cloud accounts, data centers or air-gapped networks. For a LiteLLM gateway, that means choosing the deployment shape against the client's upgrade cadence, scaling needs and blast-radius tolerance, then building and handing over the result in their environment.
How we scope
- Engagements are fixed-scope, with the deployment shape, deliverables and timeline agreed in writing before work starts.
- The written scope names which components run in each pod or service, such as the gateway, backend and admin UI.
- Scope records the traffic profile, autoscaling signals, upgrade windows and failure-domain requirements that drive the shape decision.
- Scope lists the database, Redis and identity dependencies the chosen shape must reach from the client's network.
How we build
- We build the chosen shape in the client's infrastructure, with images pinned to a release line the client has approved.
- Build covers PostgreSQL and Redis connectivity, the database migration job and secrets held in the client's secret manager.
- We test rolling upgrades, pod restarts and scale-out behavior before the gateway takes production traffic.
- Testing includes checking that the admin UI and management APIs remain reachable when the gateway component is under load.
How we hand over
- Handover includes the deployment manifests or Terraform code, configuration files and a record of the chosen component layout.
- Documentation explains the upgrade path for each component and the order in which components must be updated.
- We walk the client's platform and security teams through the runbook, including what to check after each release.
- Handover records the blast-radius boundaries, so reviewers can see which failures affect gateway traffic and which affect management.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the initial deployment.
- A retainer can cover moving the deployment to a newer supported release line when the client's change process allows it.
- Support can revisit the component layout as traffic, team count or compliance requirements change over time.
- Confirm with DeployOpen, before signing, which support hours, response targets and escalation paths the retainer includes.

