Skip to content

Per-instance UUID IDENTITY for daemon AsyncReqMessageClient (#69920) - #69922

Open
dwoz wants to merge 1 commit into
saltstack:3008.xfrom
dwoz:dwoz/perf/zmq-identity-slot-cap-3008x
Open

Per-instance UUID IDENTITY for daemon AsyncReqMessageClient (#69920)#69922
dwoz wants to merge 1 commit into
saltstack:3008.xfrom
dwoz:dwoz/perf/zmq-identity-slot-cap-3008x

Conversation

@dwoz

@dwoz dwoz commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Closes #69920

Summary

Give each daemon AsyncReqMessageClient a per-instance uuid.uuid4().hex as
its ZMQ IDENTITY slot, replacing the earlier process-wide
_REQ_IDENTITY_SLOT counter. Each RequestClient is opened and
closed by Salt itself, so a per-instance UUID matches the object's
lifetime and gives the master's ROUTER routing-id table a 1:1 mapping
to a client we control. Fork inheritance of the earlier counter (root
cause of #69753) is impossible by construction -- each child draws a
fresh UUID.

What this is not

This does not bound the master ROUTER routing-id table growth.
That story (MWorkerQueue RSS creep under sustained REQ churn) needs
a master-side eviction, tracked separately.

Also removed

  • _REQ_IDENTITY_SLOT module counter
  • SALT_REQ_IDENTITY_SLOT_MAX env override (never shipped in a release)

Test plan

  • New unit tests: tests/pytests/unit/transport/test_zeromq_identity_uuid.py
  • _CLI_IDENTITY_SLOT for CLI-role sockets is unchanged.

…altstack#69920)

Give each daemon AsyncReqMessageClient a per-instance uuid.uuid4().hex
as its ZMQ IDENTITY, replacing the earlier process-wide
_REQ_IDENTITY_SLOT counter and SALT_REQ_IDENTITY_SLOT_MAX cap.  Each
RequestClient is opened and closed by Salt itself, so a per-instance
UUID matches the object's lifetime and gives the master ROUTER's
routing-id table a 1:1 mapping to a client we control.  Fork
inheritance of the earlier counter -- root cause of saltstack#69753 -- is
impossible by construction, since each child draws a fresh UUID.
@dwoz
dwoz force-pushed the dwoz/perf/zmq-identity-slot-cap-3008x branch from 78bdf7f to 098e4be Compare August 13, 2026 11:46
@dwoz dwoz changed the title Bound ZMQ identity slot pool to cap MWorkerQueue growth under REQ churn Per-instance UUID IDENTITY for daemon AsyncReqMessageClient (#69920) Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants