LiorO
October 28th, 2009, 02:28 AM
Hi,
I'm writing a server application which sends streams to clients at high throughputs.
Since one network adapter is not enough for all streams, I would like to take advantage of all network adapter available.
The application performs some kind of load balancing by binding socket to specific network adapters according to some load balancing algorithm.
I'm using Socket.Bind in order to determine from which adapter to send the data from.
I'm encountering a problem which I could not get an answer anywhere, maybe one of you guys could help me.
I have two network adapters: 10.60.1.1 and 10.60.1.2.
For example, the application would like to send the stream from 10.60.1.1.
1. The application performs socket.Bind(10.60.1.1) and the stream is sent from this socket.
2. By looking at perfmon I notice that the data is actually sent from 10.60.1.2.
3. After few hours of knocking my head to the wall I found that 10.60.1.2 has a lower routing metric, therefore, the OS decides to sent the data from 10.60.1.2.
I have two questions please:
1. Is there any way to bypass the routing table, I mean something like ForceBind or something like that?
2. In case there is no way to do (1), in case all network adapters have the same routing metric, can I be sure that Socket.Bind will result in sending the data from where I actually meant?
Thanks a lot.
I'm writing a server application which sends streams to clients at high throughputs.
Since one network adapter is not enough for all streams, I would like to take advantage of all network adapter available.
The application performs some kind of load balancing by binding socket to specific network adapters according to some load balancing algorithm.
I'm using Socket.Bind in order to determine from which adapter to send the data from.
I'm encountering a problem which I could not get an answer anywhere, maybe one of you guys could help me.
I have two network adapters: 10.60.1.1 and 10.60.1.2.
For example, the application would like to send the stream from 10.60.1.1.
1. The application performs socket.Bind(10.60.1.1) and the stream is sent from this socket.
2. By looking at perfmon I notice that the data is actually sent from 10.60.1.2.
3. After few hours of knocking my head to the wall I found that 10.60.1.2 has a lower routing metric, therefore, the OS decides to sent the data from 10.60.1.2.
I have two questions please:
1. Is there any way to bypass the routing table, I mean something like ForceBind or something like that?
2. In case there is no way to do (1), in case all network adapters have the same routing metric, can I be sure that Socket.Bind will result in sending the data from where I actually meant?
Thanks a lot.