Multi-node LLM inference with LeaderWorkerSet

LeaderWorkerSet lets a Kubernetes cluster you control serve models too large for one node by treating each leader and worker group as one replicated unit. This page covers how it works, when to use it, and what to plan.

On this page

When one model no longer fits on one node with LeaderWorkerSet

When a model's weights and key-value cache need more GPU memory than one node provides, the model has to be sharded across several nodes, and LeaderWorkerSet is the Kubernetes API built to run that group as one unit. It creates a set of pods made of one leader pod and a number of worker pods that together serve a single model replica, and it treats that whole group, not an individual pod, as the unit of replication. If one replica needs four nodes, you scale by adding or removing four-node groups, never by scaling loose pods that cannot form a working tensor-parallel group on their own.

Choose this pattern over single-node serving when the model does not fit on the largest GPU configuration you can schedule on one host, or when the memory of several nodes is the only practical way to hold the weights and cache at the context lengths you need. Before you commit, confirm three things with your own hardware and model: the GPU count and memory per node, whether the nodes share a high-speed interconnect, and whether your inference engine supports the parallelism layout you plan to use. Most of the cost of this decision sits in the interconnect and the GPU hours, so the choice should follow a measured fit test, not an assumption about model size alone.

The trade-off is operational. A group that spans nodes fails as a whole: losing one worker can take the entire replica out of service, and each replica consumes more capacity than a single-node instance, so a small cluster may hold fewer total replicas than a single-node design. Plan for group-level health checks, for capacity that can place all members of a group at once, and for a rollout strategy that replaces groups rather than individual pods. The LeaderWorkerSet project documentation is the place to confirm the current API version and supported features before you write manifests.

How a LeaderWorkerSet group serves requests

A request enters through a Service or gateway and reaches the leader pod of one LeaderWorkerSet group, which coordinates the inference engine. Worker pods in the same group hold the other model shards and take part in each forward pass, so the group behaves as one serving unit. Separate groups sit side by side as replicas, and the whole path runs inside the cluster and GPU nodes you control. Check that group membership and readiness are handled as one unit, and that traffic only reaches leaders.

Illustrative layout: one request path through a leader and its workers, with two replica groups.

Which LeaderWorkerSet configuration fits which serving need

This table compares the main LeaderWorkerSet configuration choices for multi-node inference: group size, replica count, parallelism placement, serving engine and rollout strategy. Read each row as a question to answer for your model and hardware, then confirm the details against the vLLM and llm-d documentation before committing to a design.

Configuration choiceWhen it fitsTrade-off to weigh
Group size (nodes per group)Model weights and KV cache do not fit on one node's accelerators, so one replica must span several nodesEach added node raises the chance that one failure stalls the whole group and adds cross-node traffic to every token step
Number of replicasTraffic needs more than one serving group, or you want spare capacity during rolling updatesEach replica occupies a full group of accelerators, so idle replicas cost as much as busy ones
Tensor parallelism inside the groupNodes are connected by fast, low-latency networking and the model is split across accelerators within each layerHeavy all-reduce traffic between nodes can limit throughput if the network is slower than intra-node links
Pipeline parallelism across nodesInterconnect between nodes is slower and the model is split by layer groups so less traffic crosses the networkPipeline stages add latency and bubbles, so single-request response times can be worse than tensor parallel layouts
vLLM as the serving engineYou want a direct, widely used engine with the parallelism options your team already validatesYou manage multi-node coordination patterns that the leader and worker pods must match, so the wiring is your responsibility to test
llm-d as the serving engineYou need disaggregated or cache-aware serving, or routing across multiple engine instances in addition to multi-node groupsMore moving parts to operate, and the supported topologies and versions must be confirmed with the llm-d documentation
Rolling update with conservative surgeAvailability matters more than speed, and spare group capacity exists during an updateNeeds extra accelerators during the rollout, which can be scarce or expensive
Rolling update with minimal surgeAccelerator capacity is fixed and short interruptions to a replica are acceptableFewer healthy groups serve traffic during updates, so capacity drops and cold model loads take longer

How rolling updates and failed workers affect serving

A LeaderWorkerSet treats each leader and its workers as one replica, so updates and failures move at group granularity rather than pod by pod. The cards below cover the decisions that follow from that, and each one is something to reproduce in your own cluster before production traffic depends on it.

Rolling updates replace whole groups

A rolling update in LeaderWorkerSet replaces replicas as complete groups, so a model that spans several nodes is never left half-upgraded inside one serving unit. Check how many groups the rollout may take down at once, because each group holds a full copy of the model across its nodes. Confirm that the surge and unavailable settings you choose leave enough groups serving to carry peak load during the rollout.

One lost worker stops the group

Tensor-parallel inference expects every worker in a group to participate in each forward pass, so a single failed worker usually leaves the whole group unable to serve. Expect the group to be restarted or recreated as a unit, which means reloading weights and warming caches for every node in it. Measure how long a group takes to return to ready from cold, since that window sets your real capacity during failures.

Leader readiness decides traffic

Clients usually reach the group through its leader, so the leader's readiness probe determines whether the group receives requests. A leader that reports ready while its workers are still loading or have lost peers will accept traffic it cannot answer. Make the readiness check reflect the health of the whole group, and test it by stopping one worker and watching whether the Service drops the group.

Liveness probes can cause restart loops

A liveness probe that fails while a large model is still loading will restart the pod, and the group may never finish starting. Set startup probes with enough time for weight loading, and keep liveness checks focused on whether the engine is stuck rather than slow. Test a cold start on your storage and confirm that a restart during loading does not put the group into a cycle.

Model storage slows replacement

Replacing a failed group means every node pulls model weights again unless they are cached nearby. The time to fetch weights from shared storage or a local cache often dominates recovery, more than scheduling does. Ask where weights come from during a restart, how many groups can read them concurrently, and whether the storage path has enough bandwidth for a rolling update that restarts several groups.

Gang scheduling during recovery

A replacement group needs all of its pods placed before it can start, so a partly available GPU pool can leave a group pending while its siblings wait. Plan spare GPU capacity or priority settings that let replacements land, and confirm how the scheduler behaves when only some nodes are free. Rehearse a node drain on a test cluster to see whether a group stays pending long enough to affect your service targets.

Setting up a LeaderWorkerSet inference deployment

This sequence takes a self-managed Kubernetes cluster from GPU and network readiness to a tested multi-node model deployment that can be scaled, updated and recovered. Each step closes with a check, so the team knows whether to move on.

  1. Confirm GPU and network prerequisites

    The platform team checks that the cluster's GPU nodes are schedulable, that the NVIDIA device plugin or GPU Operator reports allocatable GPUs on each node, and that nodes sharing one model replica sit on a network with the bandwidth and low latency the inference engine needs. Confirm the exact interconnect requirements with your inference engine and hardware vendor, since these depend on the model and parallelism settings. Done when a test pod requesting GPUs on each node runs and the nodes can reach each other on the pod network and on any high-speed fabric you plan to use.

  2. Install the LeaderWorkerSet controller

    The platform team installs the LeaderWorkerSet controller into the cluster using the release manifest or Helm chart published by the project, pinned to a version that your cluster's Kubernetes version supports. Confirm compatibility in the project's release notes before installing. Done when the controller pod is running in its namespace, its logs show no reconcile errors, and the LeaderWorkerSet custom resource is registered and listed by kubectl api-resources.

  3. Stage model weights and images privately

    The team copies the inference engine image and the model weights into storage the cluster can reach without public internet access, such as an internal container registry and an object store or a shared volume with a defined access policy. Record the image digests and model checksums so every replica loads identical artifacts. Done when a node with no outbound internet access can pull the image and read the weights from the staged location.

  4. Deploy one leader worker group

    The team writes a LeaderWorkerSet manifest that sets the group size, one leader pod and the worker pods, GPU requests and limits per pod, the model path, shared memory for the engine, and readiness probes that reflect whether the model is loaded. Apply it to a non-production namespace with replicas set to one. Done when kubectl shows one leader and the expected number of workers in Running and Ready state, each worker bound to a distinct GPU node as your placement rules require.

  5. Verify inter-node communication and readiness

    The team confirms that the leader can reach each worker by its pod address and that the distributed backend initializes across the group. Check the leader and worker logs for successful rank or process group startup, and send a test completion request to the leader's endpoint. Done when the test request returns a valid response generated with all the model shards, and a failed worker, tested in a controlled way, causes the group to be marked not ready instead of serving partial output.

  6. Scale replicas and place groups

    The team increases the replica count of the LeaderWorkerSet so that several complete groups run side by side, and checks that the scheduler places each group's pods on the intended nodes. Confirm the scaling unit with your team: each replica is a full group, so capacity grows in group-sized steps. Done when all groups are Ready, GPU usage per node matches the plan, and the service in front of the leaders routes requests only to ready groups.

  7. Test rolling updates and failure recovery

    The team changes a non-disruptive setting, such as an environment variable or a new image tag in staging, and watches the rolling update replace whole groups according to the configured update strategy. In a separate test, deletes a worker pod and then a leader pod to observe how the controller recreates the group and how the serving layer reacts. Done when the update completes with at least the agreed number of groups serving throughout, and each failure test returns the group to Ready with the same model artifacts, confirmed by a fresh test request.

Security and operational controls for multi-node inference

A multi-node inference group spans several pods, nodes and a controller that creates and replaces them, so one weak control affects the whole model. The cards below cover the controls that connect the model supply chain, pod-to-pod traffic, controller permissions, registry credentials and access logs, with the cluster-level baseline they depend on.

Model weight provenance and storage access

Every leader and worker pod in a group loads the same weights, so the source of those weights defines what runs across the whole group. Record where each model artifact came from, its checksum and version, and who approved it. Mount weights from a read-only volume or object store path that only the inference namespace can read, and confirm that workers cannot write into the shared model directory. Ask your team how a changed artifact would be detected before a rolling update reloads it.

Network policy between leader and worker pods

Leaders and workers exchange tensor and coordination traffic that should never reach other workloads. Write NetworkPolicies that allow ingress to workers only from pods in the same group and from the leader, and allow ingress to the leader only from the inference gateway. Confirm that your CNI enforces NetworkPolicy before relying on it, because a policy object without enforcement does nothing. Test the policy by attempting a connection from an unrelated pod in the same namespace.

Least-privilege RBAC for the controller

The LeaderWorkerSet controller creates pods, services and other objects on behalf of every group. Bind it to a ClusterRole only for the resources and verbs it needs, and limit cluster-wide scope where a namespaced Role is enough. Review whether it can read Secrets across namespaces, since a compromised controller with that access exposes registry and model credentials. Re-check the role after each upgrade, because controller releases can add permissions.

Secrets for model registries

Pulling gated or private models requires registry tokens and sometimes Hugging Face access keys. Store them as Kubernetes Secrets scoped to the inference namespace, and mount them only into the pods that download weights. Kubernetes stores Secrets unencrypted in etcd by default, so enable encryption at rest before loading production credentials. Where your organization already runs an external secret store, use the Secrets Store CSI Driver so tokens are rotated outside the cluster.

Pod Security Standards and etcd encryption

The inference namespace should enforce the Restricted Pod Security Standard through Pod Security Admission unless GPU device access forces a documented exception. Inference pods rarely need privileged mode, host networking or host paths, so each exception needs an owner and a reason. Encryption at rest for etcd protects the Secrets and object definitions that describe every group. Confirm both controls on a staging cluster first, because the GPU drivers and device plugin may need an exemption at a lower level.

Pod Security Standards

Audit logging of inference access

Record who sent requests to the inference endpoint, which model and group served them, and what administrative changes were made to LeaderWorkerSet objects. Kubernetes audit logs cover API changes such as scaling or template edits, while the serving engine and gateway logs cover request metadata. Decide what prompt and response content to keep, since logging full text can create its own data exposure. Confirm retention and who can read these logs before production traffic arrives.

Questions teams ask before hiring help with multi-node inference

What drives the cost and effort of a multi-node LLM inference build?

The biggest drivers are the number of model replicas, how many nodes each replica spans, and how much of the surrounding platform already exists. Effort rises when the cluster lacks GPU node preparation, when the model needs a custom serving configuration, or when the team must add autoscaling, health checks and failure handling around the leader and worker pods. The cost components are the engineering time to design and build the setup, the test runs on real accelerators, and the documentation and handover. Ask any partner for a quote that lists each replica topology, the serving engine versions in scope, the infrastructure changes required and what is one-time work versus ongoing support.

How long does a multi-node inference build take in our environment?

Duration depends mostly on the environment rather than the framework. A cluster that already has GPU nodes, a working scheduler, shared model storage and an approved model artifact path can move faster than one where the network fabric, drivers, image registries and access approvals still need work. Air-gapped environments add time for mirroring images and model weights, and regulated environments add time for review of access and logging controls. Ask for a timeline that separates environment readiness, a proof of concept on your hardware, production hardening and acceptance testing, and state which of those steps depend on your own teams.

What must we supply before the build starts?

You need to provide four things before work begins:

  • GPU nodes with the drivers and container runtime support your team has approved, plus enough nodes in the same network domain to host one replica across several machines.
  • Storage for model weights and logs, with a clear decision on whether weights are shared or copied to each node.
  • Model access, meaning licensed or approved weights, a registry or artifact store your cluster can reach, and a named owner who can approve model versions.
  • Network paths between pods on different nodes, including the low-latency fabric the parallelism setup expects, and any load balancer or ingress rules for the API endpoint.

Confirm each item against your own environment early, because gaps here are the most common reason schedules move.

Can an internal platform team build this without outside help?

Yes, if the team already runs GPU workloads on Kubernetes and has people who understand distributed inference. The work needs knowledge of the serving engine, the Kubernetes scheduling model for grouped pods, GPU networking and rollout behavior under failure. Teams new to these areas usually spend most of their time on first-time problems such as node topology, interconnect configuration and failure recovery. An outside partner can shorten that learning curve with a fixed-scope build and written handover, while your team keeps ownership of the platform afterward. Decide early which parts your staff will own, and ask for documentation that your operators can follow without the builder present.

When is a single-node or gang scheduling approach the better fit?

Choose a single-node deployment when the model fits on one node's accelerators with acceptable latency and throughput, because it avoids cross-node communication and is simpler to operate. Gang scheduling becomes relevant when a workload needs several pods to start together, such as a multi-node training job or a replica whose members cannot run alone. LeaderWorkerSet groups replicas of a multi-pod inference unit, so it fits when you need several such units to scale and roll out as a set. If your question is only about getting all pods of one job admitted together, compare it with a gang scheduling design before committing to a serving pattern.

How do we handle failures inside a multi-node replica?

A replica that spans several nodes fails as a unit, so the design must treat a lost worker as a lost replica. Plan for how the leader detects a missing worker, how the group is restarted or replaced, and how traffic is drained so clients see a clean error or a retry instead of stalled requests. Health probes, model load time and the rollout strategy all affect recovery time. Ask for a written failure test plan that covers killing a worker, losing a node during a rolling update and recovering from a stuck model load.

Do we need to confirm that the serving engine supports our model and hardware?

Yes. Support for a given model, quantization format, parallelism mode and accelerator type depends on the serving engine version you choose, so confirm these combinations against that engine's own documentation before the design is fixed. Also confirm the Kubernetes version you run is supported by the project and check its version skew policy before upgrading the cluster or the serving stack. Treat any compatibility claim you read in a proposal as something to verify on your hardware during the proof of concept.

What DeployOpen scopes for a LeaderWorkerSet rollout

A fixed-scope LeaderWorkerSet engagement starts by writing down what the cluster must provide before any model is loaded. The scope names the Kubernetes version and the GPU node pools that will run leader and worker pods, confirms that the LeaderWorkerSet controller can be installed and upgraded under your change process, and records how the accelerator driver and device plugin are managed on those nodes. It also confirms how pods in one group reach each other across nodes, including the network path, MTU and any network policy that could block leader-to-worker traffic. Your platform team should confirm these prerequisites in its own environment, because the answers decide whether a multi-node group can start at all.

The next decisions cover the model, the runtime and the group topology. The scope records the model family, its parameter count and precision, the number of GPUs each group needs, and whether the runtime is vLLM or llm-d, with the version pinned. It sets the size of each group and the leader and worker container specs, and it defines where model weights come from and how they reach every node in the group. Each choice is tested against the expected load so that the number of replicas, the group size and the GPU shape are agreed before the first rollout. Illustrative example: a model that needs eight GPUs may be split across two nodes with four GPUs each, and the scope states that trade-off explicitly.

The rollout tests and handover documentation close the scope. Tests cover a rolling update of one group at a time, behavior when a worker pod is deleted or a node is drained, recovery of the whole group, and the inference API answering through the leader. The written scope names the pass criteria for each test and the environment where they run. The handover package contains the manifests, the runbook for group failures and rollbacks, the upgrade steps for the runtime and the controller, and the dashboards your operators will use. The scope is agreed in writing before work starts, so every item above is either in the deliverables or explicitly excluded.

How DeployOpen scopes, delivers and supports this work

DeployOpen plans, builds, tests, documents and supports self-hosted multi-node LLM inference inside your own clusters and accelerator capacity. Each engagement starts from a written scope that sets out the models, serving engine, failure expectations and handover deliverables before any build work begins.

How we scope

  • Inventory the models, parameter sizes, accelerator types and node counts that need multi-node serving
  • Agree the LeaderWorkerSet layout, leader and worker roles, and whether vLLM or llm-d is the serving engine
  • Record rolling update, failure handling and access requirements in a written, fixed-scope document before work starts

How we build

  • Install the LeaderWorkerSet controller and configure GPU scheduling, networking between leader and worker pods
  • Wire model storage, health probes and the OpenAI-compatible endpoint into your existing cluster and gateway
  • Test rolling updates and simulated worker failures in a non-production cluster before any production change

How we hand over

  • Document the group topology, sizing assumptions, upgrade steps and known failure modes for your platform team
  • Provide runbooks for replacing a failed group, rotating model versions and recovering from partial scheduling
  • Walk your operators through the deployment, monitoring signals and the retest results before handover

How we support

  • Offer ongoing support, version upgrades and continuous testing as a retainer after handover
  • Review LeaderWorkerSet and serving engine release changes against your deployed configuration
  • Confirm with your team which support hours, escalation paths and change windows apply to your environment

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.