> This page is for version dev.
> For other versions, use one of these documentation indexes:
> - Latest (v1.7.1) (default): https://docs.nvidia.com/dynamo/latest/llms.txt
> - dev: https://docs.nvidia.com/dynamo/dev/llms.txt
> - v1.7.1: https://docs.nvidia.com/dynamo/v1.7.1/llms.txt
> - v1.6.2: https://docs.nvidia.com/dynamo/v1.6.2/llms.txt
> - v1.7.0: https://docs.nvidia.com/dynamo/v1.7.0/llms.txt
> - v1.6.1: https://docs.nvidia.com/dynamo/v1.6.1/llms.txt
> - v1.6.0: https://docs.nvidia.com/dynamo/v1.6.0/llms.txt
> - v1.5.1: https://docs.nvidia.com/dynamo/v1.5.1/llms.txt
> - v1.5.0: https://docs.nvidia.com/dynamo/v1.5.0/llms.txt
> - v1.4.2: https://docs.nvidia.com/dynamo/v1.4.2/llms.txt
> - v1.4.1: https://docs.nvidia.com/dynamo/v1.4.1/llms.txt
> - v1.4.0: https://docs.nvidia.com/dynamo/v1.4.0/llms.txt
> - v1.3.0: https://docs.nvidia.com/dynamo/v1.3.0/llms.txt
> - v1.2.1: https://docs.nvidia.com/dynamo/v1.2.1/llms.txt
> - v1.2.0: https://docs.nvidia.com/dynamo/v1.2.0/llms.txt
> - v1.1.1: https://docs.nvidia.com/dynamo/v1.1.1/llms.txt
> - v1.1.0: https://docs.nvidia.com/dynamo/v1.1.0/llms.txt
> - v1.0.2: https://docs.nvidia.com/dynamo/v1.0.2/llms.txt
> - v1.0.1: https://docs.nvidia.com/dynamo/v1.0.1/llms.txt
> - v1.0.0: https://docs.nvidia.com/dynamo/v1.0.0/llms.txt
> - v0.9.1: https://docs.nvidia.com/dynamo/v-0-9-1/llms.txt
> - v0.9.0: https://docs.nvidia.com/dynamo/v-0-9-0/llms.txt
> - v0.8.1: https://docs.nvidia.com/dynamo/v-0-8-1/llms.txt
> - v0.8.0: https://docs.nvidia.com/dynamo/v-0-8-0/llms.txt
> - v0.7.1: https://docs.nvidia.com/dynamo/v-0-7-1/llms.txt
> - v0.7.0: https://docs.nvidia.com/dynamo/v-0-7-0/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.nvidia.com/dynamo/llms.txt. For full content including API reference and SDK examples, see https://docs.nvidia.com/dynamo/llms-full.txt.

# Planner Operations

import { TableCodeStyles } from "../../../../../components/TableCodeStyles";

<TableCodeStyles />

Compare Planner recommendations with ready workers, request latency, and errors.
When the observed behavior calls for a policy change, use
[Tune the Planner](/dynamo/dev/kubernetes/auto-deployment/dynamo-planner).

| Symptom | Check |
|---|---|
| Desired replicas differ from ready workers | Check pending pods and deployment status using the [Kubernetes verification workflow](/dynamo/dev/kubernetes/auto-deployment/get-started-with-planner#check-the-scaling-behavior). |
| Decisions report missing or stale inputs | Inspect [Unavailable Scaling Inputs](#unavailable-scaling-inputs) and [backend requirements](#load-based-scaling). |
| Scale-down interrupts requests | Review [scale-down limitations](#general) and the configured replica floors. |
| Recommendations need validation | Use [advisory mode](#advisory-mode) and compare recommendations with [diagnostics reports](#html-diagnostics-reports). |

## Monitoring

### Grafana Dashboard

Deploy the planner dashboard:

```bash
kubectl apply -n monitoring -f deploy/observability/grafana-planner-dashboard-configmap.yaml
```

The dashboard shows:
- Worker counts and GPU usage over time
- Observed TTFT, ITL, request rate, sequence lengths
- Predicted load and recommended replica counts
- Engine perf model status

### Prometheus Metrics

When `PLANNER_PROMETHEUS_PORT` is set, the planner serves its own metrics endpoint. Exported series use the `dynamo_planner_*` naming convention (underscores and standard unit suffixes), replacing older `planner:*`-style names.

**Throughput-based scaling** pulls traffic metrics from the cluster-wide Prometheus server:
- Request count and duration
- TTFT and ITL distributions
- Input/output sequence lengths

Planner can read these traffic signals from either the public `Frontend` or a pool-local `LocalRouter`. Use `throughput_metrics_source: "frontend"` for a single-DGD deployment. Use `throughput_metrics_source: "router"` for GlobalPlanner / multi-pool deployments so each pool Planner reads its own router traffic instead of the shared public endpoint.

| Planner input | Frontend source | Router source |
|---|---|---|
| Request count | `dynamo_frontend_requests_started_total` | `dynamo_component_router_requests_started_total` |
| TTFT | `dynamo_frontend_time_to_first_token_seconds` | `dynamo_component_router_time_to_first_token_seconds` |
| ITL | `dynamo_frontend_inter_token_latency_seconds` | `dynamo_component_router_inter_token_latency_seconds` |
| Request duration | `dynamo_frontend_request_duration_seconds` | `dynamo_component_request_duration_seconds` until router-specific duration metrics are available |
| Input sequence length / ISL | `dynamo_frontend_input_sequence_tokens` | `dynamo_component_router_input_sequence_tokens` |
| Output sequence length / OSL | `dynamo_frontend_output_sequence_tokens` | `dynamo_component_router_output_sequence_tokens` |
| KV hit rate | `dynamo_component_router_kv_hit_rate` | `dynamo_component_router_kv_hit_rate` |

The throughput planner uses request count, ISL, OSL, and optional KV hit rate as the core traffic forecast inputs. The router component metric supplies KV hit rate for both traffic metric sources. TTFT, ITL, and request duration are also scraped and exported as observed diagnostics.

The request-count metrics increase when the Frontend accepts a request or the router scheduler admits it, before the response completes. Planner falls back to the corresponding completed-request counter when an older Frontend or router does not expose the started counter. This compatibility fallback can underestimate demand during backpressure.

**Load-based scaling** uses ForwardPassMetrics (FPM) from the Dynamo event plane:
- Per-iteration wall time, scheduled prefill/decode tokens, and queued request status
- Delivered via `FpmEventSubscriber` with automatic engine discovery and lifecycle tracking
- No router `/metrics` scraping required

FPM observes engine-side scheduled and queued work. It does not include requests still queued in the `LocalRouter` before engine assignment.

Core gauges on the planner port include replica counts (`dynamo_planner_num_prefill_replicas`, `dynamo_planner_num_decode_replicas`), observed traffic (`dynamo_planner_observed_*`), replica recommendations (`dynamo_planner_predicted_num_prefill_replicas`, `dynamo_planner_predicted_num_decode_replicas`), and cumulative `dynamo_planner_gpu_hours`.

Throughput prediction gauges `dynamo_planner_predicted_requests_per_second`, `dynamo_planner_predicted_input_sequence_tokens`, and `dynamo_planner_predicted_output_sequence_tokens` are wired from throughput-scaling traffic prediction and exposed alongside observed sequence-length metrics.

### Advisory mode

Set `advisory: true` to run the local Planner in suggestion-only mode. To validate a configuration this way on Kubernetes, see [Validate before you scale for real](/dynamo/dev/kubernetes/auto-deployment/dynamo-planner#validate-before-you-scale-for-real).

In advisory mode, the Planner still observes traffic and FPM data, computes recommended prefill and decode replica counts, logs recommendation summaries, exports predicted replica metrics, and includes recommendations in diagnostics reports. The recommendations are not applied as scaling decisions: the Planner does not execute scaling actions, send replica changes to Kubernetes or GlobalPlanner, or mutate the deployment. A planner-in-the-loop replay of an advisory configuration keeps the simulated deployment fixed, reports the recommendations, and records [retune](/dynamo/dev/knowledge-base/modular-components/planner/planner-guide#periodic-retune-experimental) decisions, which run only in simulation, without applying them; see [Replay in Advisory Mode](/dynamo/dev/knowledge-base/modular-components/planner/aisimulate-planner-replay#replay-in-advisory-mode).

#### Diagnostics metrics

Additional series support dashboards and offline analysis:

- **Perf-model latency estimates:** `dynamo_planner_estimated_ttft_ms` and `dynamo_planner_estimated_itl_ms` reflect the maximum estimated TTFT and ITL from the engine perf model across engines.
- **Engine capacity:** `dynamo_planner_engine_prefill_capacity_requests_per_second` and `dynamo_planner_engine_decode_capacity_requests_per_second` report single-engine prefill and decode capacity under the configured SLA.
- **Scaling decision reasons:** `dynamo_planner_load_scaling_decision` and `dynamo_planner_throughput_scaling_decision` are Enum gauges whose state labels encode why each mode chose to scale, hold, or skip (for example `scale_up`, `no_fpm_data`, `set_lower_bound`).
- **Per-engine FPM queue depths:** `dynamo_planner_engine_queued_prefill_tokens`, `dynamo_planner_engine_queued_decode_kv_tokens`, and `dynamo_planner_engine_inflight_decode_kv_tokens` are labeled with `worker_id` and `dp_rank` for each engine.

### HTML diagnostics reports

The planner can emit periodic, self-contained HTML diagnostics files with interactive Plotly charts.

Configure this in `PlannerConfig` (or the equivalent YAML / constructor wiring your deployment uses):

- `report_interval_hours`: interval in **simulated** time between reports (default `24.0` hours); set to `null` to disable.
- `report_output_dir`: directory where HTML files are written (default `./planner_reports`).
- `live_dashboard_port`: port for a real-time HTTP dashboard (default `8080`). Set to `0` to disable. An aiohttp server starts on the given port and serves the current accumulated snapshot data as an interactive Plotly report at `http://<host>:<port>/`. Unlike periodic reports, the live dashboard does **not** clear snapshots — it always shows all data accumulated since the last periodic report (or since startup if periodic reports are disabled).

Reports aggregate per-tick snapshots and use `TickInput.now_s` for timestamps, so they behave the same in live runs (wall clock) and in **replay** with a simulated clock. Typical charts cover worker counts, recommended replica counts, observed versus estimated latencies versus SLA targets, request rate, engine capacity, scaling decision timelines, and input/output sequence lengths. In the Replica Counts plot, actual replicas are shown as lines and the Planner's recommended prefill and decode replica counts are shown as discrete markers at the ticks where recommendations were produced. This is especially useful with `advisory: true` because those recommendations are suggestions only.

## Unavailable Scaling Inputs

`dynamo_planner_signal_unavailable{component,signal}` reports missing inputs on
their most recent scheduled observation. After the consecutive-observation
threshold defined by `SIGNAL_DEGRADATION_OBSERVATIONS` in
[planner_metrics.py](https://github.com/ai-dynamo/dynamo/blob/main/components/src/dynamo/planner/monitoring/planner_metrics.py)
is reached, the Planner logs `Planner degraded signal` and increments
`dynamo_planner_degraded_signals_total{component,signal}` once for that episode.
A successful observation clears the gauge and allows a later outage to produce
a new alert. Ticks that do not request a signal do not count as missing samples.

The signals distinguish missing FPM, stale FPM, worker discovery join failures,
missing speculative accept length, and unavailable traffic observations.
`load_inputs` and `throughput_inputs` report `missing_engine_metadata` from the
scaling paths' own metadata checks, such as missing KV capacity or batching
limits. Normal performance-model warmup (`insufficient_data` or
`model_not_ready`) remains visible in decision diagnostics and does not trigger
a degraded-input alert. For a pool with ready workers, metadata health changes
only when a scaling path actually evaluates that metadata; skipped, idle, or
zero-demand decisions do not clear an existing metadata alarm. An explicitly
empty pool clears its metadata alarm.
Runtime FPM samples expire after three load-adjustment
intervals measured from local receipt. Idle heartbeats refresh that receipt
time. Samples from workers absent from discovery are excluded and logged with
their worker IDs.
Each discovered worker must provide a fresh sample for every DP rank declared
in its model card. A worker or rank that has never published is unavailable;
the Planner does not use a partial component snapshot to infer idle capacity.
A snapshot is also unavailable if any rank's payload is malformed or uses an
unsupported FPM schema version.

Missing, non-finite, or failed router request-counter queries produce unavailable
demand, matching the frontend collection behavior. An explicit counter value of
zero remains a valid idle observation.

Fresh idle FPM can reduce an SLA pool without waiting for a cold performance
model. A valid zero-demand throughput prediction can also reduce a pool without
a capacity estimate. Missing observations do not count as idle. Replica floors,
GPU budgets, pending rollout checks, and downstream actuation constraints still
apply. A restarted Planner uses observed deployment counts to resume decisions.
These model-independent idle paths retain at least one worker per active role,
even when `min_endpoint: 0`: without a publisher or a ready capacity model, they
cannot independently wake a fully stopped pool.

## Runtime Minimum Endpoint API

The Planner listens on `127.0.0.1:<control_api_port>` and supports `GET` and partial `PATCH` requests at `/v1/min-endpoints`. The API has no authentication and is not exposed by a Kubernetes Service. It uses `prefill_min_endpoint` and `decode_min_endpoint` in disaggregated mode, the active component's field in single-component mode, and `min_endpoint` in aggregated mode. Every mode also accepts `min_gpu_budget` and `max_gpu_budget`. A response includes the active endpoint fields and both GPU budgets. Updates are process-local, are not written back to the Planner ConfigMap, and apply to the next planner tick.

In Kubernetes, port-forward to the Planner pod and patch the active mode's field. The following example updates a Planner in `disagg` mode:

```bash
kubectl port-forward pod/<planner-pod> 9086:9086
curl http://127.0.0.1:9086/v1/min-endpoints
curl --request PATCH http://127.0.0.1:9086/v1/min-endpoints \
  --header 'Content-Type: application/json' \
  --data '{"prefill_min_endpoint": 8, "decode_min_endpoint": 8, "min_gpu_budget": 16, "max_gpu_budget": 64}'
```

The update is atomic. Use `-1` to disable either GPU budget. The Planner rejects malformed values, fields that are inactive for the current mode, a `min_gpu_budget` greater than `max_gpu_budget` when both are enabled, and minimum footprints that exceed `max_gpu_budget` or the configured power budget. The same checks run at startup, so an infeasible minimum configuration fails before the Planner enters its tick loop. Scale-up has no per-component maximum endpoint setting; the existing GPU, power, Global Planner, and cluster-capacity limits remain the upper bounds.

<Warning>
If a scaling submission loses its acknowledgement after the Planner stops waiting for it, a later submission error leaves the outcome unknown. The Planner then stops automatic effect submission to avoid duplicating an action that the remote service might have applied. Runtime `GET` and `PATCH` remain available. Verify the deployment's desired and Ready replica counts, then restart the Planner to resume automatic submission.
</Warning>

## Current Limitations

### Load-based scaling

Load-based scaling has the following known limitations. Throughput-based scaling is not affected by any of these.

**Requires ForwardPassMetrics (FPM).** Load-based scaling uses per-engine per-iteration metrics delivered via the Dynamo event plane (ForwardPassMetrics). The KV Router is **not** required for load-based scaling. FPM availability by backend:

- **vLLM** — supported. Automatically enabled when the engine uses `InstrumentedScheduler` and `DYN_FORWARDPASS_METRIC_PORT` is set.
- **TensorRT-LLM** — supported, including attention-DP. Enabled with `--fpm-trace`, `DYN_FORWARDPASS_METRIC_PORT` or `--publish-metrics`, each of which also turns on the engine's `enable_iter_perf_stats`; `--publish-kv-events` does not enable it. Dynamo publishes one FPM channel per attention-DP rank and disables FPM emission if the runtime schema is missing required fields.
- **SGLang** — supported. Enabled when `DYN_FORWARDPASS_METRIC_PORT` is set; requires the upstream FPM module, available starting with SGLang v0.5.13. See the [SGLang FPM section](/dynamo/dev/knowledge-base/modular-components/backends/sg-lang/observability#forward-pass-metrics-fpm).

FPM delivery alone does not establish decode scaling support: KV-utilization
decisions also require the worker's KV capacity metadata. TensorRT-LLM
deployments that omit `total_kv_blocks` or `kv_cache_block_size` cannot use that
decode scaling path. When the scaling decision reports `missing_engine_metadata`,
`dynamo_planner_signal_unavailable{component="decode",signal="load_inputs"}`
is set. The decision logs identify the missing capacity metadata.

### General

**In-flight requests during scale-down.** The Planner submits the replica reduction; the worker then handles its own termination. Workers that serve with graceful shutdown, such as the vLLM prefill endpoint, stop accepting new requests and give in-flight requests time to finish, bounded by `DYN_RUNTIME_GRACEFUL_SHUTDOWN_TIMEOUT_SECS` and the pod's termination grace period (see [Graceful Shutdown](/dynamo/dev/knowledge-base/concepts/fault-tolerance/graceful-shutdown-architecture#endpoint-draining)). A request can complete during that window or fail when the worker runs out of time. In disaggregated deployments, an interrupted prefill can also affect decode workers that were waiting on its KV cache transfer. **Workaround:** For an aggregated deployment, set `min_endpoint`. For a disaggregated deployment, set `min_endpoint` to apply the same floor to prefill and decode, or set `prefill_min_endpoint` and `decode_min_endpoint` when the components need different floors. For a single-component deployment, set the active role's field; when that field is unset, `min_endpoint` supplies the active role. With `optimization_target: sla`, a lower `load_scaling_down_sensitivity` value reduces model-based scale-down events; the endpoint floors are what keep capacity on an idle pool.