Skip to content

Pools & Load Balancing ​

A pool puts N deployments that serve the same model behind a single OpenAI-compatible endpoint. Typical use:

"I will bring Qwen 2.5 72B up on 6 machines, and my applications should see only one endpoint."

Two ways to create a pool ​

Pools → Bulk deploy model:

  1. Pick a Model (from the library).
  2. Hosts — only online and compatible ones are listed. Checkbox + slice picker.
  3. Pool name + algorithm → Deploy.

It is a single atomic call: N deployments are created and all of them automatically become pool members. On a mid-flight failure there is an automatic rollback (partially created deployments are undone).

B. Grouping existing deployments ​

If you already have same-model deployments that you deployed earlier:

  1. On the Pools page, instead of Bulk deploy, create an empty pool with POST /api/gpu-fleet/pools.
  2. Pool detail → Add member → deployments compatible with the same modelName are listed as candidates.

Load-balancing algorithms ​

AlgorithmBehaviorWhen to use
Round-robinOne request to each member in turn.Default. Equal hardware, roughly equal load.
Least-busyPick the one with the lowest vllm:num_requests_running.Workloads with varying queue depth (chat).
Weighted-staticA weight per member.Heterogeneous hardware (a mix of A100 80GB and A100 40GB).
RandomRandom.Only for debug/test.

The algorithm changes instantly from the Select in the pool detail. In-flight requests are not affected; new requests are routed with the new algorithm.

How does least-busy work? ​

  1. The latest metrics snapshot is fetched for each pool member from its inferenceServerKey (numRequestsRunning).
  2. The smallest value wins. If several members have the same value, round-robin (tie-break).
  3. If no member has metrics (a new deployment), it falls back to round-robin.

The metrics are fed by the inferenceMonitoring poller (60 s poll by default). You can reduce the poll interval for a faster reaction.

Weighted-static example ​

Two A100 80GB and four A100 40GB:

weights: {
  "deployment-a100-80-1": 4,
  "deployment-a100-80-2": 4,
  "deployment-a100-40-1": 1,
  "deployment-a100-40-2": 1,
  "deployment-a100-40-3": 1,
  "deployment-a100-40-4": 1,
}

Requests go ~67% to the big machines and ~33% to the small ones.

When the algorithm in the pool detail is weighted-static, a NumberInput appears on each member row → change it → you do not need to save (it is patched instantly).

Endpoint ​

It is ready the moment the pool is created:

POST https://console.example.com/api/internal/gpu-pool/<poolKey>/v1/chat/completions
Authorization: Bearer <tenant-api-token>
content-type: application/json

{ "model": "Qwen/Qwen2.5-72B-Instruct", "messages": [...] }

Streaming, embeddings, listing: vLLM's OpenAI-compatible sub-paths pass through as they are.

This endpoint needs a Bearer token; generate a valid tenant API token (Settings → API Tokens) or Publish the pool to the Model Hub (next section).

Publish to the Model Hub ​

Pool detail → Publish to Model Hub:

  1. Pick a modality (LLM / Embedding / STT / TTS / OCR).
  2. Publish → the console does two things:
    • Mints a new API token in the tenant scope.
    • Creates an IProvider (openai-compatible, baseUrl = pool URL, apiKey = the minted token) and an IModel (modelId = pool's modelName) record.
  3. The UI shows you the minted token once. It is stored encrypted in the provider.

From this point on, within the normal Model Hub flow, the pool behaves like an ordinary provider. Agents are routed to the pool when they call models/v1/chat/completions.

If you lose the token

You cannot publish again from the pool detail (it is already registered). Delete the pool and create it again, or update the provider by hand from the Providers page.

Server type and re-authorization ​

  • One server type per pool. A pool's Model Hub provider talks to its members as one server type (vLLM, MLX, Ollama, generic), which decides how the reasoning Off/On switch reaches the model. The server type must fit every member, so a member whose server needs different requests for the pool's model is refused when you attach it.
  • Re-authorize. The pool's Model Hub provider calls the pool with a token owned by the person who published it. When that token expires, or its owner is deleted or disabled, or loses Model Hub write access in the project, the pool shows a re-authorize badge and Model Hub calls through it are refused. Re-authorize gives the provider a new token in your name, limited to Model Hub write.

Member management ​

  • Add member — lists the deployments that serve the same modelName and are not yet in the pool. Multi-pool is supported: a deployment can be a member of several pools.
  • Remove member — removes it from the pool; the container keeps running. If you want to add it back, it returns to the add-member modal.
  • Delete pool — deletes only the pool record. The member deployments keep running. If you want them gone too, first Stop + Delete each deployment (in the future: a "delete with members" toggle).

Healthy vs unhealthy member behavior ​

  • The pool sends requests only to healthy members.
  • Unhealthy/draining members are skipped.
  • If there is no healthy member → 503 Pool has no healthy members.
  • You can set up an alert rule for when the member count becomes insufficient (see the Alerts integration).

Pool ↔ Cluster behavior ​

The pool proxy runs inside the console process. In a multi-node cluster:

  • Every node sees the same pool list from the DB → every node can proxy.
  • The round-robin cursor is per-process in-memory. With 3 nodes and a 6-member pool, each node has its own cursor; the load distribution stays uniform at the macro level.
  • This can cause slight unfairness in small pools. For serious scale, switch to the least-busy algorithm — it decides DB-backed, so it is node-shared.

Best practices ​

  • Use 6+ members with least-busy → resilient to fluctuation.
  • Limit vLLM with --max-num-seqs → each member gives a predictable queue depth.
  • Wait for 1-2 deployments to be healthy before you Publish → if you publish an empty pool, you have to add members afterwards.
  • Keep a separate tenant API token for the pool → the audit log stays clean (the gpu-pool/<key> label).

Next step ​

→ MIG Reconfigure — split a physical GPU on A100/H100.

Studio · Pulse · Console · Agent SDK and more — the Cognipeer documentation hub