Compute Capacity and Reliability Governance for Large-Scale LLM Deployment

    When large language models move into production, the first failure mode is often unstable serving rather than weak intelligence. This article frames GPU hours, memory, latency, and risk as measurable constraints, then covers pool-based capacity planning, request tiers, degradation and rollback, medical model families, audit, and cloud primitives.

    When large language models are deployed at scale, teams usually feel service instability before they feel a lack of model intelligence. Sudden free or low-price traffic, long-context jobs that consume GPU memory, training and inference competing for the same accelerators, and high-risk domains such as healthcare that require traceability and rollback often hit at once. Abstracted into engineering terms, compute is a scarce production factor. Architecture should be designed around constraints, not around an ideal peak.

    Turn the problem into measurable constraints

    Before treating “not enough compute” as a slogan, write constraints as observable metrics. Otherwise scaling is guesswork.

    • Supply: available accelerator-hours, GPU memory, high-speed interconnect bandwidth, storage throughput, availability zones, and failure domains.
    • Demand: daily active requests, peak concurrency, input and output token distributions, context-length percentiles, and multimodal share.
    • Quality: time to first token, end-to-end completion latency, error rate, refusal rate, domain-task accuracy, and human-review pass rate.
    • Cost: resource use per useful token, idle-GPU share, and amplification from retries and replays.

    Averages are usually misleading. Plan capacity on percentiles: estimate KV cache from P95 context length, and queue depth from short bursts rather than average QPS. Training, offline evaluation, and online inference should sit on one resource ledger so that “give GPUs to training at night, saturate serving by day” does not happen without a degradation plan.

    Capacity planning: split scarce compute into pools

    Do not put every accelerator into one shared pool. Partition by blast radius and elasticity:

    1. Online serving pool: published models, reserved headroom, not fillable by ad-hoc experiments.
    2. Elastic pool: deferrable batch work, distillation, data cleaning, and regression eval.
    3. Isolated pool: canary versions and sensitive shadow traffic (for example medical), so faults do not spill.
    4. Reserve: failover and planned maintenance, sized so core SLOs still hold after losing one failure domain—not cut because it “looks wasted” in quiet periods.

    Queuing must be explicit. Interactive short requests, long-form generation, and batch extraction should not share one priority. Token buckets or weighted fair queues can cap bursts per tenant and per API. When supply drops, the degradation order should be written in advance: reduce sampling diversity or max generation length first, then disable non-core plugins, then throttle low-priority tenants, and only then touch core medical or transaction APIs. Tightening free quotas on the UI without fairness and a clear explanation often funnels traffic into retry storms.

    Illustrative request classification (pseudocode for policy, not a platform API):

    1. on_request(req):
    2. tier = classify(req.tenant, req.scene, req.tokens)
    3. if pool.free_slots(tier) == 0:
    4. if tier == "interactive_core":
    5. return degrade_or_queue(req, timeout=short)
    6. else:
    7. return reject_with_retry_after(req)
    8. reserve(kv_cache_estimate(req))
    9. dispatch(req, pool=tier)

    The point is estimate-then-reserve. If a long-context job only discovers OOM at execution, queue time is already wasted and other requests on the same GPU can collapse with it.

    Reliability: outage count is not the only metric

    Unavailability usually comes from resource exhaustion, dependency timeouts, model-version defects, or bad releases and config. Counting only “the process died” misses “up but too slow to use.” Watch:

    • Saturation: GPUs pegged, KV-cache hit rate collapsing, queue time rising, paging or offload becoming frequent.
    • Error budget: allowed unavailability for core APIs per week or month; freeze nonessential releases when the budget is spent.
    • Blast radius: which tenants are hit when one model replica, GPU, host, or zone fails.
    • Recovery path: whether you can switch back to the last stable weights and prompt templates without retraining.

    Ship in small steps. Version weights, tokenizer, prompts, safety policy, and post-processing separately. Canary with shadow traffic: copy live requests to the new version, log diffs, do not return results to users. Scale traffic only after latency, refusal rate, and key task scores stay in bounds. Rollback must include routing weights and cache warm-up state, or a cold start after rollback becomes a second incident.

    Domain model families: why healthcare should not be one universal model

    Healthcare tasks differ widely: consumer Q&A, structured notes, lab interpretation, medication checks, imaging-assist descriptions, and follow-up scripts. Risk, evidence needs, and latency budgets are not the same. A maintainable family is clearer than a single model:

    • General backbone: language understanding and generation; not directly responsible for clinical conclusions.
    • Task adapters: instruction data, light adaptation, or retrieval to pin the backbone to a task format.
    • Knowledge and tools: glossaries, labels, guideline summaries, internal rules injected via retrieval or function calls so volatile knowledge is not baked into weights.
    • Policy: de-identification, disclaimers, high-risk handoff to humans, output schema checks.

    Medical outputs should default to checkable. Prefer structured fields over long prose when the task allows. If extracting diagnosis, meds, and times from a note, schema failure should retry or escalate—not write broken JSON into storage. Citations should point to retrievable spans; if evidence is missing, say so rather than fluent invention.

    Evaluation cannot rely only on public leaderboards. Prepare de-identified real-distribution samples, adversarial rewrites (typos, colloquial speech, multi-turn correction), and edge cases (missing information, contraindications, unit conversion). Layer metrics: field-level precision/recall for extraction, evidence coverage and harmful-advice rate for Q&A, time to first token for interactive use. Keep a human-audit share, especially on paths that could affect care. The system should assist organization and prompting; qualified people still make the final call.

    Data, permissions, and audit

    Healthcare and enterprise data are sensitive by default. Separate storage and authorization for training, eval, and online logs. Least privilege: logs should not store full text by default—request IDs, token size, routing version, and error codes. Replay uses short-lived, approvable de-identified copies. Retrieved snippets in the prompt belong in the audit trail; failures often come from dirty knowledge bases, not the backbone.

    In multi-tenant settings, isolate cache by tenant or security domain. Prefix cache saves compute, but sharing a KV prefix that contains private templates leaks data. Separate who can swap weights, who can change safety policy, and who can export eval sets.

    Observability and postmortem checklist

    Before launch, confirm:

    • Core vs. non-core APIs have distinct rate limits, timeouts, and retry caps; retries use jitter to avoid synchronized storms.
    • KV and batch size have caps; over-limit requests are rejected at the edge with a clear reason.
    • Each model version has an offline regression set and one-click rollback.
    • Object storage, queues, logs, and alerts have been actually cut in drills.
    • High-risk paths have a human-escalation channel with on-call response time.

    Postmortems should answer: when the first saturation signal appeared, whether degradation followed the playbook, how much user retries amplified traffic, and which request classes were collateral damage. Feed that back into the capacity model and routing, instead of only adding another machine.

    How this maps to general cloud capabilities

    Teams need not build every primitive. Object storage fits weights, eval sets, and audit packs; message queues fit peak shaving and async batch; containers fit rolling releases by model version; logging and alerting fit latency, errors, and resource saturation in one view. Choose on failure domains, encryption, permission audit, and elasticity grain—not slogans of infinite compute. If you use a general platform such as Baidu AI Cloud, treat those services as replaceable component classes so business logic is not welded to a one-off scale-out or an unproven exclusive feature.

    Takeaway

    Engineering maturity for LLM serving is constraints written into the architecture: pools, tiers, degradation, rollback, evaluation, and audit. Professional domains such as healthcare add task families and evidence traceability, which reduce real incidents more than stacking parameters. Compute will stay tight; turning tightness into quotas, signals, and playbooks is what keeps the service from failing on the first traffic spike or the first bad release.