When a LiteLLM multi-region deployment is worth the complexity
A multi-region LiteLLM deployment runs several LiteLLM proxy instances in different regions of one cloud provider, all sharing one PostgreSQL database and each region keeping its own Redis. It is worth the added moving parts when users in distant locations feel the latency of a single gateway, or when your recovery requirements call for a second region that can take over if the primary fails. If neither applies, a single region with several proxy instances behind a load balancer is simpler to run and to back up.
The topology follows three rules from the LiteLLM multi-region documentation. Every region's instances point DATABASE_URL at one shared PostgreSQL database in the primary region, each region runs its own Redis, and all regions run in the same cloud provider. The shared database is the main trade-off: every region depends on the primary region for writes, so cross-region latency and the availability of that one database become design constraints you must plan around. Confirm with your cloud and network team how far apart your regions are and what the database round trip adds to requests from each.
The same topology supports two patterns. In active-active, clients are routed to the nearest region, which serves the latency goal, though the docs do not promise that any region can absorb the full load of another. In active-passive, a second region stays idle behind a DNS failover record and takes traffic only when the primary is unavailable. Choose the pattern before you size anything, and test the failover path with your own DNS time-to-live and health checks, since the documentation does not give you recovery times to plan against.
Active-active or active-passive: which pattern fits the goal
In the active-active pattern, every region runs LiteLLM proxy instances that serve live traffic, and clients are routed to the nearest region. The goal is lower request latency for users spread across the cloud regions you use. Every region still points DATABASE_URL at one shared PostgreSQL database in the primary region, so the write path is the part that needs the most planning. Each region keeps its own Redis, which holds rate limits, router state and cache for that region's instances.
- Shared write path: Every region writes to the primary database, so requests from distant regions pay a cross-region round trip for database writes, even when the model call itself is local.
- Read traffic: LiteLLM can send read-only queries to a replica set through
DATABASE_URL_READ_REPLICA, which may reduce cross-region reads. Confirm the replica placement in your own environment before relying on it. - Failover behavior: If the primary region is unavailable, writes stop everywhere, so the other regions may keep serving cached or in-flight traffic only for limited operations. Confirm what each request type does during a database outage.
- Redis scope: Rate limits and router state are per region, so a team's TPM or RPM limit may not be enforced as one global figure. Decide whether that is acceptable.
- Licensing and keys: One Enterprise license covers every region, and all instances must share the same
LITELLM_LICENSE,LITELLM_MASTER_KEYandLITELLM_SALT_KEY.
Before committing, measure the added write latency from each target region to the primary database and test a region-level traffic shift under load.
In the active-passive pattern, one region serves traffic while a second region runs idle, with a DNS failover record that moves clients to the standby when the primary fails. The goal is recovery, not latency. The standby uses the same shared PostgreSQL topology and its own Redis, so the failover target must be ready to serve without a cold rebuild. Because the idle region receives no normal traffic, its configuration can drift unless you manage it as code and test it on a schedule.
- Database position: The standby reaches the shared PostgreSQL database in the primary region. A regional outage that takes the database with it still needs a separate database recovery plan, which the topology does not provide by itself.
- DNS failover: Health checks and TTL values determine how quickly clients move. Confirm both in your DNS provider and in the client configuration, since some clients cache resolution longer than expected.
- Redis state: The standby Redis starts without the primary's rate-limit counters and router state. Confirm how the gateway behaves on a cold cache and whether limits reset during failover.
- Idle capacity: Standby instances must be sized to absorb production load, and autoscaling must be tested in that region.
- Secrets and config: The standby needs the same master key, salt key and license, so store them in a secret manager that is reachable from both regions.
The main test is a scheduled failover drill that measures time to recover, confirms key and budget behavior, and checks that the standby region's configuration matches production.
The pattern should follow from the goal you write down first. If the goal is lower latency for users in several regions, active-active fits, provided the added database round trips are acceptable for your workload. If the goal is continuity after a regional failure, active-passive fits and is simpler to reason about, but it does not improve everyday latency. Many teams find the cost of idle capacity and the drill effort are the main trade-offs to discuss with stakeholders.
- State the target: Write down the latency objective for each user region and the recovery expectations for the service, and confirm both with the owners of the applications that call the gateway.
- Map the write path: List every operation that writes to the database, such as key creation, spend updates and budget changes, and note which ones must succeed during an outage.
- Test the failover: Run a planned failover in a non-production environment, then in production during a window your organization approves, and record the time to recover.
- Verify keys and budgets: Confirm that virtual keys, budgets and spend history remain consistent after failover and after failback.
- Plan failback: Decide how traffic returns to the primary region and how Redis counters and spend batches are reconciled.
Record the results in a runbook and ask your vendor or partner to confirm which steps apply to your LiteLLM version and database setup.
How regions, Redis and the shared database connect
The diagram starts at clients, which reach a DNS record that routes each request to a regional LiteLLM proxy group. Each region runs its own Redis for rate limits, router state and cache, while every proxy group points DATABASE_URL at one shared PostgreSQL database in the primary region. The optional read replica path, set through DATABASE_URL_READ_REPLICA, sends read-only queries away from the primary. Check that every region sits inside the same cloud account and that all instances share the same license and keys.
Two regional proxy groups share one primary PostgreSQL database inside one cloud account.
How licensing, master keys and salt keys carry across regions
One Enterprise license covers every region in a LiteLLM multi-region deployment, but only if every instance is started with the same LITELLM_LICENSE value. Each regional proxy must also share the same LITELLM_MASTER_KEY and LITELLM_SALT_KEY. If a region is started with a different master key, its admin API will reject credentials issued elsewhere, and if the salt key differs, the proxy cannot decrypt provider credentials stored in the shared database. Treat these three values as one set of settings that is copied to every region from the same secret manager, and confirm that each region's deployment pulls from that single source before the second region receives traffic.
Virtual keys, budgets, team definitions and spend records live in the shared PostgreSQL database in the primary region, not in any regional Redis instance. That is why a key created in one region works in every other region, and why a budget is enforced against one running total. Redis holds the per-region state that is safe to lose, such as rate-limit counters and router state, so a Redis failure in one region does not erase keys or spend history. Plan for the database to be the single place where key and budget changes are made, and record that in your operating runbook so no one edits keys against a regional copy of the data.
The salt key must never change once models and provider credentials have been added, because LiteLLM uses it to encrypt those stored credentials. Rotating it later means re-entering every stored model credential, so decide the value before the first region goes live and keep a backup in your secret manager. The master key, by contrast, can be rotated, but the rotation must be applied to all regions in the same change window. Before you rely on this design, confirm the current behavior of each setting against the LiteLLM multi-region documentation and check whether your edition and version support the licensing arrangement you intend, using the license terms in the repository's enterprise directory and the Enterprise documentation.
Configuration options and when each one fits
This table compares the main configuration choices for a LiteLLM multi-region deployment, including topology, DNS routing, read replicas, Redis sizing and router strategy. Read each row to see when the option fits your traffic and recovery goals and what you give up by choosing it.
| Option | When it fits | Trade-off |
|---|---|---|
| Active-active topology | Clients in several areas need low latency, and each region can serve requests while the others are up | Every region carries live traffic, so you must confirm that shared keys, budgets and rate limits behave correctly across regions and that the primary database region is sized for writes from all of them |
| Active-passive topology | Your main goal is disaster recovery and a second region can stay idle until a failover | The standby region costs capacity you rarely use, and failover depends on DNS changes and a working database in the primary region |
| DNS routing to nearest region | Clients are spread across geographies and you want each one sent to the closest healthy region | Routing depends on your DNS provider's policy and health checks, which you must configure and test for your own clients |
| DNS failover record | You run active-passive and need traffic moved to the second region when the first is unhealthy | Failover speed depends on DNS record time-to-live and client caching, so confirm the behavior with your DNS provider before relying on it |
| DATABASE_URL_READ_REPLICA | Reporting, read-only queries or heavy read load should stay off the primary database used for writes | Replicas add a database set to run, monitor and secure, and you must confirm which query types your LiteLLM version sends to the replica |
| Regional Redis sizing | Each region needs its own Redis for shared rate limits, router state and cache, with capacity matched to that region's traffic | Redis must be version 7.0 or newer once more than one instance runs, and undersized Redis affects rate limits and routing in that region only |
| Simple-shuffle router strategy | Default choice for most regions where load should spread evenly across model deployments | It does not favor faster or cheaper deployments, so pick another strategy if latency or cost should drive routing |
| Latency-based or least-busy router strategy | A region has several deployments of the same model and you want traffic steered toward the fastest or least loaded one | Routing decisions depend on live metrics, so test behavior under load and confirm the chosen strategy in the routing documentation for your version |
| Priority ordering for failover | You want a preferred model deployment in a region with a named backup used only when the first fails | The backup sits idle until a failure, and cooldown and retry settings determine how quickly traffic moves |
How to set up a multi-region LiteLLM deployment
This sequence takes a single cloud provider from one shared PostgreSQL database and per-region Redis through identical secrets, proxy rollout, traffic routing and a tested failover, producing a gateway that serves every region from one control plane.
Confirm single cloud provider and region layout
Before provisioning anything, the platform lead confirms that every region in scope sits inside one cloud provider, and picks the primary region that will host the shared PostgreSQL database. The LiteLLM multi-region topology assumes one provider across all regions, so a second provider is a different design and should be scoped separately. Write down the region list, the primary region, and the target pattern: active-active for latency or active-passive for disaster recovery. Done means a signed-off topology sheet that names each region, its proxy count, and its Redis instance. Ask DeployOpen or your architects to confirm that your cloud account and network plan match this sheet before any build starts.
Provision shared PostgreSQL in the primary region
Create one PostgreSQL database in the primary region and make it the only database that every regional proxy reaches through DATABASE_URL. LiteLLM names PostgreSQL as its primary supported database, and virtual keys, budgets and spend records depend on it. Plan high availability, backups and network access rules for this database as you would for any system of record, and confirm that remote regions can reach it over a private path. Verification: from a test host in each region, connect to the database endpoint and confirm the connection succeeds with the intended credentials, and that a restore test from backup has been run at least once.
Provision Redis 7.0 or newer in each region
Deploy one Redis instance in every region, running version 7.0 or newer. LiteLLM requires Redis once more than one proxy instance runs, because shared rate limits, router state and cache depend on it. Each region keeps its own Redis, so proxies in a region never depend on a cross-region cache call. Confirm the version reported by each instance, confirm that each proxy subnet can reach its local Redis, and confirm that eviction and persistence settings suit rate-limit state. Verification: each regional instance returns version 7.0 or newer to a version query from a proxy host, and a write and read from that host succeed.
Load identical license and keys from a secret manager
Store LITELLM_LICENSE, LITELLM_MASTER_KEY and LITELLM_SALT_KEY in your secret manager and inject the same values into every regional deployment. One Enterprise license covers every region, but all instances must share the same license, master key and salt key. The master key must start with sk-. Treat the salt key as permanent once models are added, because changing it prevents stored provider credentials from being read. Verification: a comparison of the resolved secret values across regions, using fingerprints rather than raw values, shows identical results, and no value appears in a manifest, image or shell history.
Deploy proxies per region against shared and local services
Deploy the LiteLLM proxy in each region with DATABASE_URL pointing at the shared primary database and the Redis URL pointing at that region's own Redis. On Kubernetes, run one Uvicorn worker per pod and scale by adding pods, which matches LiteLLM's production guidance. Apply the same model configuration to every region so routing behaves the same wherever a request lands. Verification: each proxy passes its health check, a test request with a region-specific virtual key succeeds, and a spend or key-creation write made in one region appears when read back through another region.
Configure DNS failover or latency routing
Put a single client-facing hostname in front of the regional proxies. For active-active, use latency-based or geolocation routing so clients reach the nearest region. For active-passive, publish the primary region's endpoint as the primary DNS record and the idle second region as the failover record, with health checks that test the proxy rather than only the load balancer. Confirm the record TTLs with your DNS provider, since clients cache answers for the TTL period. Verification: resolving the hostname from test locations returns the expected region, and the health check marks a deliberately stopped proxy as unhealthy.
Run a failover test and record the result
Simulate a regional outage in a non-production window or with agreed change control. Stop the proxies in the primary region for the active-passive design, or remove one region from rotation for active-active, then send test traffic through the public hostname and confirm that it lands in the surviving region with working virtual keys, budgets and logs. Also test what breaks: the shared PostgreSQL database is a dependency for every region, so record what happens to writes when it is unreachable. Verification: a written test report lists the failover time observed, the requests that succeeded, the requests that failed, and the restore steps, and the team signs it off before production traffic depends on the design.
Security and operational risks across regions
A multi-region LiteLLM deployment spreads one gateway across regions that share a single database and a common set of keys. The cards below cover the dependencies, data paths and access decisions that decide whether a regional problem stays regional. Each one names what to check before the design is approved.
Shared database as a single dependency
Every region's instances point DATABASE_URL at one PostgreSQL database in the primary region, so that database is the common point of failure for virtual keys, budgets and spend writes. If the primary region or its database is unreachable, instances in other regions can lose the state they need to authorize requests. Confirm how each region behaves when the database is down, how the database itself is made highly available, and whether your recovery objectives are met by that design.
Cross-region data paths
Because all regions write to the primary database, prompts, metadata and spend records may travel across regional boundaries depending on what your logging configuration stores. A client in one region can therefore create traffic that is recorded in another. Map every write path from each region to the database and to any log destination, and confirm with your data protection team which data categories may leave each region.
Master and salt key distribution
All instances must share the same LITELLM_MASTER_KEY and LITELLM_SALT_KEY, and the Enterprise license is shared as LITELLM_LICENSE. Copying these values into several regional secret stores multiplies the places a secret can leak, and a mismatch between regions can cause authentication or decryption failures. Use one controlled source of truth, a documented rotation procedure and access logs for each regional copy, and confirm the salt key is never changed once models exist.
Redis state loss in one region
Each region runs its own Redis, which LiteLLM uses for shared rate limits, router state and cache. Redis 7.0 or newer is required once more than one instance runs. If a regional Redis is lost or flushed, rate limit counters and cooldown state reset in that region only, which can allow bursts above configured TPM and RPM limits or send traffic to providers that are still cooling down. Confirm the Redis persistence and failover settings, and test what a region does after a cache reset.
DNS failover record risks
Active-passive operation relies on a DNS failover record to move clients to the idle region. DNS answers are cached by resolvers and clients, so some traffic can keep reaching the failed region for a period after the switch, and a passive region that has never been exercised may not be ready to serve. Confirm the record's health checks, the time-to-live you set, and the failback procedure, and rehearse a failover with real keys and a test database before you depend on it.
Access control for the primary region
The primary region hosts the shared database and the keys that every region depends on, so administrative access to it carries the widest impact. Restrict who can read the database credentials, the master key and the license, and who can change routing or key budgets. Confirm that administrative access uses SSO with named accounts, that changes are logged, and that break-glass access to the primary region is defined and reviewed.
Questions buyers ask before a multi-region LiteLLM rollout
What drives the cost and effort of a multi-region LiteLLM rollout?
The main drivers are how many regions run, how much of the design is new work, and how much your team already runs PostgreSQL, Redis and Kubernetes. Each region adds proxy instances, a Redis instance and network paths back to the primary PostgreSQL database. The one-time work covers topology design, secrets, failover testing and documentation. Recurring cost covers the cloud resources for each region, database backups and upgrades. Ask any quote to separate the one-time build from ongoing support, and to list which regions, instance counts and failover tests are included. Cloud spend is billed by your provider, not by DeployOpen.
How long does a multi-region LiteLLM rollout take?
Duration depends on scope: whether you run active-active or active-passive, how many regions are in scope, and how much existing infrastructure can be reused. An active-passive setup with one standby region is usually simpler to test than active-active routing to nearest regions, because it adds DNS failover rather than traffic steering in every region. Timelines are agreed in the written scope before work starts, so ask for the phases, the test windows and the dependencies on your cloud accounts, network approvals and change calendar. No fixed duration applies to every environment.
What does the work need from our team?
Expect to supply people who own the cloud accounts, network paths between regions, DNS, the PostgreSQL and Redis platforms, and your secret manager. Security and compliance staff should review the key handling and the logging design. Someone must also approve the change window for the first production cutover. Before the build starts, confirm who signs off the topology, who holds the LITELLM_MASTER_KEY and LITELLM_SALT_KEY values, and who will take the on-call pager for each region. Missing ownership at these points is a common reason rollouts stall.
Can our own team run a multi-region LiteLLM deployment in-house?
Yes, if your team already runs Kubernetes or similar container platforms, PostgreSQL, Redis and DNS failover across one cloud provider. The LiteLLM topology has three rules: all regions point DATABASE_URL at one shared PostgreSQL database in the primary region, each region runs its own Redis, and all regions run in the same cloud provider. The harder parts are cross-region latency to the primary database, failover testing and key consistency. Compare your staff's experience with these areas against the written scope of a partner, and decide which parts you want to keep in house after go-live.
Does one LiteLLM Enterprise license cover every region?
Yes. In a LiteLLM multi-region deployment, one Enterprise license covers every region, and all instances must share the same LITELLM_LICENSE value. Confirm the license terms with LiteLLM before purchase, because the open-source code is MIT licensed and only content under the enterprise directory uses the separate enterprise license. Features such as SSO beyond the free user limit, SCIM and audit logs need an Enterprise license. Ask your vendor or procurement contact to confirm how the license is issued and renewed for each environment.
How do virtual keys and budgets behave across regions?
Virtual keys and budgets are stored in the shared PostgreSQL database, so a key created in one region is recognized in every region that uses the same database. Per-key, per-user and per-team budgets, TPM and RPM limits, and model restrictions are enforced through the same data. Redis holds shared rate limits and router state in each region, so confirm how limit counters behave during a failover. All instances must use the same LITELLM_MASTER_KEY and LITELLM_SALT_KEY; the salt key must never change after models are added. Test budget exhaustion and key revocation in each region before go-live.
What should we test before go-live?
Test the failure modes you expect in production. Confirm that requests succeed in each region with the primary database reachable, that the standby region takes over when the DNS failover record changes, and that a region losing its Redis instance degrades predictably. Check key creation, budget enforcement, model restrictions and revocation from every region, and confirm that audit and spend logs arrive in the primary database. Verify that read-only queries sent to DATABASE_URL_READ_REPLICA, if used, do not serve stale data to users who need current budgets. Record results and repeat the failover test after each LiteLLM upgrade.
How DeployOpen scopes and delivers a multi-region LiteLLM deployment
DeployOpen, a Chainscore Labs company, delivers multi-region LiteLLM work on a fixed-scope basis. Before any build starts, the written scope sets out which regions are in play, whether the topology is active-active or active-passive, which Redis and PostgreSQL services are involved, how the three shared values (LITELLM_LICENSE, LITELLM_MASTER_KEY and LITELLM_SALT_KEY) are generated, stored and distributed to every region, and what evidence the client receives at handover. The deliverables list names the infrastructure code, the failover test plan and results, the runbook for a regional failure, and the configuration baseline. Timelines follow from that scope, so the reader should expect the written agreement to name each deliverable and each client dependency before the work begins.
All work runs inside the client's own cloud accounts, so the database, the regional Redis instances, the DNS failover record and the secret store remain under the client's ownership and access controls. DeployOpen's failover testing covers the cases that matter for this topology: losing a regional proxy, losing a regional Redis, and promoting the idle region behind the DNS failover record. Each test is documented with what was observed and what the operator should do next. Confirm with your cloud and network teams how DNS health checks and cross-region network paths will be provisioned, because those responsibilities sit with the client's environment.
DeployOpen does not publish a price list. A quote follows from the written scope, and the main cost drivers are the number of regions, the database and Redis sizing per region, the failover test depth, and whether the client's team or DeployOpen operates the topology day to day. Ask any provider for the one-time build cost separately from recurring items such as Enterprise licensing, cloud resources and any retainer for upgrades or continuous testing, and confirm which licensing terms apply to the number of regions you plan to run. Retainers are optional and cover upgrades and continuous testing once the deployment is live.

