Skip to content
← All posts

Production AI

Hosting an AI Assistant: On-Prem vs Cloud Is the Wrong Debate

For two weeks I wrote about the cost of LLM inference. Today, a choice that drives much of it: where each part of your assistant runs.

The problem

"On-prem or cloud?" sounds like one decision. But an assistant is a chain (streaming front end, agent, model, data), and each piece has its own constraint.

Take a banking app with 10 million users. With 100,000 people online, one message every two minutes and 10 seconds per answer, that's about 8,000 answers being streamed at the same time, plus customer data that must stay protected.

How I solve it

Decide component by component.

  1. Put the streaming edge where long streams are safe

The risk isn't the number of streams. It's the network path: proxies that buffer responses (the user sees nothing, then everything at once) and firewalls that close idle connections while an LLM is still processing a long prompt. That points to the cloud front door, where timeouts and buffering are settings you control. If the edge stays on-prem, disable buffering, raise idle timeouts and send a heartbeat every few seconds.

  1. Put inference where it can absorb peaks

On-prem GPUs are a fixed number, so a marketing campaign can create a queue. If you already own GPUs, base load can stay on-prem, with overflow to the cloud.

  1. Keep data access where the data lives

Core systems stay on-prem, behind a narrow, audited API for the agent.

  1. Make the link resilient

A cloud agent that calls on-prem data depends on both sites: use redundant private interconnects, and cache non-sensitive reference data near the agent.

  1. Protect data in layers
  • Decide which data may reach a cloud model at all.
  • Contract for an EU region, with no retention and no training on your data.
  • Use private endpoints and reversible tokenization, with recall measured on a test set.
  • Masked data is still personal data under GDPR.

Rule of thumb:

  • Streaming edge and inference: where they can scale.
  • Data: where it lives, behind a resilient link.
  • If regulation or steady high load says otherwise, on-prem inference makes sense.

Which part of your AI stack sits where it does because of an early decision nobody revisited?

#AIArchitecture #GenAI #CloudArchitecture

Discuss this post on LinkedIn →