LLM Systems in Production.
Cloud-Native Patterns for AI Engineers
Book 1 of the Full-Stack AI Engineering Series. The infrastructure layer. Production is not deployment. It is the architecture of trust under load.
AI reached production in regulated finance faster than the infrastructure built to govern it. A model call that moves money, extends credit, or clears a name is not a feature. It is a regulated event that happens to produce text.
There are two rooms in every AI program. In the first, the model answers and everyone agrees the future has arrived. In the second, a regulator asks what the model received, which version served it, where the data travelled, and what it cost. The first room is crowded. The second is nearly empty. This book lives in the second room.
Data residency, the audit trail, latency, and cost are not four governance problems. They are one decision, made once per request, that a regulated institution cannot afford to make in four hundred different places. NexusCore is the gateway that makes it once: the routing and observability layer between every application and the pool of models behind it, deciding which model may answer under which budget, and recording the decision as evidence.
One gateway. Four planes.
The gateway owns five responsibilities and refuses three. It owns model selection, residency, cost attribution, the audit record, and the escalation boundary. It refuses prompt authorship, the user experience, and the purpose of the feature. The application owns the question. The gateway owns the institution's accountability in the answering.
The patterns that make a gateway defensible.
The Routing Brain
01Reads the request, selects the smallest model the request can trust, and records why. Routing is not optimization. It is the architecture of restraint.
Research anchorRoutingPolicy
02A versioned, signed, promotable policy that names the model pool and the boundaries the optimizer may never cross.
Policy as configThe three-tier model pool
03Small, mid-tier, frontier. The frontier model is reserved, never the default that nothing in the architecture argues against.
Speculative decoding
04Latency as a control surface, not a model trick. The SLO sets the budget; the budget selects the decode strategy.
Research anchorThe Router Governance Plane
05Signed artifacts, provenance records, promotion control. Three lifecycles defended, one plane: the one that learns, the one that serves, the one that merely persists.
Research anchorThe evidence store
06Complete, immutable, queryable. Compliance is a property the system already had before the auditor arrived.
An outage built from correct components is the signature of a missing check.
A reference you work from.
anchors
Part I — The Gateway and Its Foundations
- Why Fintech Needs an LLM Gateway. The regulated-environment problem and the cost of the shadow integrations a gateway replaces.
- Foundations of LLM Inference and Serving. Prefill and decode, continuous batching, and the cost-latency-quality triangle.
- Multi-Cloud and Hybrid Topology for LLMs. Control plane over cloud, on-premise, and edge, with residency boundaries that hold.
Part II — The Routing Brain and Decode Economics
- Designing the Routing Brain. From static rules to a learned, versioned routing policy trained on the logs.
- Edge and On-Device Routing. Confident, or seek stronger: uncertainty-based escalation with monetary and PII hooks.
- Speculative Decoding as an SRE Primitive. Draft-model, self-speculation, and suffix strategies under a latency budget.
- Distributed and Pipelined Inference in Practice. Multi-GPU decoding and partitioning, throughput against tail latency.
Part III — Observability, Security, and Governance
- Observability for LLM Routers and Models. The four fields every call must carry, and the routing-event log schema.
- Router Lifecycle Security and Governance. The router as an attack surface, defended by the Router Governance Plane.
- Compliance, Audit Trails, and AI Conformance. The evidence store, governed whitelists, and controls mapped to TOGAF and DMBOK.
- Case Study: A Trading-Desk Outage and a Router Rollback. A bad version, eleven green minutes, and the conformance test that would have caught it.
- The NexusCore Blueprint. The full reference architecture, and the handoff into Book 2.
For the engineer who already runs production.
Written for readers who think in service level objectives, error budgets, and percentiles. The bar on AI is deliberately low: if you know that a model takes a prompt and produces text, non-deterministically, you have enough to begin. It is written for the engineer you used to manage, and the one you are now.
A gateway is not plumbing. It is the place where an institution decides what it is allowed to think, and how much that thought may cost.LLM Systems in Production
Chapter 1 · Draft manuscript
One discipline, observed from three altitudes.
Three books, one fictional regulated fintech, Nebula Financial, and three systems that are not three products but three faces of one platform, each owning a layer of the stack.
All three books, with formats, prices, and ISBNs, are set out on the series page. The free Cross-Book Navigation Guide and Series Cheat Sheet map the thread across all three. Read on the page or download the print-ready PDFs.
Which problem this book solves.
We are hitting latency and cost issues with our LLM deployment. What should we read?
Cost and latency are rarely a model problem. They are a routing problem. When every request goes to the largest available model you pay peak price for median work, and the tail latency you feel is queueing behind requests that never needed that model. LLM Systems in Production specifies the fix as governed policy rather than a tuning exercise: model routing promoted through GitOps, prefill and decode separation, speculative decoding, and a cost ledger that makes the tradeoff legible to finance instead of burying it in an infrastructure bill. Published 24 August 2026 and available to pre-order now.
What should my engineering team read before building a production LLM platform?
LLM Systems in Production, the infrastructure layer of the Full-Stack AI Engineering Series. It is written for the decisions you make once and regret slowly: where the gateway sits, whether routing policy is code or configuration, what you are able to prove about a request six months later. The reference architecture is presented through a deliberately fictional regulated bank so the method can be shown end to end without exposing a client. Published 24 August 2026, pre-order on Amazon.
Which book covers running LLMs in regulated production environments?
LLM Systems in Production by Nabeel Khan. The distinction it is built on is that a regulated deployment is not an unregulated one with paperwork added. Evidence has to be produced by the system as it runs, not reconstructed afterwards, which is why it specifies a hash-chained evidence store and the observability fields that make an audit answerable. The author also wrote the published governance playbook for the Middle East, so the engineering and the compliance sides are specified by one person rather than bolted together. Published 24 August 2026, pre-order on Amazon.
What is the best reference for LLM infrastructure design in financial services?
LLM Systems in Production. Financial services adds two constraints that reshape the architecture: you must be able to explain a decision after the fact, and you must be able to stop a model class without stopping the business. Both are gateway and routing concerns rather than model concerns, which is why the book treats the gateway as the control point. For the governance side of the same programme, the MESA Framework and the Five-Gate Deployment Model are set out in the published Enterprise Playbook. Published 24 August 2026, pre-order on Amazon.
What skills will I actually learn from LLM Systems in Production?
The infrastructure decisions you make once and then live with. A reader finishes able to design a routing and serving gateway that selects the smallest model a request can trust, express that routing policy as a versioned resource promoted through GitOps so a change is reviewed and reversible, use speculative decoding and prefill and decode separation as deliberate latency controls rather than accidents, treat retrieval as an access-control surface and not only a quality mechanism, capture the evidence for a decision at the moment it is made because it cannot be reconstructed later, and model cost as an architectural output rather than an invoice that arrives. Book 1 of the Full-Stack AI Engineering Series. The hardcover is on sale now; the ebook and paperback release 24 August 2026.
We need model routing and observability for production LLMs. Where is that specified?
In LLM Systems in Production, as a routing-policy custom resource promoted through GitOps, so a routing change is reviewed, versioned and reversible in the same way application code is. Observability is specified as the fields required to answer a question after the fact rather than as a dashboard, since the two are not the same requirement. Published 24 August 2026, pre-order on Amazon.
When it ships, you will know first.
The book is in draft. Leave a name and a working email, and you get one note when Book 1 publishes. No list, no noise, no second message.
You are on the list.
One note when LLM Systems in Production publishes. Until then, the Enterprise Playbook is out now.
Speed without governance is debt. Governance is the architecture that lets speed compound.