On-premises AI
Progressive Cloud-to-On-Premises AI Migration Strategies
How to move AI workloads from cloud APIs to on-premises models in stages, with evaluation baselines, shadow traffic, gradual traffic shifting and a way back.
In short
Migrate AI workloads from the cloud to on-premises in stages rather than in one cutover. Put a gateway in front of both environments, build an evaluation set and baseline, run the on-premises model on mirrored traffic, shift live traffic gradually by workload and risk, and keep a tested route back to the cloud until the new platform has proven itself.
Key takeaways
- A gateway with an OpenAI-compatible API in front of both environments turns the migration into a routing change instead of an application rewrite.
- If the on-premises model differs from the cloud model, compare answer quality on an evaluation set rather than expecting identical outputs.
- Shadow traffic tests the new platform on real requests without affecting users. Istio's mirroring discards the mirror's responses, so the shadow side must record its own.
- Shift live traffic in steps by workload and risk, with rollback criteria agreed before each step.
- Decommission the cloud side only after a stable period, and remove the data, keys and fine-tuned models held by the provider.
Why migrate progressively instead of in one cutover?
A single cutover puts every workload at risk at once, while a progressive migration exposes problems on a small share of traffic, where they are cheap to fix. The approach borrows from canary and blue-green releases: limit the blast radius, validate each step and keep a way back.
Organisations move AI workloads from cloud services to their own infrastructure for several reasons: personal or confidential data in prompts, steady volumes that make owned capacity cheaper than paying per token, sector rules on outsourcing and resilience, or control over model versions. Cloud providers retire model versions on their own schedules. Microsoft’s Foundry documentation, for example, sets a standard 18-month lifecycle for generally available models, after which requests return an error, and states that retirement dates cannot be extended. Our comparison of on-prem AI and cloud AI covers when each fits.
Whatever the reason, the migration changes the model, the serving stack and often the retrieval pipeline at the same time. Doing that gradually means the business never faces a cliff edge, and each stage teaches the team something about the new platform.
What should you prepare before moving any traffic?
Prepare a single entry point, baselines and an evaluation set before the first request reaches the new platform.
- Put a gateway in front of the cloud service. Applications should call one OpenAI-compatible endpoint that you control. vLLM, for example, provides an OpenAI-compatible HTTP server, and LiteLLM offers one OpenAI-compatible endpoint for many providers, with load balancing, fallbacks and retries between deployments. The migration then becomes a routing change. Our post on building an enterprise AI gateway covers the design.
- Inventory what each workload uses. Note the data classes involved, context lengths, and API features such as tool calling, structured outputs or embeddings, because the on-premises model and engine must support them.
- Record baselines. Measure the cloud service’s latency percentiles, error rates, cost per request and answer quality for each workload.
- Build evaluation sets. Use representative, difficult and adversarial requests from each workload, reviewed for personal data. Our post on automated model evaluation pipelines shows how to run them in a release process.
- Plan retrieval. If retrieval uses a cloud embedding model, plan to re-embed the documents with the on-premises model, because an index has to be queried with the model that built it.
- Size the target. The LLM GPU sizing calculator estimates GPU memory, and the on-prem vs cloud AI cost calculator compares running costs with your measured token volumes.
How do you test the on-premises model on real traffic without risk?
Run it in shadow mode: send a copy of production requests to the on-premises model while users keep receiving the cloud answers.
Service meshes and gateways support this directly. In Istio, for example, mirrored traffic travels out of band of the critical request path, the mirrored responses are discarded, and a mirrorPercentage setting mirrors only a fraction of requests. Because the mirror’s responses are discarded, the on-premises service has to record its own outputs, with request identifiers, so that you can compare them with the cloud answers later.
How you compare depends on the model:
- A different model, the usual case when leaving a proprietary API, will not produce the same text. Compare quality on the evaluation set and on a reviewed sample of shadow requests.
- The same open-weight model in both environments should behave similarly, but sampling settings, numeric precision and quantisation can still change outputs, so define a tolerance rather than expecting exact matches.
Shadow traffic also tests capacity under real load and shows error types you did not anticipate. Treat the stored shadow requests and responses as production data: they are copies of real prompts, so apply the same access controls and retention rules as the live system.
How do you shift live traffic safely?
Move traffic in steps, workload by workload, with rollback criteria agreed before each step. Weighted routing makes this a configuration change: Istio, for example, migrates traffic gradually through a sequence of routing rules that send a percentage of requests to the new destination, and lets both versions scale independently of that split.
| Stage | Traffic | Check before moving on |
|---|---|---|
| Prepare | None | Gateway in place, baselines recorded, evaluation sets ready, rollback rehearsed |
| Shadow | A copy of some or all requests; users see cloud answers | Capacity under real load, error types, quality on reviewed samples |
| Canary | A small share of live traffic for a low-risk workload | Latency, errors, quality and user feedback against the baseline |
| Expand | Growing shares, workload by workload | The same checks, plus capacity headroom for the next workload |
| Full on-premises | All traffic, with the cloud route as a tested fallback | Stable operation over an agreed period, including a model update and a failover test |
| Decommission | Cloud route removed | Provider-held data deleted, keys revoked, records updated |
Hold each step until enough requests have passed to compare the metrics with confidence, not for a fixed number of days. Automate rollback for clear breaches, such as error rates above the agreed limit, and leave ambiguous quality signals to a named person who can decide quickly. Our post on canary deployments for AI models covers the release mechanics.
Which workloads should move first?
Start with workloads where problems are easy to detect and cheap to correct, and move customer-facing, latency-sensitive services last.
- Batch jobs, such as document classification or summarisation pipelines, tolerate latency and their results can be checked before anyone uses them.
- Internal tools, such as search assistants and drafting aids, have users who can give direct feedback.
- Customer-facing services move once the platform has handled the earlier workloads well.
If the migration is driven by data protection, the most sensitive workload may need to move early. In that case, invest more in shadow testing and evaluation rather than skipping stages. Sequencing by workload also lets hardware purchases follow proven demand instead of one large up-front commitment.
How do you keep a route back to the cloud?
Keep the cloud endpoints, credentials and quotas valid until the decommissioning stage, and let the gateway fall back to them when the on-premises service fails.
Define fallback rules per data class. If a workload moved because its data must not leave your environment, a fallback to a cloud API would reintroduce exactly the transfer you removed. For those workloads, queue requests or fail clearly instead. Check the provider’s model lifecycle too: a cloud model version kept only as a fallback may be retired before you expect.
Document every rollback. Each one reveals something about the on-premises setup that needs fixing, such as a capacity limit under sustained load, a network bottleneck or a serving configuration that behaves differently with production request patterns.
When can you decommission the cloud side?
Decommission once the on-premises platform has carried all traffic stably for an agreed period, including at least one model update and one failover test, with no open rollback causes.
Then close the cloud side properly: delete prompts, files, logs and fine-tuned models held by the provider as the contract allows, revoke keys, end unused commitments, and update your records of processing and your AI inventory. Archive the gateway configuration that pointed to the cloud, so you can restore it if you ever need temporary capacity.
If you want the result without operating it yourself, SysArt can run the platform on your infrastructure or in a dedicated private environment in EU data centres. Our on-premises AI implementation service covers the migration itself, from assessment to hand-over.
Featured image by Josh Calabrese on Unsplash.
Frequently asked questions
How do you migrate AI workloads from the cloud to on-premises?
In stages. First put a gateway in front of the cloud API so applications call one endpoint, and record baselines for latency, errors, cost and quality. Then run the on-premises model on mirrored traffic, move live traffic step by step, starting with lower-risk workloads, and keep the cloud route as a tested fallback until the on-premises platform has run stably at full load.
What is shadow mode in an AI migration?
Shadow mode sends a copy of real requests to the new on-premises model while users continue to receive answers from the existing cloud service. It tests capacity, errors and answer quality on production traffic without affecting anyone. Mirroring tools such as Istio's discard the mirror's responses, so the shadow service must store its own outputs for comparison.
Will an on-premises model give the same answers as the cloud model?
Not if it is a different model, which is usual when moving from a proprietary API to an open-weight model. Compare answer quality on an evaluation set built from your own requests instead of looking for identical text. Even the same open-weight model can produce slightly different outputs across environments because of sampling settings, numeric precision or quantisation.
How long does a cloud-to-on-premises AI migration take?
It depends on hardware lead times, the number and risk of the workloads, how much retrieval and integration has to move, and how quickly evaluation sets can be built. Plan the migration as stages with exit criteria rather than dates: each stage ends when its checks pass, and the next begins only then. That keeps pressure from overriding the evidence.
Should the cloud remain as a fallback after migration?
For a defined period, yes, but decide per data class. If a workload moved on-premises because its data must not leave your environment, falling back to a cloud API would reintroduce the transfer, so queue or fail instead. Also check the provider's model lifecycle: a cloud model version kept only as a fallback may be retired in the meantime.
Sources
- Istio documentation: traffic mirroring · checked 27 October 2026
- Istio documentation: traffic shifting · checked 27 October 2026
- vLLM documentation: OpenAI-compatible server · checked 27 October 2026
- LiteLLM documentation: AI Gateway (proxy server) · checked 27 October 2026
- Microsoft Learn: Foundry Models lifecycle and support policy (model retirements) · checked 27 October 2026