Skip to content

Move ZMQ socket bind to poll thread to prevent blocking - #73

Open
Yash Pandit (ypcisco) wants to merge 2 commits into
Azure:202506from
ypcisco:zmqserver_move_bind_to_poll_thread
Open

Move ZMQ socket bind to poll thread to prevent blocking#73
Yash Pandit (ypcisco) wants to merge 2 commits into
Azure:202506from
ypcisco:zmqserver_move_bind_to_poll_thread

Conversation

@ypcisco

Copy link
Copy Markdown

Why I did it

  • In scale scenarios, zmq_bind() can take significant time to complete
  • Orchestration agent gets blocked during ZmqServer initialization
  • Synchronous bind in main thread delays startup and impacts system responsiveness

How I did it

  • Moved zmq_bind() call from ZmqServer::bind() to mqPollThread()
  • Socket creation and configuration remain in main thread
  • Actual bind operation now happens in background poll thread

Signed-off-by: Yash Pandit <ypcisco@gmail.com>
Signed-off-by: Yash Pandit <ypcisco@gmail.com>

@anish-n Anish Narsian (anish-n) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add some more details about what scale scenario causes zmq bind to be slow, and how does that scenario result in slowness?

@ypcisco

Copy link
Copy Markdown
Author

Could we add some more details about what scale scenario causes zmq bind to be slow, and how does that scenario result in slowness?

Anish Narsian (@anish-n) this PR doesn't resolve the zmq_bind slowness but prevents it from blocking orchagent. We don't yet know what causes zmq_bind to take 4-5 minutes during scale scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants