Back to the Denominator: Capacity and Cost Governance for LLM Services
When LLM service demand outgrows resource supply, teams often jump straight to rate limiting and capacity purchases while overlooking the underlying governance problem. This article introduces a "back to the denominator" approach: define and track measurable metrics such as per-request cost, per-session cost, and effective resource utilization, then use them to decide when to throttle, scale, or degrade. It covers a four-metric denominator model, tiered rate limiting and degradation, session lifecycle management, capacity planning aligned with budgeting, and observability practices, along with a practical rollout checklist.
Back to the Denominator: Capacity and Cost Governance for LLM Services
In a weekly retrospective, the most valuable takeaway for an engineering team is rarely the conclusion “we don’t have enough compute.” The real issue is the governance problem behind it: when service growth outpaces resource supply, platforms typically respond first with emergency measures—request quotas, shorter retention for long sessions, restrictions on inactive sessions—and then invest in capital, procurement, or architecture optimization to relieve the pressure. The former is triage; the latter is investment. If teams only see the investment side and ignore unit costs, they end up cycling through “scale up, run tight again, scale up again.”
“Back to the denominator,” from an engineering perspective, means returning to the metrics that actually drive decisions: cost per request, cost per session, and effective resource utilization. These denominator metrics provide a measurable basis for deciding when to throttle, when to scale, and when to degrade.
1. Framing the Problem: Rate Limiting Is Not an Isolated Action
Resource consumption in LLM services is highly nonlinear. Short requests may consume only a small amount of inference capacity, while long contexts, multi-turn conversations, and concurrent tool calls significantly amplify memory, bandwidth, cache, and scheduling overhead. As utilization approaches a safety boundary, the platform must convert “uncontrolled overload” into “predictable limits.” Rate limiting is therefore not merely a product policy—it is part of a capacity protection mechanism.
From a governance standpoint, a single “compute shortage” incident reveals at least three issues:
- Whether capacity planning is based on the real request structure, not just call counts.
- Whether long and inactive sessions are included in the resource denominator.
- Whether throttling and degradation are tiered, observable, and recoverable.
Capital can shorten the procurement cycle, but it cannot automatically lower per-request cost. Without denominator metrics, scaling only temporarily masks inefficiency.
2. The Denominator Model: Four Quantifiable Metrics
Before you can “return to the denominator,” you must define it. For LLM services, at least four core metrics are recommended:
Cost per request:
Cost per request = (compute cost + storage and network cost + operations cost) / valid request count
“Valid requests” should exclude retries, failures, and malicious traffic. This metric determines whether scaling actually improves economics.Active session ratio:
Active session ratio = active sessions / total sessions
Long sessions continuously hold context caches, session state, and scheduling slots. A low active ratio means many “silent sessions” are still consuming reserved resources and need lifecycle-based reclamation.Resource utilization:
Resource utilization = effective compute time / allocated resource time
Low utilization is waste; high utilization raises the risk of queuing and timeouts. Define a safe range based on queue time, time-to-first-token, and error rate.Capacity watermark:
Capacity watermark = current load / safe capacity
Safe capacity is not theoretical peak—it is the capacity available after meeting target SLAs. Set yellow and red watermark levels that trigger early warning, throttling, and degradation respectively.
Together, these four metrics form a “denominator dashboard.” Without them, capacity decisions become guesswork; with them, scaling, throttling, and optimization share a common language.
3. Throttling and Degradation: Making Unavailability Predictable
The goal of throttling is not to reject users but to avoid systemic collapse. Use tiered limits with separate thresholds per tenant, per session, and per request type. Prioritize core requests; non-core requests can queue, run asynchronously, or degrade. Pseudocode:
function admit(request, tenantBucket, sessionBucket, globalWatermark):if globalWatermark >= RED:return rejectOrQueue(request, reason="global_capacity")if not takeToken(tenantBucket, request.cost):return rejectOrQueue(request, reason="tenant_quota")if not takeToken(sessionBucket, request.cost):return degrade(request, reason="session_burst")return accept(request)
Degradation strategies should be tied to business semantics: shorten non-essential context, disable low-priority enhancement features, convert long tasks to async jobs, or return cached results for duplicate requests. The key is to give callers clear error codes and retry guidance so that blind retries don’t amplify the load further. Throttling thresholds should derive from capacity watermarks and unit costs—not fixed constants.
4. Session Lifecycle: Long Conversations Are a Hidden Denominator
Long conversations are an underestimated cost source. Inactive sessions retained indefinitely consume cache, storage, and scheduling metadata. Establish session lifecycle management: set an inactivity retention period and reclaim on expiry; compress long contexts with summarization; externalize session state to scalable storage; restore cold sessions on demand. Pseudocode:
function sweepSessions(now):for session in scanInactiveSessions(now):if session.idleTime > retentionLimit:summary = summarizeIfNeeded(session)persistColdState(session.id, summary)releaseRuntimeResources(session)
Reclamation must be recoverable and auditable. For users, retention rules should be explicit; for the platform, track reclamation rate, restore success rate, and hot/cold tier hit rate. Only by including “silent sessions” in the denominator does the capacity model become real.
5. Capacity Planning and Capital Investment: Aligning Engineering with Finance
Capital typically opens a scaling window, but the scaling order should be driven by denominator metrics. A recommended sequence is “govern first, then elastic, then reserved”: first clean up inefficient sessions and invalid retries, then match demand peaks with elastic scaling, and finally reserve resources based on a stable baseline. Capacity reviews should examine demand forecasts, unit costs, safe watermarks, and budget thresholds together. Cloud providers’ object storage, logging, monitoring/alerting, and container platforms can serve as supporting components—the specific choices should follow your team’s stack and compliance requirements.
Engineering teams need to translate financial language into technical constraints: how much safe capacity a budget corresponds to, what optimization targets unit costs imply, and how much early-warning window a procurement cycle requires. Capital investment is not a substitute for denominator governance—it is a multiplier applied after it.
6. Observability and Alerting: No Metrics, No Governance
Build a unified capacity dashboard that includes at least: concurrency, token throughput, queue time, error rate, cost per request, active session ratio, session reclamation rate, cache hit rate, and capacity watermark. Alerts should be tiered: yellow watermark triggers trend alerts and capacity review; red watermark triggers throttling, degradation, and a scaling ticket. Logs and traces should be correlatable by tenant, session, and request type to make cost anomalies traceable.
7. Rollout Checklist
- Build the denominator dashboard and standardize per-request and per-session cost definitions.
- Set service-level objectives and safe capacity, with clear yellow and red watermarks.
- Implement tenant-, session-, and global-level throttling with recoverable degradation.
- Establish session retention, summarization, hot/cold tiering, and reclamation mechanisms.
- Merge capacity reviews with budget reviews; decide scaling order by denominator metrics.
- Run drills for throttling, degradation, and reclamation to validate observability and recovery.
Returning to the denominator is not about shrinking the business—it is about building growth on measurable, sustainable capacity and cost boundaries. For engineering teams, what matters most is not any single scaling event, but a closed governance loop that consistently protects both user experience and cost through supply fluctuations.
