Reputation: 676
My application consists of a UDP server receiving high traffic.
I am thinking to increase the capacity throughput of the application and threading is not an option. So multiple instances of the same process is considered.
I was thinking whether it is possible to reuse the exact same UDP socket for sending out traffic between two different processes. I am interested only for sending since receiving is handled in another way.
Will setting option on socket to SO_REUSEADDR
help here?
Upvotes: 1
Views: 4052
Reputation: 5806
You can not create two servers in two different process because second request for binding on same port will be failed so you have to use SO_REUSEPORT
option which allows socket to bind
follow Let two UDP-servers listen on the same port? for your reference.
Upvotes: 4