Commit 31312ab
committed
[Core] zmq: bind only to 127.0.0.1 for local-only usage
When running with `--tensor-parallel-size` greater than `1`, I noticed
that the zmq socket opened for broadcasting to workers was listening on
all interfaces. This change makes both the listening-side and (XPUB) and
the receiving side (SUB) use `127.0.0.1` instead of `*` when we know the
usage is local-only.
I also added debug logging to show which port numbers are in use by zmq.
By listening on all interfaces, an external party could connect and
subscribe to data from the `XPUB` socket if firewall settings allow it.
The data received is not particularly useful (it's tensor metadata), but
it's still unexpected and undesirable behavior to allow connections from
a wider set of potential sources than necessary.
It is already possible to control which IP address is used for the
remote case by setting the `VLLM_HOST_IP` environment variable.
Signed-off-by: Russell Bryant <[email protected]>1 parent 1b6de83 commit 31312ab
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| |||
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
215 | | - | |
| 217 | + | |
| 218 | + | |
216 | 219 | | |
217 | 220 | | |
218 | 221 | | |
| |||
255 | 258 | | |
256 | 259 | | |
257 | 260 | | |
258 | | - | |
259 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
260 | 264 | | |
261 | 265 | | |
262 | 266 | | |
| |||
270 | 274 | | |
271 | 275 | | |
272 | 276 | | |
273 | | - | |
274 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
275 | 280 | | |
276 | 281 | | |
277 | 282 | | |
| |||
0 commit comments