cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
498
Views
0
Helpful
1
Replies

Balance srcip algorithm

torleifga
Level 1
Level 1

Hi,

how does the CSS decide which service a request is sent to when using 'balance srcip'?

The documentation states:

'balance srcip - Source IP address division algorithm. The CSS directs all client requests coming from the same source IP address to the same service.'

I'd like to know if requests are distributed evenly between services when all clients are on the same network segment, e.g.

Regards,

Torleif

1 Reply 1

Gilles Dufour
Cisco Employee
Cisco Employee

Here is the alrgorithm from the code

value = *(uint32_t *)p;

fvalue[0] = value;

fvalue[1] = 0;

/* reverse the bytes and stick it into fvalue[1] */

<...>

value = Crc32( (uint8_t *)(fvalue), 8 );

value = value % numServices;

This should provide equal loadbalancing over a large number of ip.

Not sure for small subnets.

You can use roundrobin with sticky srcip.

Gilles.

Review Cisco Networking for a $25 gift card