Urgent.News

What's breaking now, across thousands of outlets.

AI

Why real-time AI at scale is so hard

Real-time AI at scale is harder than it looks. Pipelines that hum along in development routinely hit problems in production. The post Why real-time AI at scale is so hard appeared first on The New Stack .

Why real-time AI at scale is so hard

Real-time AI at scale is a challenging endeavor, with numerous obstacles that often go unnoticed until they become critical. In a recent discussion, my colleague Tim Koopmans shared some hard-learned lessons about what typically goes wrong with real-time AI at scale.

One significant issue is that latency often looks fine in testing but can skyrocket under real concurrent load. For instance, an ML-based financial trading app experienced a P99 latency spike to 3 seconds when approaching 740,000 operations per second. This issue was not due to the model itself but rather the feature lookups queuing up behind writes under load. Tail latency is a property of the architecture, not a bug that can be fixed through retries, bigger caches, or connection pool tuning.

Another problem arises when stale features cause a drop in accuracy. In Tim's case, user profile staleness exceeded a five-minute SLA target, and vector embeddings became stale. Offline evaluation metrics appeared fine, but mixing them with online data led to poor performance. The model itself remained fine, but it was making decisions based on outdated data.

Vector indexes require maintenance as well. No matter how vendors advertise, "set it and forget it" isn't a viable strategy for embeddings. Every re-embedding pass degrades the index quality, and recall rates can drop dramatically. Tim experienced recall rates as low as 42%, accompanied by ballooning query latency. Tim advises treating vector indexes like any other database index, by monitoring recall accuracy, planning for partial or batch builds, and being aware that changing similarity functions or embedding models may require starting the graph over from scratch.

Resource contention is another issue, particularly when training and serving share the same hardware. Tim had one machine performing double duty, causing GPU, RAM, and CPU competition. To avoid this, it's essential to separate the write path from the read path and ensure that training is separated from serving if resources allow.

Retraining is an inevitable part of real-time AI at scale. Every model swap requires a transition period, during which the old model is still serving stale predictions while the new one warms up. A blue-green deployment, canary releases, and running old and new models in parallel can help mitigate this issue. As the scale grows, such as with 100 million ML models, the process will become even more complex.

By understanding these challenges and employing the right practices and infrastructure choices, it's possible to avoid falling into these traps and successfully implement real-time AI at scale.

Written by urgent.news from The New Stack's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at thenewstack.io →

More in AI

Your agent's p99 is a different animal

Originally published on Loop & Retry — field notes on building LLM agents that survive production. The demo felt instant. The agent answered in about four seconds, every time you ran it on stage.

从 Demo 到生产:那些真正让 AI Agent 敢上线的护栏

从 Demo 到生产:那些真正让 AI Agent 敢上线的护栏 开场钩子: 你在网上看到的多数「AI Agent」都是 demo。它们之所以上不了生产,原因往往 只有一个 —— 而下面这个开源的小脚手架,专门解决它。 我们已经过了「能调通大模型」就算赢的阶段。现在真正难的是那没人讲的 10%: 是什么阻止 Agent 做出伤害性的事? 我在微软跑过一套约 25 个 Agent…

From Demo to Production: The Guardrails That Make an AI Agent Safe to Ship

From Demo to Production: The Guardrails That Make an AI Agent Safe to Ship Hook: Most "AI agents" you see on the internet are demos.

  • Output quality grading ensures safe shipping of AI agents
  • Human approval gate prevents unsafe actions without consent
  • Model-agnostic providers allow flexibility across multiple models

More from Sunday 23 August →