[Perf] API-server scaleout with many-to-many server-engine comms (#17546)
This commit is contained in:
+5
-1
@@ -2420,6 +2420,7 @@ def make_zmq_socket(
|
||||
socket_type: Any,
|
||||
bind: Optional[bool] = None,
|
||||
identity: Optional[bytes] = None,
|
||||
linger: Optional[int] = None,
|
||||
) -> Union[zmq.Socket, zmq.asyncio.Socket]: # type: ignore[name-defined]
|
||||
"""Make a ZMQ socket with the proper bind/connect semantics."""
|
||||
|
||||
@@ -2439,7 +2440,7 @@ def make_zmq_socket(
|
||||
buf_size = -1 # Use system default buffer size
|
||||
|
||||
if bind is None:
|
||||
bind = socket_type != zmq.PUSH
|
||||
bind = socket_type not in (zmq.PUSH, zmq.SUB, zmq.XSUB)
|
||||
|
||||
if socket_type in (zmq.PULL, zmq.DEALER, zmq.ROUTER):
|
||||
socket.setsockopt(zmq.RCVHWM, 0)
|
||||
@@ -2452,6 +2453,9 @@ def make_zmq_socket(
|
||||
if identity is not None:
|
||||
socket.setsockopt(zmq.IDENTITY, identity)
|
||||
|
||||
if linger is not None:
|
||||
socket.setsockopt(zmq.LINGER, linger)
|
||||
|
||||
# Determine if the path is a TCP socket with an IPv6 address.
|
||||
# Enable IPv6 on the zmq socket if so.
|
||||
scheme, host, _ = split_zmq_path(path)
|
||||
|
||||
Reference in New Issue
Block a user