To serve a local LLM to many concurrent users, run vLLM's OpenAI-compatible server (vllm serve), size its KV cache for your real context lengths, cap concurrency with --max-num-seqs, and put a reverse proxy in front for auth and rate limits. vLLM's continuous batching packs every active request into each forward pass, so the number of users you can serve is set by KV cache memory, not by threads or workers. This guide shows the arithmetic, the flags that matter in vLLM v0.34 (released November 16, 2026), and how to monitor and load-test the result.

If you are still choosing an engine, read Ollama vs vLLM and SGLang vs vLLM first. This post assumes you have picked vLLM and need it to hold up under a team, not one developer.

How vLLM serves many users at once

Two mechanisms do the work.

Continuous batching. The scheduler does not wait for a batch to finish. Every iteration, it adds newly arrived requests and removes finished ones, so a short answer never waits behind a long one. Two flags bound each iteration: --max-num-seqs (maximum sequences in one iteration) and --max-num-batched-tokens (maximum tokens processed in one iteration, which limits how much prefill can be mixed into a decode step).

PagedAttention. The KV cache, which holds the attention keys and values for every token of every active request, is split into fixed-size blocks allocated on demand instead of one contiguous slab per request. Fragmentation stays low, and identical prefixes can share blocks. In v0.34 the default --block-size changed from 16 to 64 tokens (release notes).

Three defaults in the current V1 engine matter for multi-user serving:

  • Prefix caching is on by default for models that support it. The engine sets enable_prefix_caching from the model's capability unless you pass the flag (arg_utils.py). A shared system prompt or RAG preamble is computed once and reused across users.
  • Chunked prefill is on by default, so a 30k-token prompt is processed in chunks interleaved with other users' decode steps instead of freezing everyone.
  • Preemption uses recompute. When the KV cache runs out, vLLM evicts a running request and recomputes it later. Per the optimization guide, V1 defaults to RECOMPUTE rather than swapping to CPU. Preemptions do not crash anything, but they wreck tail latency.

So the capacity question is: how many tokens of KV cache fit on the GPU, and how many tokens does each concurrent user hold?

KV cache sizing: the formula

For a standard transformer with grouped-query attention:

KV bytes per token = 2 (K and V) x num_layers x num_kv_heads x head_dim x bytes_per_element

Take Qwen3-8B, whose config.json has num_hidden_layers: 36, num_key_value_heads: 8, head_dim: 128 and torch_dtype: bfloat16:

2 x 36 x 8 x 128 x 2 bytes = 147,456 bytes = 144 KiB per token

1 GiB / 144 KiB = 7,281 tokens of KV cache per GiB (BF16)
With --kv-cache-dtype fp8 (1 byte):   72 KiB per token, about 14,563 tokens per GiB

The model card lists 8.2B parameters, so BF16 weights take about 16.4 GB. Suppose that after weights, activations and CUDA graphs you have 50 GiB left for KV cache. That is an assumption for illustration; the next section shows how to read the real number.

50 GiB x 7,281 tokens/GiB          = ~364,000 tokens of KV cache

Concurrency if every user fills 32,768 tokens: 364,000 / 32,768 = ~11 sequences
Concurrency if a typical chat holds 4,000:     364,000 / 4,000  = ~91 sequences

That gap is the most important lesson in this guide. Concurrency depends on how many tokens users actually hold, not on the model's maximum context. A RAG assistant that stuffs 12k tokens of retrieved context into every request supports a third as many simultaneous users as a chat UI averaging 4k.

Two practical consequences:

  1. Set --max-model-len to what you need. Qwen3-8B's config allows 40,960 positions. If your app never sends more than 16k, cap it there. That will not shrink the cache, but it stops one runaway request from claiming a huge share of it, and it makes vLLM's startup concurrency estimate meaningful.
  2. Consider an FP8 KV cache. --kv-cache-dtype fp8 halves per-token KV memory and roughly doubles token capacity. Validate output quality on your own evals first, and check the quantized KV cache docs for your GPU generation.

Read the real number from the startup log

vLLM measures memory instead of trusting your arithmetic. In v0.34 the extensible KV cache is on by default on CUDA and ROCm: vLLM sizes the cache from memory actually free after CUDA graph capture and warmup, and --gpu-memory-utilization now defaults to 1.0 on those platforms (it was 0.92 before, and still is elsewhere). At startup it logs a line built from this format string in kv_cache_utils.py:

GPU KV cache size: <N> tokens, Maximum concurrency for <max_model_len> tokens per request: <X>x

Compare <N> with your estimate. If it is far lower, something else is using GPU memory. "Maximum concurrency" assumes every request uses the full max_model_len, so it is a worst-case floor, not a target.

Upgrade note: if you carried --gpu-memory-utilization 0.9 over from older guides, v0.34 treats it as a hard cap and you lose cache. The docs say to leave it unset unless something else shares the GPU, such as a second vLLM instance.

A production vllm serve command

For one Qwen3-8B instance on an 80 GB GPU serving an internal team:

pip install -U vllm   # v0.34.0 at the time of writing

export VLLM_API_KEY="$(openssl rand -hex 32)"

vllm serve Qwen/Qwen3-8B \
  --host 127.0.0.1 \
  --port 8000 \
  --served-model-name qwen3-8b \
  --max-model-len 16384 \
  --max-num-seqs 128 \
  --max-num-batched-tokens 8192 \
  --api-key "$VLLM_API_KEY"

Here is what each flag controls and its current default:

Flag What it does Default (v0.34)
--max-num-seqs Max sequences scheduled per iteration API server: 256 on GPUs under 70 GiB or A100; 1024 on H100/H200-class and larger
--max-num-batched-tokens Max tokens per iteration (prefill budget) API server: 2048 (smaller GPUs, A100), 8192 (H100/H200), 16384 (160 GiB+ GPUs)
--gpu-memory-utilization Hard cap on GPU memory fraction 1.0 with extensible KV cache, else 0.92
--max-model-len Max prompt + output tokens per request From model config
--enable-prefix-caching Reuse KV blocks for shared prefixes On if the model supports it
--kv-cache-dtype KV cache precision (auto, fp8, ...) auto (model dtype)
--tensor-parallel-size / -tp Shard the model across GPUs 1
--data-parallel-size / -dp Run independent replicas 1
--api-key Bearer token for /v1 routes None

The defaults come from get_batch_defaults() in arg_utils.py and the engine arguments reference.

Why lower --max-num-seqs to 128 when the hardware default is 1024? Because admitting more sequences than the KV cache can hold does not add throughput. It adds preemptions. Set it near the "typical tokens per user" concurrency from your arithmetic, then raise it while watching the preemption counter. Requests beyond the limit wait in vLLM's queue, which is visible in metrics and much easier to reason about than recompute storms.

--max-num-batched-tokens trades time-to-first-token against inter-token latency. A larger budget processes long prompts faster but makes every decoding user's next token wait for that prefill. If your users complain that output stutters when someone pastes a long document, lower it. If time-to-first-token on long prompts is the problem, raise it.

When one GPU is not enough

  • Model does not fit, or cache is too small: use --tensor-parallel-size 2 (or 4, 8). Weights are sharded, so each GPU has more room for KV cache, at the cost of inter-GPU communication on every layer. Use NVLink-connected GPUs where possible.
  • Model fits comfortably but you need more users: use --data-parallel-size 2 to run independent replicas behind one API server. There is no per-layer communication between replicas, and each one brings its own KV cache.

For a 7-14B model on a box with several GPUs, data parallelism is usually the better first move. For hardware choices, see our local LLM server hardware guide.

Put a reverse proxy in front

Do not expose vLLM directly, even on an internal network. The vLLM security guide is explicit: --api-key protects only the /v1, /v2, /inference and /cohere path prefixes. Other endpoints on the same port are unauthenticated, including /invocations (a SageMaker-compatible route to the same inference functions), /pause, /abort_requests, /update_weights, /tokenize and /metrics. Treat the --api-key as defense in depth and allowlist paths at the proxy.

This nginx config issues per-team keys, rate-limits each key, forwards only /v1/ to vLLM with the backend key, and exposes /metrics only to Prometheus:

map $http_authorization $api_client {
    default                         "";
    "Bearer team-search-7f3c..."    "search";
    "Bearer team-support-91ab..."   "support";
}

limit_req_zone $api_client zone=per_client:10m rate=5r/s;

upstream vllm_backend {
    server 127.0.0.1:8000;
    keepalive 32;
}

server {
    listen 443 ssl;
    server_name llm.internal.example.com;
    ssl_certificate     /etc/nginx/tls/llm.crt;
    ssl_certificate_key /etc/nginx/tls/llm.key;

    location /v1/ {
        if ($api_client = "") { return 401; }
        limit_req zone=per_client burst=20 nodelay;

        proxy_pass http://vllm_backend;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_set_header Authorization "Bearer REPLACE_WITH_VLLM_API_KEY";
        proxy_set_header X-Client $api_client;

        # Streaming (SSE): do not buffer, allow long generations
        proxy_buffering off;
        proxy_read_timeout 600s;
    }

    location = /metrics {
        allow 10.0.0.15;   # Prometheus
        deny all;
        proxy_pass http://vllm_backend;
    }

    location / { return 404; }
}

Two notes. proxy_buffering off is what makes stream: true responses arrive token by token instead of in bursts. And if you need real per-user quotas, usage accounting or many models behind one endpoint, an LLM gateway such as LiteLLM is a better fit than hand-maintained nginx maps.

Multiple models and LoRA adapters

One vllm serve process serves one base model. You have two ways to offer more.

LoRA adapters on one base model. This is the cheap option. Fine-tuned variants share the base weights and are selected per request through the model field, as described in the LoRA docs:

vllm serve Qwen/Qwen3-8B \
  --enable-lora \
  --lora-modules support-bot=/models/lora/support-v3 sql-helper=/models/lora/sql-v1 \
  --max-loras 4 \
  --max-lora-rank 32 \
  --api-key "$VLLM_API_KEY"

--max-loras (default 1) is how many different adapters can be in a single batch. If you have four teams using four adapters at the same time and leave it at 1, their requests serialize. --max-lora-rank (default 16) must be at least your largest adapter's rank. Runtime loading through /v1/load_lora_adapter requires VLLM_ALLOW_RUNTIME_LORA_UPDATING=True, which the docs warn against outside isolated, trusted environments.

Different base models. Run one vLLM process per model, either on separate GPUs or on one GPU with explicit memory fractions. Sharing a GPU is the documented case for setting --gpu-memory-utilization below 1.0, because each instance measures free memory only once at startup. Then route by model name with a gateway. A minimal LiteLLM proxy config looks like this:

model_list:
  - model_name: qwen3-8b
    litellm_params:
      model: hosted_vllm/qwen3-8b
      api_base: http://127.0.0.1:8000/v1
      api_key: os.environ/VLLM_API_KEY
  - model_name: coder
    litellm_params:
      model: hosted_vllm/coder
      api_base: http://127.0.0.1:8001/v1
      api_key: os.environ/VLLM_API_KEY_CODER

Monitor the right metrics

vLLM exposes Prometheus metrics at /metrics. Names below come from vllm/v1/metrics/loggers.py at v0.34.0. Counters get Prometheus's _total suffix, and histograms expose _bucket, _sum and _count.

Metric Type Watch for
vllm:num_requests_running Gauge Pinned at --max-num-seqs means you are at capacity
vllm:num_requests_waiting Gauge Sustained non-zero means users are queueing
vllm:kv_cache_usage_perc Gauge Near 1.0 precedes preemptions
vllm:num_preemptions_total Counter Any steady rate means too many admitted sequences
vllm:time_to_first_token_seconds Histogram User-perceived responsiveness
vllm:inter_token_latency_seconds Histogram Streaming smoothness
vllm:request_queue_time_seconds Histogram Time spent waiting before scheduling
vllm:e2e_request_latency_seconds Histogram Total request time
vllm:prefix_cache_hits_total / vllm:prefix_cache_queries_total Counter Hit ratio for shared prompts

Two queries cover most dashboards:

# p95 time to first token over 5 minutes
histogram_quantile(0.95, sum by (le) (rate(vllm:time_to_first_token_seconds_bucket[5m])))

# prefix cache hit ratio
rate(vllm:prefix_cache_hits_total[5m]) / rate(vllm:prefix_cache_queries_total[5m])

A low prefix-cache hit ratio in a RAG app usually means the shared part of your prompt is not at the start. Put the system prompt and static instructions first and the per-user context last.

Load-test before you announce it

vllm bench serve replays synthetic or dataset traffic against a running server and reports throughput plus TTFT, TPOT and ITL percentiles. Flags are listed in the CLI reference. Shape the random dataset to match your real prompts:

export OPENAI_API_KEY="$VLLM_API_KEY"   # bench sends it as a Bearer token

vllm bench serve \
  --backend openai-chat \
  --endpoint /v1/chat/completions \
  --base-url http://127.0.0.1:8000 \
  --model qwen3-8b \
  --tokenizer Qwen/Qwen3-8B \
  --dataset-name random \
  --random-input-len 3000 \
  --random-output-len 400 \
  --num-prompts 600 \
  --max-concurrency 64 \
  --percentile-metrics ttft,tpot,itl,e2el \
  --metric-percentiles 50,95,99 \
  --goodput ttft:2000 tpot:60 \
  --save-result

Run it against the backend port, not through nginx. The benchmark also calls /tokenize and /metrics, which the proxy above blocks. Then repeat with --max-concurrency at 16, 32, 64 and 128. The useful output is not peak throughput but the concurrency level where p95 TTFT or TPOT breaks your service target. --goodput counts only requests that met those targets. That level, with some headroom, is your real user capacity, and it should line up with the KV cache arithmetic. If it does not, check vllm:num_preemptions_total during the run.

Frequently Asked Questions

How many concurrent users can vLLM handle?

There is no fixed number. It equals the KV cache capacity in tokens divided by the tokens each active request holds, capped by --max-num-seqs. For Qwen3-8B in BF16, each token costs 144 KiB, so 50 GiB of cache holds about 364,000 tokens: roughly 91 users at 4k tokens each, or 11 at 32k. Measure with vllm bench serve to find where latency targets break.

Is prefix caching enabled by default in vLLM?

Yes, in the V1 engine prefix caching is enabled by default for models that support it, and so is chunked prefill. You can still pass --enable-prefix-caching or --no-enable-prefix-caching explicitly. Monitor the hit ratio with the vllm:prefix_cache_hits_total and vllm:prefix_cache_queries_total counters.

Should I still set --gpu-memory-utilization 0.9?

Not on v0.34 with CUDA or ROCm unless something else shares the GPU. The extensible KV cache measures free memory after warmup and defaults the setting to 1.0. An explicit lower value is a hard cap that shrinks your KV cache. Set it below 1.0 only for co-located processes, unified-memory devices or RL weight updates.

Ollama vs vLLM for multiple users?

Ollama can handle parallel requests (see its OLLAMA_NUM_PARALLEL setting), but it is designed around single-user convenience and quantized GGUF models. vLLM's continuous batching and paged KV cache are built for many simultaneous streams on GPU servers. For a team or a product, vLLM or SGLang is the usual choice. Our Ollama vs vLLM comparison covers the trade-offs.

Is --api-key enough to secure vLLM?

No. It covers only the /v1, /v2, /inference and /cohere prefixes. Endpoints such as /invocations, /pause, /abort_requests, /tokenize and /metrics stay open. Bind vLLM to localhost or a private interface and expose only allowlisted paths through a reverse proxy or gateway.

Conclusion

Multi-user vLLM serving is a memory budgeting exercise. Compute KV bytes per token from the model config, compare your estimate with the GPU KV cache size line at startup, and set --max-model-len and --max-num-seqs from the tokens your users actually hold. Then hide the server behind a proxy that allowlists /v1/, watch queue depth, KV usage and preemptions in Prometheus, and use vllm bench serve to find the concurrency where your latency targets break. If you are upgrading from an older guide, drop the reflexive --gpu-memory-utilization 0.9 and re-check your numbers against v0.34's new defaults.