
Multi-region LLM routing selects where an inference request is handled among model deployments in multiple geographic regions. It is a form of multi-site LLM routing, where separate sites serve models and the application needs a way to reach the right deployment. Hivenet Router handles eligible cross-site requests with an HTTP 307 redirect: the client repeats the request at a sibling site listed in an operator-managed map.
This guide is for developers and platform teams that already operate an authenticated Router deployment and need to reach models placed at different sites. You will connect a French entry site to a German serving site, configure the shared map and credentials, choose a redirect scope, and check the client's request and failure behavior. The domains and model name are placeholders.
Evidence and scope: Reviewed on November 19, 2026 against the current Router documentation and Hivenet Router v0.1.7. The examples were checked against documented fields and the release's redirect handling. No two-site Router deployment or inference request was executed. Expected results below are acceptance criteria, not recorded test results.
A site is a Router deployment with its own site ID and local agents. The routing logic addresses uneven model placement: the application enters through site A, but the requested model is served at site B. Router answers the first request with a redirect; it does not proxy that inference response through site A.
Multi-region LLM routing is one use of this arrangement when sites occupy different regions. Router selects from an operator-supplied map. It does not discover sites, verify their physical locations, or measure which region is nearest to the caller.
A healthy local agent takes precedence. Local agents being busy does not trigger a cross-site redirect. Keep local replica selection in the vLLM load balancing guide, and use the routing overview for the distinction between choosing a model and choosing where to serve it.
Redirecting also requires the first Router to be reachable. If the entry site is down, it cannot return a 307. Availability of the public entry point, recovery of an interrupted response, and traffic movement during an outage require separate design and testing.
Multi-LLM routing strategies choose among different language models for an incoming query. AWS describes semantic routing that classifies prompts with embeddings and LLM-assisted routing that uses a classifier model. Those approaches address which model should answer a task. Cross-site routing addresses where the selected model can be served. The same single model can be placed at multiple sites; placing multiple models in one region is a different choice.
For Hivenet Router, the model alias is resolved before this geographic routing layer makes a redirect decision. Keep model-selection rules in the rules and aliases guide. The two-site example below routes requests by model placement, local availability, and scope. It does not classify the prompt by task complexity or query complexity.
example-chat to site-fr-1, with X-Hivenet-Scope: EU.example-chat at site-de-1 with kind chat. Germany is eligible under the requested scope, so the first Router returns a 307 with a signed rt token in the destination URL.The release-pinned cross-site redirect reference documents this order. If the first site rejects model access, the response is 403 model_forbidden, not a redirect. When an alias is used, the token carries the concrete model resolved at the origin; the target does not choose another model by resolving that alias again.
Start with working TLS endpoints, protected administration access, agent authentication, and a healthy model backend at the destination. The client must be able to reach both public site origins. Use the Router security guide for those access boundaries.
Use dynamic client keys for this authenticated setup. Cross-site redirects reject startup with static client keys from auth.yaml. Provision the same client identity, including its key ID and key hash, on every participating Router, and keep model access and revocation state consistent. A valid token is insufficient if the target cannot resolve an enabled, unexpired key. Follow the dynamic API-key workflow; keep administrator keys separate from inference keys.
Each site also needs the same redirect-signing secrets. Store them in a protected file using one id:secret entry per line. Each secret must be at least 32 bytes; IDs contain 1–16 letters, digits, underscores, or hyphens. The first entry signs new tokens, while all listed entries can verify them. Distribute real secrets through your secret-management process rather than copying a sample secret from a guide.
Add these flags to the existing Router service command at the French site. They are additions to a secured deployment, not a complete startup command:
At the German site, use --site-id site-de-1 and the same signing-secret contents, domain suffix, and token lifetime. Replace .inference.example.com with a domain suffix you control. The leading dot is required; choose a suffix limited to trusted inference hosts. Every mapped site URL must be an HTTPS origin without a path, query, or embedded credentials.
The example uses the documented 60-second token lifetime. Keep the lifetime short enough to limit exposure while allowing your clients to complete the redirect. Token validation allows five seconds of clock drift; synchronize clocks rather than treating that allowance as an operating target.
Save this as sibling-map.json for a new, isolated two-site setup. The target model is placed only in Germany, where a healthy agent already serves it. There are no load hints or scale-from-zero placements in this example, so the test isolates the redirect path.
Replace example-chat with the exact served model ID and replace both HTTPS origins with your own. schema: 3, a nonnegative integer version, and region are required. The region label does not enforce the request's geographic scope; that decision uses the site records and request scope.
A map push replaces the whole map. For an existing deployment, preserve every required site and placement and choose a version above the current one. Lower versions are rejected with 409; equal versions are accepted. The map must include the receiving Router's own site ID, so the same complete map includes both sites even though only Germany has a placement for this model.
The following Bash commands assume administrator credentials are already available as FR_ADMIN_KEY and DE_ADMIN_KEY. Submit the same file to both protected administration endpoints, then read each map back:
Compare the returned site IDs, version, sites, and placements. In a replicated deployment, update and verify every Router instance through your administration path; sending one request to a load-balanced address does not establish that every instance received it.
Router holds the sibling map in memory. An external map writer must restore it after every Router restart and distribute later changes. Router does not create the map itself. Dynamic key reconciliation is a separate responsibility: a restored map cannot authenticate a client whose key state is missing.
The X-Hivenet-Scope header limits eligible redirect destinations. For the example above:
The country codes must be uppercase ISO 3166-1 alpha-2 codes. An invalid value is rejected with 400 request_invalid when Router evaluates the redirect scope. The v0.1.7 request-handling code checks for a healthy local agent before parsing that header, so do not use it as a general validation or location gate for every inference request.
On an accepted redirected request, the target must be inside the scope carried by the token, and a second redirect retains that scope. However, keys do not have a maximum scope or a home-country restriction in this release: a caller can ask for EU or all. The map's country and EU fields are operator-supplied metadata. These controls alone do not establish data residency or regulatory compliance.
Save a non-streaming request as request.json, replacing the model name consistently with the map and destination backend:
With a current curl installation and the client key available as CLIENT_KEY, run this Bash example against your French origin:
curl's redirect behavior preserves the POST method for a 307. Using a file with --data-binary keeps the submitted body stable. The command allows HTTPS only, follows at most two redirects, and sets a 120-second overall trial deadline. That deadline is an example, not a latency target. On Windows, use a Bash shell for this syntax.
For the controlled setup, expect one redirect followed by the destination's normal chat response. Check the response body as well as the final status. The command does not automatically retry inference. Add retries only after deciding how the application will handle a request whose completion is uncertain.
Current curl omits the Authorization header when following a redirect to another origin. Do not add --location-trusted to forward it. Router's signed token supplies the target credential for this flow. Other HTTP clients and SDK versions can behave differently: verify 307 handling, cross-origin credentials, body replay, deadlines, and streaming in the exact client you deploy.
The HTTPS restriction does not give curl a destination-host allowlist. This example depends on trusted entry sites and the Router-controlled map. If your application requires an independent allowlist, validate each destination origin before following it. Avoid verbose traces, header dumps, and full-URL logging during these tests because the destination URL contains the token.
A redirect token binds the key ID, concrete model, scope, origin and target sites, endpoint path, hop count, request identity, expiry, and hash of the original body. The target requires a byte-identical body. A client that parses and reserializes JSON can change those bytes even when the content appears equivalent.
Until used or expired, the full redirect URL together with the matching body can authenticate that request. Router redacts rt from its own access log, but proxies, tracing tools, client logs, and error reports need their own review. Use the request ID for correlation instead of storing the token-bearing URL.
Token-use tracking is local to each Router process. It is not a site-wide exactly-once guarantee. Retrying at the original URL can obtain a new token. Also, when a token fails validation but a supplied bearer key authenticates, Router can process the call as a new request using that key. Account for this when designing retries or testing rejected tokens.
Use synthetic prompts and test credentials. These checks describe what to verify in your environment; they do not report an executed deployment:
Monitor hivenet_redirects_total by model, destination site, and hop. Compare hivenet_sibling_map_version across instances, and inspect hivenet_redirect_rejections_total reasons such as expired, clock, key, body, and replay. A redirect counter records a 307 response, not a successful model response at the destination.
This example omits hints, so hivenet_sibling_map_hints_expired being 1 is expected: the metric also means hints are absent. The monitoring and troubleshooting guide covers the wider request path. Keep acceptance evidence for both sites and the actual client before treating the configuration as deployment-tested.
In production systems, choose acceptance criteria for the application before changing its routing strategy. Compare direct requests to the serving site with requests that enter through the other site, using the same model, prompts, output limits, and client location. This separates the extra redirect path from a change in model behavior.
The key metrics for this comparison are end-to-end completion time, errors, redirect count, and time to first token in a separate streaming test. The non-streaming curl example above does not measure TTFT. Include the client-to-entry and client-to-target network paths in your test: a geographically closer destination is not evidence of a faster complete response. Backend queues and model readiness also affect the wait. Google Cloud’s inference architecture guidance treats network diagnostics, inference latency, queue depth, and model-serving behavior as separate operational concerns.
Define task-specific quality metrics for the returned answers. If sites run different model revisions or generation settings, check output quality as well as availability. A successful redirect establishes neither routing accuracy for a task nor equivalent responses across deployments. Use the existing inference metrics guide for measurement definitions and fair comparisons.
Cost tracking should include serving capacity at each site, billed model calls where applicable, network transfer, and the operational overhead of distributing maps and keys. Google’s guidance identifies accelerator capacity, token consumption, and cross-region transfer as cost categories in multi-backend inference. Check the charges that apply to your own infrastructure and actual traffic path; the redirect itself does not prove savings.
For cost optimization, compare cost per successfully served request under the same workload and quality criteria. Count failed attempts and retries too. Adding another site may add idle capacity and administration work, so assess the performance and cost trade-offs before accepting the additional system complexity. Keep request IDs in structured logging for correlation, while excluding token-bearing URLs and sensitive data.
No such result is established by this feature. Eligible sites come from placements and scope. Router uses key, model, site, and session hashing to select and order up to two candidate home sites. Optional fresh hints can influence that order. This is not a latency measurement, and the two-site example has only one eligible destination.
X-Session-ID influences deterministic selection when multiple eligible siblings exist. A stable value can keep a conversation's routing consistent for a stable map and conditions. It does not synchronize conversation history or guarantee a cache hit. Without that header, a key's requests for one model use the same deterministic choice, subject to map and hint changes.
The request continues through local handling. With no eligible redirect, local placement for waking, or other configured handling, it normally ends in model_not_found. Cold-model holding belongs in the scale-to-zero guide. A sibling redirect takes precedence over a configured external-provider fallback, whose limits are covered in the fallback and retries guide.
Router permits at most two redirects and does not send a second redirect back to the original site. That bounds the chain; it does not guarantee successful inference. Keep maps current when adding new models or moving placements, and test what the client does when the final site cannot serve the model.
AWS defines active-active as serving traffic from all participating regions. Two Router origins alone do not establish that behavior for a particular model: this example places example-chat only in Germany. To evaluate regional failover, provide alternative serving capacity and an entry-point strategy, then test the complete path and its dependencies. Treat the sibling map as placement information, not proof that an alternate site can absorb the workload.
A redirect alone does not establish a shared quota across sites or raise the limits configured for a key. Verify the scope of your quota state and the target site’s admission settings before directing production traffic there. Keep this separate from regional provider quotas or pooling features offered by other products. The rate limits and quotas guide explains the existing controls.
The documented map supports chat, embedding, and rerank placements. Match the placement kind to the endpoint and verify the destination backend supports it. The chat example does not demonstrate those other endpoints; the existing RAG reranking guide covers that backend integration.
Pick one AI, compute, or storage workload and see the difference for yourself. Spin it up in minutes, or let our team map your fastest path to production.