You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/blog/posts/pd-disaggregation.md
+27-36Lines changed: 27 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,9 +26,12 @@ For inference, `dstack` provides a [services](../../docs/concepts/services.md) a
26
26
27
27
> If you’re new to Prefill–Decode disaggregation, see the official [SGLang docs](https://docs.sglang.io/advanced_features/pd_disaggregation.html).
28
28
29
+
!!! note "Deprecation notice"
30
+
Configuring the SGLang router in a gateway is deprecated and will be disallowed in a future release. To run router and workers as separate replica groups, see [SGLang PD disaggregation (router as replica group)](https://dstack.ai/examples/inference/sglang/#pd-disaggregation).
31
+
29
32
## Services
30
33
31
-
With `dstack``0.20.17`, you can define a service with separate replica groups for Router, Prefill and Decode workers and run PD disaggregated Inference.
34
+
With `dstack``0.20.10`, you can define a service with separate replica groups for Prefill and Decode workers and enable PD disaggregation directly in the `router` configuration.
32
35
33
36
<diveditor-title="glm45air.dstack.yml">
34
37
@@ -43,21 +46,6 @@ env:
43
46
image: lmsysorg/sglang:latest
44
47
45
48
replicas:
46
-
- count: 1
47
-
# For now replica group with router must have count: 1
Create an [SSH fleet](https://dstack.ai/docs/concepts/fleets/#apply-a-configuration) that includes one CPU host for the router and one or more GPU hosts for the workers. Make sure the CPU and GPU hosts are in the same network.
108
+
Just like `dstack` relies on the SGLang router for cache-aware routing, Prefill–Decode disaggregation also requires a [gateway](../../docs/concepts/gateways.md#sglang) configured with the SGLang router.
* The router replica group is currently limited to `count: 1` (no HA yet). Support for multiple router replicas for HA is planned.
139
-
* Prefill–Decode disaggregation is currently available with the SGLang backend (Nvidia-dynamo and vLLM support is coming).
129
+
* Because the SGLang router requires all workers to be on the same network, and `dstack` currently runs the router inside the gateway, the gateway and the service must be running in the same cluster.
140
130
* Autoscaling supports RPS as the metric for now; TTFT and ITL metrics are planned next.
131
+
* Prefill–Decode disaggregation is currently available with the SGLang backend (vLLM support is coming).
141
132
142
133
With native support for inference and now Prefill–Decode disaggregation, `dstack` makes it easier to run high-throughput, low-latency model serving across GPU clouds, and Kubernetes or bare-metal clusters.
Copy file name to clipboardExpand all lines: examples/inference/sglang/README.md
+5-23Lines changed: 5 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,8 +179,6 @@ replicas:
179
179
180
180
port: 8000
181
181
model: zai-org/GLM-4.5-Air-FP8
182
-
# SSH fleet containing both router (CPU) and workers (GPU).
183
-
fleets: [pd-disagg]
184
182
185
183
# Custom probe is required for PD disaggregation.
186
184
probes:
@@ -193,31 +191,15 @@ probes:
193
191
194
192
Currently, auto-scaling only supports `rps` as the metric. TTFT and ITL metrics are coming soon.
195
193
196
-
#### SSH fleet
194
+
#### Fleet
197
195
198
-
Create an [SSH fleet](https://dstack.ai/docs/concepts/fleets/#apply-a-configuration) that includes one CPU host for the router and one or more GPU hosts for the workers. Make sure the CPU and GPU hosts are in the same network.
196
+
Create a [fleet](https://dstack.ai/docs/concepts/fleets/) that can provision both a CPU node (for the router replica group) and GPU nodes (for the prefill/decode replica groups).
197
+
You can create an SSH fleet, elastic Cloud fleet (nodes: 0..) or kubernetes cluster. Just don't specify any resource constraints in the fleet, and dstack will automatically provision the correct instances (both CPU and GPU, in the same fleet) based on the resources specified in replicas in the run configuration.
The only requirement is that the router and worker replicas run in the same network. In practice, this typically means using a single fleet where the backend and region are the same or using `placement: cluster` if the backend supports it.
218
200
219
201
!!! note "Gateway-based routing (deprecated)"
220
-
If you create a gateway with the [`sglang` router](https://dstack.ai/docs/concepts/gateways/#sglang), you can also run SGLang with PD disaggregation. This method will be deprecated in the future in favor of running the router as a replica.
202
+
If you create a gateway with the [`sglang` router](https://dstack.ai/docs/concepts/gateways/#sglang), you can also run SGLang with PD disaggregation. This method is deprecated and will be disallowed in a future release in favor of running the router as a replica.
0 commit comments