Building a Production LLM Service
Put the pieces together: the layers of a real LLM backend, its API, stored conversations, queues, tenants, routing, config, deployment and a service skeleton.
Phases 2 to 11 gave you the parts: a model client, prompts, structured output, streaming, cost controls, tools, retrieval, evals, security and observability. This phase assembles them into one service that other people and programs can call, and asks the questions a single script never faces: what does the request and response look like, where does a conversation live, what happens to a job that takes minutes, and how do two customers share one service without seeing each other's data?
Every example is a small in-memory simulation of one part of the service (a request handler, a conversation store, a job queue on a simulated clock, tenant quotas, a model router, a feature-flag rollout, a health check), so you can run it, read it and break it. Real service code (FastAPI, Spring Boot, a Next.js route handler, a Dockerfile) appears in blocks that are shown, not run, and this site's own lab route is walked through as a production example.
The phase ends with a playbook: a service skeleton in three languages and a pre-launch check. The infrastructure around it is taught elsewhere on Hectal: system design (/system-design) for scaling and queues, Docker (/docker) for images, CI/CD (/cicd) for pipelines and Kubernetes (/kubernetes) for running containers.
Practise this phase
Hands-on exercises: write the code, run it, and press Check to have it tested automatically.