1 Answer
1

Your 2nd and other acceptors will not be able to bind() into port, so no, you cannot use many acceptors on same port. You can run many async_accept at a time, their handlers can fire in different threads. But, in my application i have only one active async_accept at a time and its enough for me under heavy load.

Thanks! Is there any sense do this in the NUMA-system: create separate pools of threads for each CPU (not cores), bind these threads (set affinity) to cores of this CPU, and for each pool to create one acceptor binded (set affinity) to the same CPU? Because sync between two CPUs and two Cores in single CPU have different latency.
–
AlexJun 19 '13 at 10:40

@Alex i think you will not be able to get benefit from such lowlewel optimizations, while using such highlevel framework as ASIO
–
PSIAltJun 19 '13 at 12:26

Ok. But how many connections I can proccess by using boost::asio or how many (around how much) connections you have reached on your hardware in a heavy load project?
–
AlexJun 19 '13 at 18:27

@Alex currently we have about 30k connections on each frontend. CPU is about 60% idle, load average 1.. Currently we have bottleneck on memory(8G) and fd descriptors, its subject to optimizations soon
–
PSIAltJun 19 '13 at 18:41