Admission control in NeMo Guardrails: what happens when requests outpace capacity
Admission control decides what a NeMo Guardrails server does with a non-streaming request when more requests arrive than it can process at once. Overload handling is the combination of four things: a queue that holds waiting requests, a rejection path that returns an HTTP 503 response when capacity runs out, client behavior that handles that response correctly, and capacity planning that sets how much traffic the server can absorb. Teams usually need this work in one of three moments: before launch, before a known traffic growth event, or after an incident in which slow safety model calls caused requests to pile up. The exact queue size, wait limits and rejection conditions must be confirmed against the NeMo Guardrails documentation for the version you run, and 0.25.0 is the current release.
The stakes are highest for regulated assistants. A request that cannot be checked must not be answered, so an overloaded guardrail path cannot be allowed to fail open. The decision to make early is what the calling application does on a 503: retry with backoff, show a holding message, or withhold the answer. A common failure is a gateway or client that treats any error as a pass and forwards the model output anyway. Confirm that every non-success response from the guardrail server results in no answer being released to the user, and test that path explicitly rather than assuming the client library handles it.
Before go-live, run a load test that deliberately slows the safety model calls, because that is the condition that fills the queue in practice. Record the request rate at which 503 responses start, the latency users see before that point, and whether the client's fallback behaves as designed. Then set alerts on queue depth and rejection rate, using the metric names confirmed for your version, and size capacity with headroom above the peak you measured. Capacity adds recurring infrastructure cost, while the load test and client changes are one-time work. When requesting a quote, ask that the written scope include the load test, the failure-path tests and the alert definitions.
How a guardrail request moves through admission, rails and rejection
The diagram starts with a client call to the guardrails server, where an admission decision either places the request in a queue or returns a 503 response. Accepted requests pass through input rails, a model call and output rails before the response returns. The client retry loop and the queue and limit steps, which the deployed version's documentation must confirm, are marked so teams can check them against their own release before sizing capacity.
Request path through IORails admission control, with rejection and client retry; queue limits to confirm for the deployed version.
How IORails queues and rejects non-streaming requests
The first decision is which engine handles your traffic. The queueing and rejection behavior in this section applies to non-streaming requests on the path your configuration uses, so confirm which engine your guardrails run on before you tune anything. The NeMo Guardrails documentation is the place to check how each engine is selected in your version. Streaming requests need separate handling. They keep a connection open while content is sent, so a rejection or block may arrive after the client has already received part of an answer. Plan and test streamed and non-streamed traffic as two different load profiles, because the admission behavior you measure for ordinary calls may not describe streamed calls.
In general terms, a non-streaming request that arrives while the instance is busy waits for a slot. If a slot frees before the wait ends, the request runs through the rails in the usual order. If the queue cannot take the request or the wait expires, the instance returns a rejection to the caller. The queue depth, wait limit, and the status code and body returned on rejection are values this page cannot state for your version. Confirm each one in the documentation for your release and in your own results from a saturated test instance. Ask your deployment team to show these settings in configuration and to document them in the runbook before go-live.
A rejected request should have done no guardrail work. It is turned away before the rails run, so no input checks, safety model calls, custom actions or downstream model calls should occur for it. Verify this on a saturated test instance by confirming that rejected requests produce no rail-level traces or model calls. Client code needs a plan for the rejection: retry with backoff, a clear message to the user, and a log category separate from policy blocks so that capacity events are not mistaken for safety decisions. Also confirm whether rejections appear in the queue metrics you alert on, because that determines what your dashboards show during an overload.
Which overload settings to review and when each fits
This table compares the overload controls available at each layer, from the engine's request handling to the gateway in front of the guardrails server. Read each row as a question: which layer should absorb a burst, and which setting you can confirm for your installed version. Start with the engine's queue and concurrency settings, then size replicas, client timeouts and retries around them.
| Setting or control | What it governs | When it fits | What to confirm |
|---|---|---|---|
| Engine concurrency and queue settings | How many non-streaming requests run at once and how many wait before the server rejects new ones. | Fits when one instance has spare capacity but short bursts overflow. Review these first on the engine you run. | Exact setting names for your engine in the configuration reference for your installed version. |
| Server replica count behind a load balancer | Total concurrent capacity, since each replica runs its own queue and makes its own admission decisions. | Fits when sustained load exceeds one instance or when you need rolling upgrades without a full outage. | Per-replica capacity from load tests, and whether the load balancer spreads requests evenly across replicas. |
| Client timeouts | How long a caller waits on a request that is queued or still being checked before giving up. | Fits every integration. Set it above typical guarded response time so healthy requests are not abandoned early. | Caller timeouts against measured latency under load, tested separately for streaming and non-streaming calls. |
| Client retry policy | Whether and when rejected requests are sent again, which can add load to a server that is already saturated. | Fits clients that handle 503 responses. Use exponential backoff, a retry cap and jitter. | That your HTTP client or SDK treats 503 as retryable and whether the server sends a retry hint. |
| Gateway rate limits | Request rate per API key, tenant or route, applied before traffic reaches the guardrails server. | Fits shared services where one caller could starve others. Place limits in the API gateway in front of the server. | Which gateway you use, its limit granularity, and how it returns rejections to clients. |
| Single instance or horizontal scaling | Whether requests run in one process or across several, which affects queue placement and in-memory caches. | Fits one instance for small loads. Scale out when load tests show queueing, and plan cache hit rates per replica. | Whether guardrail model caches are held per process and how hit rates change as replicas are added. |
What client applications must do when a 503 comes back
A 503 from an overloaded guardrails layer is a signal to the client, not a final answer. The cards below set out what the calling application owns when IORails sheds load, and each one should be confirmed against the status code and response body of the version you deploy.
Retry with backoff and jitter
Do not retry a 503 immediately, because every client doing so at once recreates the queue that caused the rejection. Use exponential backoff with random jitter so retries spread out over time. Confirm in testing whether the response includes a Retry-After header, and use it as the floor for the wait when it does. Record the retry count per request so overload is visible in your own metrics.
Cap total retry time
Set a ceiling on the total time a request may spend retrying, measured from the first attempt, not per attempt. Once the ceiling is reached, the request fails and the application takes its defined fallback path. Without this cap, a user waiting on a chat response can sit through several backoff cycles while the queue stays full. Choose the ceiling against your own latency budget for the end-to-end response.
Honest user-facing messages
When a request is rejected, the message shown to the user must not say or imply that the content was checked and found acceptable. A rejected guardrail check means the check did not complete. Use wording such as a temporary service delay that invites a retry later, and keep the message consistent across channels. Review these strings with your compliance team, since a misleading message can be read as a control claim.
Correlation IDs on rejected requests
Log every rejected request with a correlation ID that follows it through your gateway, application and any retry. Store the status code, retry count, time of rejection and the rail configuration in use, but avoid storing raw prompt content unless your data handling policy allows it. These records let you match client-side rejections to the queue metrics on the server and show auditors how overload was handled.
Circuit breaking against retry storms
Add a circuit breaker that opens after a run of consecutive 503 responses and stops sending new guardrail calls for a cooldown period. This protects the guardrails service from a fleet of clients all retrying in step. Define when the breaker closes again, usually by letting a small number of probe requests through, and alert on every open state so the team sees sustained overload.
Fail-closed or fail-open per application
Decide in advance, for each application, whether a request that cannot be checked is blocked or allowed. A customer-facing assistant handling regulated data will usually fail closed, while a low-risk internal summarization tool may choose otherwise. Write the decision into the application design and test both paths, because the default behavior of a client library on timeout is often not the choice your risk owner made.
How to configure and test overload behavior before launch
This sequence confirms the engine and version, records admission settings, and shows under load which requests are accepted, queued or rejected and how clients respond. Each step ends with an artifact you can inspect before production traffic arrives.
Confirm the NeMo Guardrails version and engine
Record the exact nemoguardrails version in the test environment, for example with
pip show nemoguardrails, and confirm it matches the release you plan to run in production. Check that the Python interpreter is 3.11, 3.12 or 3.13, which the 0.25.0 release requires. Then record which engine the configuration selects, IORails or LLMRails, using the settings documented for that version, since the queueing and 503 behavior tested here is described for IORails. The step is done when the version, Python version and engine appear together in your test record.Record admission settings in the configuration
Write every admission-related setting into the configuration folder the server loads, and keep that folder under version control. The key names and default values are not listed here, so take them from the documentation for your version and list each one with its value in the test record. Ask the vendor or the project's issue tracker about any setting you cannot find. Check: start the server with the folder and confirm the startup output or configuration dump shows the values you wrote. If your version does not print effective values, add a small test that reads them back through the API you use.
Deploy the server behind the load balancer
Build the server image from the Dockerfile in the NVIDIA-NeMo/Guardrails repository, mount your configuration folder, and start it behind the same load balancer, timeouts and connection limits you plan to use in production. Load balancer request and idle timeouts matter because time spent waiting in a queue counts against them. Check: send one non-streaming request directly to the server and one through the load balancer, and confirm both return the same successful status and response body. Record the load balancer timeout values alongside the test results.
Run a load test past capacity
Using a load tool of your choice, send non-streaming requests through the load balancer and raise concurrency in steps until the server is clearly past what it can process. Keep the prompts, rail configuration and model backends fixed so that load is the only variable. Record each step's request rate and concurrency, and the step where rejections first appear. Check: the tool's report shows the step where error responses begin, and the same load profile can be replayed later for comparison. Treat the result as a finding only after the run has been repeated.
Record accepted, queued and rejected requests
Tag every request with an identifier from your load tool, then match those identifiers against the server's access logs and any queue metrics your deployment exposes. Each request should be accepted immediately, accepted after waiting in the queue, or rejected. Confirm metric names and alert thresholds in the documentation for your version before relying on them. Check: accepted plus rejected equals requests sent, with no unexplained timeouts or connection errors, and you can state the peak queue depth observed during the run.
Confirm the rejection response clients receive
Capture several rejected responses from the load test and inspect them directly. Confirm they carry HTTP status 503, then check the body and any Retry-After header added by the server or load balancer. If the status differs or the header is missing, record that finding and decide how the client will handle it before launch. Also confirm the load balancer passes the server's status through unchanged and does not swap in its own error page. Check: saved captures show status and headers for at least one rejection from each load step where rejections appear.
Verify client retries follow the backoff policy
Run the client application or its test harness against the overloaded server with the retry policy enabled. The client should wait longer between attempts, add jitter, stop after a fixed number of attempts, and honor any Retry-After value it receives. Check: the client log records a timestamp for each attempt, the intervals between attempts increase, and they stay within the configured cap. Also confirm that no request is retried in a tight loop, because that adds load to a server that is already rejecting traffic.
Rerun the test after each change
After every change to admission settings, server resources or load balancer configuration, repeat the same load profile with the same prompts and rail configuration. Keep results from every run in one table so each run can be compared with the previous one. Check: the comparison shows whether accepted, queued and rejected counts moved in the expected direction, and the change record names the setting that changed. Promote a configuration only after the latest run shows the behavior your clients were built to handle.
Which queue metrics to alert on and why
What does a rising queue depth mean in NeMo Guardrails?
A steadily rising queue depth means requests are arriving faster than the engine can start them, so waiting time grows before any guardrail runs. A short spike that clears is normal under bursty traffic. A climb that holds across traffic peaks is the signal to act. When it trends up, check whether it tracks request volume, recent configuration changes or a newly added rail on the request path. Then reduce per-request work, add serving capacity or limit load upstream. Confirm the exact queue metric name, its labels and whether it is exposed through a Prometheus endpoint or only in logs by checking the NeMo Guardrails documentation for your version. Set the alert level from your own load test baseline.
Why alert on guardrail request rejection count and rate?
Rejections are requests the server turns away when its admission limits are reached, and each one reaches the client as a 503 that the application must handle. A rising rejection rate means users are failing even when the model itself is healthy. Alert on a rate sustained over a time window so single events do not page anyone, and split the signal by endpoint or caller if your metrics allow it. When the rate climbs, check whether it lines up with a traffic peak, a deployment or a slowdown in a model backend. Then decide between adding capacity, adjusting admission settings you have tested, or limiting specific callers. Confirm whether rejections appear as a metric, a log line or both in your version, and which labels they carry.
Which request latency percentiles should I track, including queue wait?
Track p50, p95 and p99 of end-to-end request latency, and confirm the measurement includes the time a request spent waiting in the queue. Averages hide the slow tail that users notice first. A rising p95 or p99 while p50 holds steady usually means some requests are waiting or passing through slow rail paths. A rise across all percentiles points to a broader capacity or backend problem. If the server does not separate queue wait from processing time, compare end-to-end latency against the time spent in the model calls it makes, measured in your own environment. Confirm which latency histograms exist for your version and how their buckets are defined before you build dashboards and alerts on them.
How do I know if guardrail model backends are saturated?
Saturation means the self-hosted safety or classifier endpoints that the guardrails server calls are close to their limit. Each rail call then waits longer, and the server holds its own requests open. Watch in-flight requests and queue time at each backend, utilization on the serving hosts, and the latency of each model call separately from the total. A backend that slows while the guardrails server looks idle is a typical sign that the bottleneck sits downstream. Responses include adding backend replicas, reducing how many model-backed rails run on each request, or enabling caching and KV cache reuse where they fit your setup. Backend metrics come from the model serving stack, so confirm which ones your stack exposes and how they are labeled.
Which client-facing error rates should trigger an alert?
Alert on the share of 503 responses and on overall 5xx responses, and keep them separate from policy outcomes. A guardrail that blocks content is working as configured, so it should not count as a failure. Your alerting must distinguish a block response from an overload response. Also track client-side timeouts and retries, because a server can look healthy while callers give up. When 503 rates rise, compare them with queue depth and rejection counts to confirm the cause is overload. Then check that clients back off and retry within set limits. Confirm the status codes and response bodies your version returns for each case, since client code depends on telling them apart.
How should I set alert thresholds for NeMo Guardrails overload?
Set thresholds from a load test against your own configuration, hardware and rails, because queue behavior depends on all of them. Step traffic up in stages and record queue depth, rejection rate, latency percentiles and backend saturation at each stage. Note the level where latency starts to climb faster than load. Use that point to define a warning level that leaves time to act and a critical level that means users are already affected. Repeat the test after changing rails, models, replica counts or the guardrails version, because each change moves the baseline. Keep alert rules in version control next to the configuration they describe, and review them after every upgrade.
Capacity planning around admission limits
Capacity planning for a NeMo Guardrails deployment starts from the admission limits, because the queue depth and rejection point only mean something once you know how much work each request generates. Six drivers set that load: the request rate, the number of rails called per request, whether input and output rails run in sequence or in parallel, the latency of each safety model call, the share of requests blocked early, and the number of replicas. Product owners or the team running the assistant should supply the expected request rate, including the peak hour and any batch or scheduled traffic. Platform engineering owns the replica count and the admission settings, and it should confirm them against the configuration in use rather than assume defaults.
Measure per-request time with each rail enabled, one rail at a time, before you combine them. Run the same representative prompts through the configuration with input rails only, then with output rails added, then with the parallel rails setting changed, and record the time each step adds. Security or AI engineering owns this measurement, because the rails and the safety models they call are their responsibility. Include the blocked-request path in the test set. A request that a rail stops early consumes far less capacity than one that reaches the model, so a sample of only allowed traffic will overstate the load. Keep the blocked share as a separate input that the business can confirm from past logs.
Model peak concurrency from those measurements. Multiply the request rate at peak by the time each request holds a slot, using the figures your own tests produced, and add the share of calls that go to each safety model backend. Compare the result with the queue and rejection settings described above, and decide with the owners of the platform and the safety model hosting how much headroom to keep for spikes. Size replicas and the backends that serve the safety models together, because a single replica with ample backend capacity can still queue requests. Then validate the plan with a load test that drives the expected peak, a higher spike, and a sustained run, and confirm that clients receive the documented 503 response and retry behavior instead of timeouts. Repeat the test after every change to rails, models or replica count.
Security and operational risks of overload handling
Overload handling protects availability, but the way a system sheds load can create its own security exposure. The cards below cover the failure modes that matter most when IORails queues and rejects requests, and the controls that keep an overloaded guardrail layer from becoming a gap in your safety posture.
Fail-open behavior under load
If a guardrail layer times out or rejects work and the application forwards the request anyway, unchecked prompts and model outputs reach users during exactly the periods when traffic is highest. Set an explicit fail-closed policy in the application that calls NeMo Guardrails, so a 503 or timeout blocks the response instead of passing it through. Verify in your deployed version that the calling code treats every non-success status from the guardrails server as a block, and test that path with a deliberately saturated queue.
Error bodies that leak internals
Rejection and error responses can reveal queue sizes, internal hostnames, stack traces, or the names of the models and safety classifiers behind a rail. That detail helps an attacker map your guardrail stack and tune payloads against it. Return a generic error body to end users, keep the detailed reason in server-side logs, and confirm in your version what the 503 response includes before it reaches a browser or third-party client.
Retry storms amplifying an outage
When clients retry a 503 immediately and in parallel, the rejected load returns as a larger burst and keeps the queue full long after the original spike. Use bounded retries with exponential backoff and jitter in every client and gateway, and cap retries per request. Check whether your gateway or proxy adds its own automatic retries on top of the application's, since stacked retries multiply the traffic that reaches the guardrails server.
Unfair sharing of capacity
A single noisy application or tenant can fill the shared queue and cause rejections for every other team using the same guardrails deployment. Decide whether capacity is shared or split by application, and enforce that split at the gateway or with separate deployments where isolation matters. Ask your team to confirm how IORails orders and admits requests from different callers in the version you run, and test with two callers at different rates before go-live.
Rejected prompts retained in logs
Logs of rejected requests often hold the full prompt, which can contain personal data, credentials or confidential business content that the guardrail was meant to stop. Store rejection records with redaction of payload fields, restrict who can read them, and set a retention period that your privacy and records policies approve. Verify which fields the deployed server writes on a rejection and whether you can disable prompt capture without losing the metadata you need for alerting.
Limit changes without review
Queue depths, concurrency limits and timeout values can be changed in a configuration file or deployment manifest with no record of who changed them or why. A quiet change to a limit can silently move the system into fail-open territory or starve other callers. Keep limit settings in version control, require review for changes, and record the approver. Confirm in your deployment tooling that the limits you rely on are the ones actually running in production.
Limits to confirm in your environment before you rely on admission control
Confirm that the queue behavior applies to the engine you chose before you size anything. The queueing and rejection described on this page belong to the IORails path for non-streaming requests. Check the NeMo Guardrails documentation and the release notes for your exact version (the current release is 0.25.0) to see whether the same admission behavior applies under LLMRails and under the Guardrails facade, and whether any settings differ by engine. If the public docs are silent, run a load test on each engine you plan to use and record which requests queue, which are rejected and which status codes come back.
Next, test how the admission path interacts with caching and streaming. A request answered from the in-memory cache for a NemoGuard model may never reach the same point in the path as a cache miss, so its effect on queue depth is not the same. Streamed responses are outside the admission behavior described here, so a streaming client will not see the same 503 handling. Ask the maintainers through the NeMo Guardrails GitHub repository or your NVIDIA account team how cache hits and streamed requests are counted, and confirm the result with a mixed-traffic test in your environment.
Then verify three operational points that affect the alerts you will write. Confirm whether the guardrails server exposes queue metrics at all, and under which names, before you build dashboards on them. If you run NeMo Helix as an inference gateway middleware plugin, confirm how it handles overload at its own layer, including whether it retries, queues or fails fast, since that layer may reject traffic before NeMo Guardrails sees it. Finally, confirm with NVIDIA whether the NeMo Microservices sunset affects your deployment path. NVIDIA has retired the NeMo Guardrails microservice, and NeMo Platform is the stated successor, so a capacity plan built on the container may need to change. Ask your account team for anything the public documentation does not state, and record the answers with the version you tested.
What buyers ask about admission control work
What drives the cost of tuning admission control?
The main cost drivers are how much of the guardrail pipeline is under test, the number of model endpoints the rails call, and whether those endpoints are shared with other workloads. Load testing usually takes the most effort because each run needs traffic shapes that match production, a mix of streaming and non-streaming requests, and enough repeated runs to find where queueing starts. Observability work adds cost if queue and latency metrics are not yet reaching your monitoring stack. Tuning is a one-time effort, but retesting recurs whenever rails, model placement or traffic patterns change. When you ask for a quote, request the number of environments in scope, who supplies test traffic, and whether retesting is included.
How long does admission control tuning take?
Duration depends on three things: how deep the load test goes, how many environments must be tested, and how many retesting cycles follow each change. A single staging environment with one configuration is the shortest path. Each additional environment repeats the test plan with its own endpoints, limits and traffic. Every change to rails, model placement or concurrency settings can trigger another round of tests. No general duration applies to every deployment, so ask for the expected duration in the written scope, with the test plan, the environments and the number of retest cycles listed alongside it.
What does our team need to provide for this work?
The work depends on four inputs from your side:
- Traffic data: request rates, peak periods, and the share of streaming and non-streaming requests.
- Model latency data: observed response times for each guardrail model endpoint and for the main application model.
- Access to the deployed environment: a staging copy that matches production configuration, plus read access to logs and metrics.
- An owner for client retry code: the team that controls how callers handle overload responses, retries and backoff.
Missing any of these usually slows the tests, because the results depend on realistic inputs and on how callers react to rejection.
Can an internal team tune admission control alone?
Yes, if the team has load testing skills, observability skills to read queue and latency metrics, and enough time to run repeated tests. It also needs a safe test environment and control over the calling application's retry behavior. Verify every setting against the version you deploy, because NeMo Guardrails releases change often and engine options can differ between versions. The NeMo Guardrails documentation is the place to confirm current engine settings and the overload response. Do not reuse limits from another deployment without measuring them in your own environment.
How does NeMo Guardrails respond when it is overloaded?
When the guardrail engine reaches its capacity for non-streaming requests, it queues work and rejects requests that cannot be served, returning an HTTP 503 status. Clients should treat this as a signal that the service is temporarily full. Callers should back off and retry with a delay, and they should cap the number of retries so that a traffic spike does not turn into a retry storm. Confirm the exact queue behavior, the queue limits and the response body in the version you run, because these details are configuration-dependent and can change between releases.
Which admission control metrics should trigger alerts?
Start with queue depth over time, the rate of rejected requests, time spent waiting in the queue, and end-to-end latency for non-streaming calls. Set alerts for queue growth that persists across several evaluation windows, since short bursts are normal under load. Alert on a rising rejection rate as well, because it shows that callers are already being turned away. Check the metric names and export path in your deployed version before you write alert rules, and test each alert with a controlled overload so that you know it fires and that the on-call team knows what to do.
What should a written quote for admission control include?
A written quote should name the engagement's scope: the NeMo Guardrails version, the engine, the rails and the model endpoints in use. It should list the environments covered and the test plan, including traffic profiles and pass criteria. Deliverables should be explicit, such as the tuned settings, the alert rules or dashboards, and a runbook for overload events. The quote should also state whether retesting is included, which client responsibilities apply, and what happens if the configuration changes after sign-off. DeployOpen agrees scope, deliverables and timelines in writing before work starts, so ask for those terms to be set out in the quote.
How DeployOpen scopes and delivers overload handling for NeMo Guardrails
DeployOpen treats admission control as part of the deployment, not an afterthought: we scope the queue limits, client retry behavior and alerts around your real traffic, then build and test them in infrastructure you control. Engagements are fixed-scope, with the scope, deliverables and timelines agreed in writing before work starts.
How we scope
- Map which guardrail requests are non-streaming and which callers would receive a 503 during peak load.
- Agree in writing which queue settings, client retry behavior and capacity tests are in the engagement.
- Confirm with your team the engine in use, deployment topology and which upstream applications must handle rejections.
How we build
- Configure IORails admission limits and the matching client handling for 503 responses in your application code.
- Wire queue metrics into your Prometheus and Grafana stack, with alert rules tied to sustained queue depth and rejections.
- Run load tests against your planned capacity to confirm behavior under overload before production traffic arrives.
How we hand over
- Deliver a runbook covering queue metrics, alert thresholds, the 503 handling pattern and the scaling steps to take.
- Document the capacity planning method, including the assumptions behind each limit, so your team can revisit them.
- Walk your platform and on-call engineers through the dashboards, alerts and test results before the handover is closed.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, including retesting after NeMo Guardrails version changes.
- Retainer scope, response expectations and review cadence are agreed in writing, so you know what is covered.
- Ask for a quote built from the written scope, since DeployOpen does not publish a price list.

