[router] add basic usage doc (#8640)

This commit is contained in:
Simo Lin
2025-07-31 18:11:48 -07:00
committed by GitHub
parent 2886e23dbd
commit f6f46f4629

View File

@@ -54,12 +54,35 @@ pip install -e .
```bash
# Build Rust components
cargo build
```
#### Launch Router with Worker URLs in regular mode
```bash
# Launch router with worker URLs
python -m sglang_router.launch_router \
--worker-urls http://worker1:8000 http://worker2:8000
```
#### Launch Router with Worker URLs in prefill-decode mode
```bash
# Note that the prefill and decode URLs must be provided in the following format:
# http://<ip>:<port> for decode nodes
# http://<ip>:<port> bootstrap-port for prefill nodes, where bootstrap-port is optional
# Launch router with worker URLs
python -m sglang_router.launch_router \
--pd-disaggregation \
--policy cache_aware \
--prefill http://127.0.0.1:30001 9001 \
--prefill http://127.0.0.2:30002 9002 \
--prefill http://127.0.0.3:30003 9003 \
--prefill http://127.0.0.4:30004 9004 \
--decode http://127.0.0.5:30005 \
--decode http://127.0.0.6:30006 \
--decode http://127.0.0.7:30007 \
--host 0.0.0.0 \
--port 8080
````
## Configuration
### Logging