title: What is the overhead for creating multiple ZeroMQ sockets?
body: <p>I try to build a point to point channel, using a <strong><code>ZMQ_PAIR</code></strong> socket. But the <code>ZMQ_PAIR</code> socket only allows an exclusive connection, which it means that if one peer (A) is connected to another peer (B), other peers can't connect to B, until the A disconnects from the B.</p>
  
  <p>So, the first solution that comes into my mind is to set up as many <code>ZMQ_PAIR</code> sockets as the number of peers in the network and polling the sockets to multiplex the events from other peers. The problem with this is to manage lots of sockets which might incur non-negligible overheads.</p>
  
  <p>But I don't have experimental data about the overheads of managing multiple sockets such as the time to create 50,000 <code>ZMQ_PAIR</code> sockets or the time to poll 50,000 <code>ZMQ_PAIR</code> sockets. Of course, I can do it myself, but I wonder if there is any existing experiment conducted by researchers or network developers who used ZeroMQ.</p>
  
  <p>(I don't want any proxy or <code>REQ/REP</code> pattern. Using proxy incurs some performance degradation and I want pure peer-to-peer network. And <code>REQ/REP</code> pattern is inherently synchronous communication which is not my purpose now.)</p>