Hi All, I am doing some simple experiments using the majordomo broker code found here (https://github.com/zeromq/majordomo). Instead of using a single *broker* to process the requests and replies, I start two *brokers* such that one of them handles all the requests, and the other handles all the replies. Here are some details
1. For both the brokers, the HWM on send/receive is set to 40k. 2. TCP send/receive buffer is set to 10 MB. 3. Worker’s HWM on send/receive is set to 100k. 4. Client’s HWM on send is set to 100, and on receive is set to 100k. 5. All the clients run on the same machine. All the workers (10 workers running the echo service), and the two broker instances run on a single ec2 instance. Client program simply sends all the requests in a blast (all at once). My understanding of HWM on send is that when the HWM is reached, the socket will block. That is why I have set the client's send HWM to 100 messages, hoping that this would give me some sort of flow control. Experiments: Note: all the clients send messages which are 85 bytes. Blast size: 10,000 # of clients Time (seconds) Notes 1 3 2 4 4 6 6 9 8 15 10 Only around 2 or 3 clients would receive all the replies, while the rest would receive around 7,500 replies. 12 Things tend to get worse as the number of clients is increased. Blast size: 1000 # of clients Time (seconds) Notes 1 1 4 1 8 1 16 2 32 4 64 9 128 Around 3-4 clients received only 500 replies So my concern is mainly to do with establishing the reliability of the broker, so that it can be used in a production environment. When I have set the broker's HWM to 40k, then why does it drop packets when the blast size is less than 40,000 (like the ones I have used above)? I know that the zmq guide says that the allocated capacity of the pipe will be around 60% of what we have set it to, but 10,000 is only 25% of what I have set it to (40,000). Just the same way, 1000 is only 10%. So I don't understand what causes the broker to lose packets. *Please help me in understanding this behavior.* I read in the zmq guide (Chapter 7: transferring large files) the concept of flow control, where in a client sends a bunch of requests, and then it sends one request for every reply that it receives. *Is that the only way to have the majordomo broker handle a large number of clients ( say in the thousands) reliably ? If yes, then the throughput will be quite low, isn't it?* Thank you for your time! Sincerely, Vishal
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
