High availability for a self-managed NeMo Guardrails server

The open-source guardrails server gives you an HTTP API but not a high availability design. This page explains what you must build around it: replicas, load balancing, health endpoints, overload responses and redundant safety model endpoints.

On this page

Why high availability for NeMo Guardrails is your design job

If you have placed the NeMo Guardrails server in front of an LLM application, the open-source server runs as a single process that you must replicate and protect yourself. It does not ship with replica management, failover, health-driven routing or overload handling, so node loss, a rolling deploy or a traffic spike can take every guardrailed request down with it. The library is licensed under Apache 2.0, and the README describes the guardrails server as a process that loads configurations from a folder and exposes an HTTP API. That HTTP surface is what your load balancer, probes and clients will depend on.

High availability matters most in two cases. The first is when the rails run as blocking checks on every request, so a failed guardrail call means either a blocked user or an unguarded response, depending on how you fail. The second is when several applications share one server and one policy, so an outage stops every consumer at once. NVIDIA's NeMo microservice was sunset as of October 1, 2026, and its archived documentation points existing users to their NVIDIA account team. No vendor-operated high availability layer comes with the open-source server, so the design, operations and recovery plan sit with your team or with the partner you hire.

Before you commit to a design, confirm three things in writing. First, the fail-open or fail-closed behavior you want when a rail or safety model endpoint is unreachable, because that choice decides how much availability you trade for protection. Second, the request timeouts and retry limits your applications and load balancer will use, since a slow detector can stall replicas without ever failing outright. Third, which components are stateful in your deployment, such as configuration volumes and any caches, because stateless replicas are much simpler to scale and replace. The sections that follow turn these decisions into replicas, probes, overload responses and redundant safety endpoints.

What the server provides and what you build

The guardrails server is an HTTP process that loads a configuration folder and answers requests through its HTTP API. The open-source project provides the server and a Dockerfile for building a server image, so the process is something your team runs and operates. Replication, failover and restart policy are not part of the server's job and belong to your container platform.

  • Server and image: The project supplies the server and a Dockerfile, which gives you a starting artifact to build, pin and scan.
  • Replicas: Running several copies of the process is your decision. Each copy needs the same pinned version and the same configuration.
  • Restart and failover: Restart behavior after a crash comes from your container runtime or orchestrator.
  • Shutdown and concurrency: Confirm in your pinned version how in-flight requests are handled during shutdown and how many requests one process serves at once.
  • Python runtime: Version 0.25.0 requires Python 3.11, 3.12 or 3.13, so pin the runtime inside the image.

Before you set replica counts or rolling update settings, test how the pinned server behaves when it receives a termination signal under load.

How replicas, detectors and clients fit together

The diagram starts with client applications sending requests to a load balancer, which spreads them across several guardrails server replicas. Each replica reads its configuration from read-only mounts and calls a safety model endpoint, with a secondary endpoint held in reserve. The health check path runs from the load balancer to each replica, so unhealthy instances leave rotation. Check that the detector failover route is tested, because a silent detector outage changes what the guardrails actually block.

Client traffic, replicas, read-only configuration and detector failover inside one trust boundary.

Five components to design for availability

The open-source server gives you a process that serves HTTP requests, but availability is something you assemble around it. Each component below closes a specific failure mode, and they depend on each other: replicas only help if the load balancer and health checks route around a failed instance, and overload handling only matters if the safety model endpoints can keep up.

Stateless server replicas

Run more than one guardrails server process so a single crash or node loss does not stop every guarded request. Confirm that each replica loads the same configuration folder and that no conversation state is kept in process memory. If a replica holds session data locally, a failover mid-conversation can break dialog flows that depend on earlier turns. Check how your chosen configuration mode handles per-request selection before you scale out.

Guardrails repository

Load balancing and session affinity

A load balancer spreads requests across healthy replicas and removes failed ones from rotation. Decide whether you need session affinity: sticky routing keeps a multi-turn conversation on one replica, while round-robin balances load more evenly but requires conversation context to travel with each request. Without a deliberate choice, uneven routing can concentrate expensive rail chains on a few instances. Test the chosen behavior under load rather than assuming it.

Liveness and readiness health checks

Liveness tells the orchestrator whether a process should be restarted, and readiness tells the load balancer whether it should receive traffic. Keep them separate: a replica that is still loading models or cannot reach its safety endpoints should be marked not ready, not killed. Without a readiness check, traffic reaches replicas that return errors during startup or after a dependency fails. Confirm which endpoints the server version you deploy exposes before you write the probe configuration.

Overload responses and queueing

When request volume exceeds what the rails can process, the server must either queue work with a bounded wait or reject requests with a clear status code. An unbounded queue turns a traffic spike into timeouts that hold connections open and hide the failure. Define a maximum concurrency per replica, a queue limit and a timeout, and decide whether your calling applications fail open or fail closed when the guardrail is unavailable. That decision is a security decision, so document it with the owner of the application.

Redundant safety model endpoints

Rails that call a classifier, a judge model or a detector depend on that endpoint being reachable. If one self-hosted safety model endpoint fails, the guardrail either stops checking or stops responding, and the change in protection can go unnoticed. Plan at least two endpoints for each model that a blocking rail requires, with health monitoring on each. Confirm the configuration keys that accept multiple endpoints or failover in your NeMo Guardrails version, and test what happens when one endpoint is removed.

How to run multiple replicas behind a load balancer

Treat each guardrails server replica as interchangeable only when every replica mounts the same configuration folder and runs the same image version. The server loads its configurations from a folder and answers each HTTP request using the configuration that request selects, so any replica should return the same decision for the same input. Confirm this in your own environment before relying on it: send identical requests to two replicas and compare the allow and block outcomes, the rail responses and the logs. Keep any conversation state that a rail depends on in a store shared by all replicas, because a load balancer can route the next turn of a session to a different pod.

Configuration drift is the main rollout risk. Mount configurations from one versioned source, such as a single ConfigMap or an image built from a tagged configuration set, and move all replicas to the same version before the load balancer sends traffic to the new set. If replicas briefly run different config.yml or Colang content, the same user input can be blocked on one pod and allowed on another. In multi-config mode, every replica must hold the same configuration folders under the same identifiers, or requests that select a configuration by name will fail on some replicas only. Add that check to the readiness gate for each rollout.

Set load balancer timeouts for the slowest path, not the average request. Rails that call a safety model or an external moderation service can take longer than a plain model response, and a timeout shorter than that path returns errors that look like outages. Agree the idle and response timeouts with the team that owns the safety model endpoints, and test streaming responses separately because they hold connections open differently. Limit retries to connection failures that occur before a request reaches a replica. A retried request can trigger a second model call, duplicate audit log entries and add cost, so confirm the retry behavior in a load test before production traffic arrives.

Setup sequence for a highly available deployment

This sequence takes one guardrails server to a set of replicas that keep serving traffic through load, a failed node and a version upgrade. Each step closes with a check you can run before moving on to the next one.

  1. Pin the NeMo Guardrails and Python versions

    The platform team pins NeMo Guardrails to 0.25.0 and runs it on Python 3.11, 3.12 or 3.13, the versions that release supports. Use the open-source library from the NVIDIA-NeMo/Guardrails repository and PyPI. NVIDIA has sunset the NeMo Guardrails microservice container, so do not base the stack on it. Record the pinned versions in your build files and image tags. Note that 0.25.0 deprecates the LLMRails class in favor of Guardrails, so update calling code now. Done when every build reports the same pinned versions.

  2. Build the server image from the Dockerfile

    The platform team builds the guardrails server image from the Dockerfile in the repository, tags it with the pinned version and pushes it to a registry that every cluster can reach. Build once, then promote the same image digest through each environment so replicas cannot drift apart. Add only the packages your configurations need. Done when the image starts locally, answers requests on its HTTP API and reports the expected version.

  3. Mount identical configurations on every replica

    Store config.yml, Colang files and Python actions in one versioned repository, then mount the same folder into each replica, usually as a read-only volume. Keep secrets out of the configuration folder and load them from environment variables or your secret store. Confirm which configuration mode your server version uses before adding replicas, because it determines how requests select a configuration. Done when a checksum of the mounted folder matches across all replicas.

  4. Define liveness and readiness checks

    The operations team defines a liveness check that confirms the process is running and a readiness check that passes only after the server has loaded its configurations and can reach its safety model endpoints. Confirm which health routes your server version exposes. If it has no dedicated route, use a lightweight request that exercises the HTTP API and the configured rails. Done when a replica that is killed or misconfigured leaves rotation while the other replicas keep serving.

  5. Place replicas behind a load balancer

    Run more than one replica, scheduled across separate nodes, behind a load balancer that routes only to ready endpoints. Set request timeouts that account for guardrail latency, since every rail that calls a model adds time to the request. Allow retries only for requests that are safe to repeat. Done when stopping one replica during a short test produces no client-visible errors.

  6. Add redundant safety model endpoints with failover

    Point each rail that calls a safety model at a primary endpoint and at a second endpoint serving the same model. Then confirm how your NeMo Guardrails version handles an unreachable endpoint. If it does not fail over on its own, the platform team must add that logic in the deployment layer. Decide in advance whether a detector outage should block requests or let them through with an alert, since that choice changes protection. Done when a test with the primary endpoint stopped shows the behavior your policy requires.

  7. Load test the full request path

    The performance team runs a load test against the full path: load balancer, replicas and safety model endpoints. Use traffic shaped like production, with the rails you actually enable. Measure latency percentiles, error rates and resource saturation on each replica and each model endpoint to find the component that reaches its limit first. Use the results to set replica counts and autoscaling thresholds. Done when the test holds your target latency and error rate at expected peak load and the limiting component is identified.

  8. Rehearse node loss and a rolling upgrade

    The platform team drains a node that hosts a replica during test traffic, then performs a rolling upgrade to a new pinned image. Before the upgrade, read the release notes for breaking changes to configuration, Python APIs and actions. If your rails use Colang 1.0, run the nemoguardrails convert tool on a copy of your configurations and review every converted file by hand. Also rehearse a rollback. Done when both rehearsals finish with no failed requests beyond the tolerance agreed with the business owners.

Options for each availability decision and when each fits

This table compares the main choices for each availability decision in a self-managed NeMo Guardrails server, with the trade-off each one carries. Read each row against your own traffic pattern, the rails you run per request, and how much degraded protection your risk owners will accept. The main takeaway is that overload and safety model failure policies matter as much as replica count, because they decide what users see when something breaks.

DecisionOptionTrade-offWhen it fits
Replica count and placementTwo or more stateless server replicas spread across failure domainsEach replica needs identical configuration and actions code, and more replicas add cost and rollout coordinationRequests must keep flowing through a single node or zone failure
Replica count and placementOne replica with fast restartSimpler to run, but a crash or node loss stops all guardrailed trafficInternal tools or non-critical assistants where a short outage is acceptable
Load balancer typeKubernetes Service with an HTTP-aware ingress or gatewayHealth-based routing and TLS are handled by existing tooling, but timeouts for long model calls must be tunedClusters that already run an ingress controller or API gateway
Load balancer typeExternal L4 load balancer in front of replicasSimple and fast, but it cannot route on HTTP status or inspect request pathsEnvironments with a standard network load balancer and a separate health check
Health probe designLiveness probe that checks only the processRestarts hung processes, but does not show whether safety model endpoints are reachableEarly rollouts where the main risk is a stuck server process
Health probe designReadiness probe that also checks configuration load and critical detector endpointsRemoves replicas that cannot guardrail requests, but a flaky detector can drain the whole pool if thresholds are strictProduction traffic where a replica must not serve unguarded requests
Overload handlingQueue requests with a bounded backlog and timeoutsSmooths short spikes, but adds latency and can hold memory during long model callsBursts that are short and predictable
Overload handlingShed excess requests with a fast error responseProtects latency for admitted traffic, but callers must handle retries and users see errorsPeak load that exceeds capacity for sustained periods
Overload handlingFail open (pass requests without the rail)Keeps the service available, but unscreened content reaches the model or userLow-risk assistants where availability outweighs a missed check, approved in writing by risk owners
Overload handlingFail closed (block requests when rails cannot run)Keeps protection intact, but availability drops during incidentsRegulated or customer-facing assistants where unscreened output is unacceptable
Safety model redundancySecond endpoint for each safety model in another zoneCovers instance loss, but both endpoints must be sized for failover load and kept on the same model versionRails that run on every request and cannot be skipped
Safety model redundancySeparate cluster or region for detectorsLimits correlated failure, but adds network latency, data residency review and a second operations pathOrganizations with strict zone isolation or multiple sites
Safety model redundancyDegraded mode that disables a non-critical railKeeps traffic flowing, but protection changes silently unless alerting is in placeOptional rails such as a secondary topic check, with documented risk acceptance

Security and operational risks of a fail-open guardrail

A guardrail that fails open leaves the assistant running without its checks, and nobody sees it happen unless someone built the signal. The cards below cover the risks that appear once the guardrails server has several replicas and depends on separate safety model endpoints.

Silent loss of protection

When a detector or safety model endpoint becomes unreachable, a rail can return a pass or an error that the application treats as allowed. Users then get responses with no moderation, and the application may look healthy from the outside. Before go-live, test each rail with its dependency stopped and confirm what the application returns to the user in that case. Make fail-closed or fail-open a deliberate per-rail decision, documented for each use case.

Alerting on detector outages

Replica health checks confirm that the server process is running, not that its safety models are reachable and answering. Add metrics for detector call failures, timeouts and fallback counts, and alert on them separately from HTTP error rates. Ask whether your monitoring team already has a rule for each safety endpoint. The monitoring and observability topic covers the metrics to export.

Model endpoint secrets outside images

Safety model and LLM provider credentials should reach the guardrails container at runtime through your secrets manager or orchestrator secrets, not through a Dockerfile, a baked configuration file or a shared image tag. Check that the container logs do not print the configuration with keys in it, and that rotation does not require a rebuild. Keep the list of secret names in the runbook so a failover replica receives the same values.

Authenticating calls to the guardrails API

The guardrails HTTP API has to be protected by network policy and by a credential that each calling service presents, so an unauthorized caller cannot skip checks or send traffic that bypasses the load balancer. Decide whether the gateway or a sidecar performs authentication, and confirm how the server itself handles requests that arrive without credentials. Test that a direct call to a replica address from outside the mesh fails.

Logging fallback decisions

When a rail is skipped, bypassed or answered from a fallback path, record the request identifier, rail name, configuration version, the reason and the decision taken. These records are the evidence that auditors and incident reviewers ask for when a blocked or allowed response is questioned. Confirm where the logs are stored, how long they are kept under your retention policy, and whether prompt content is masked in them.

Testing the failure paths

Failover behavior is only known after a test that stops a replica and each safety endpoint during realistic load. Include a test that confirms the alert fires and that the fallback log entry is written. Repeat these tests after every configuration or version change. The testing and evaluation topic describes how to build these checks into a release process.

Questions teams ask before building high availability

How much effort does a high availability design for NeMo Guardrails take?

The effort depends on how many replicas you run, how many safety model endpoints sit behind the rails, and how much testing you need before launch. A single load balancer in front of two identical stateless guardrails servers is a small change. Each added detector endpoint, each fallback path and each overload rule adds design, configuration and test cases, because every failure mode has to be exercised. Ask any partner to break the work into those components so you can see which ones your team already covers.

What drives the cost of an HA build up or down?

Four factors matter most:

  • Replica count and how configuration reaches each replica
  • Number of safety model and detector endpoints that need redundancy
  • Depth of load testing and failover testing before go-live
  • Whether the environment is cloud, data center or air-gapped, which changes how health checks, storage and images are delivered

One-time costs cover design, build and testing. Recurring costs cover monitoring, upgrades to the library and its dependencies, and retesting after configuration changes. Ask any quote to show these separately.

Can our own platform team build NeMo Guardrails high availability without a partner?

Often yes, if the team already runs stateless HTTP services on Kubernetes or a similar platform. The skills needed are load balancer configuration, container health probes, Python packaging for the guardrails server, GPU scheduling for safety models, and load testing. The harder gap is usually validation: proving that a detector outage fails in the way your policy requires. Assess those skills honestly before deciding, and treat the failover test plan as a required deliverable either way.

What does the engagement need from our team?

Plan for access to a non-production environment that mirrors production topology, including the same load balancer type and the same safety model endpoints. You will also need GPU capacity for the safety models under test, a named owner for the guardrail policy so test cases can be judged, and a source of realistic load test traffic that your team approves. Confirm with any provider exactly which environments, accounts and approvals are needed before work starts, because late access requests are a common source of delay.

How long does an HA project take for a given scope?

Duration follows scope. A design covering replicas, health endpoints and one load balancer takes less time than a design that also covers redundant safety model endpoints, overload responses for several detectors and a full failover test cycle. Timing also depends on how fast your organization approves environments and change windows. Ask for a timeline that lists each scope item and its dependencies, and check it against your release calendar rather than accepting a single figure.

Does DeployOpen work on a fixed-scope basis for HA work?

Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. For an HA project, that agreement should name the replica topology, the endpoints covered, the overload and health behavior to be built, and the failover tests that count as acceptance. Ongoing support, upgrades and continuous testing are available as retainers. DeployOpen does not publish a price list, so a quote follows from the written scope.

What happens to our HA design after the NeMo microservice sunset?

NVIDIA has retired the NeMo Guardrails microservice, and its NGC catalog page says NeMo microservices has been sunset as of October 1, 2026, with no new releases or support. If your design depends on that container, plan a migration to a self-managed server built from the open-source library, which is licensed under Apache 2.0 and currently at release 0.25.0. NVIDIA directs existing microservice users to contact their account team for next steps. Confirm which path your organization is taking before you commit to an HA topology.

How DeployOpen scopes and delivers this work

DeployOpen plans, implements and tests self-hosted NeMo Guardrails inside your own infrastructure, including the load balancer, replica pool, health endpoints, overload handling and redundant safety model endpoints described on this page. The work runs in your cloud accounts, data centers or air-gapped network, so the servers, configurations and logs stay under your control. Before any build starts, the first step is to confirm the exact components in scope, such as whether the guardrails server is the open-source package or a container you build, and which safety model endpoints need a standby.

Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. For this topic, a written scope should name the replica count and failure modes to be tested, the health and readiness checks, the overload and timeout behavior each client must receive, the fallback policy when a detector or safety model endpoint is down, and the evidence you will receive at handover. A quote follows from that written scope, so the more precisely your team states availability targets and environments up front, the more reliably the quote reflects the work. Ask for the quote to separate one-time build effort from any recurring operation effort.

Ongoing support, upgrades and continuous testing are available as retainers. This matters for NeMo Guardrails because the library and its configuration change over time: the current release, 0.25.0, was published on 19 November 2026, and the previous release was 0.24.1 on 16 September 2026, so availability tests written today will need re-running after upgrades. Confirm with your team whether you want the failover and load tests repeated on each upgrade, after each safety model change, or on a fixed schedule, and whether the retainer should also cover the NVIDIA NeMo Platform path if your deployment depends on it.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.