Forum Discussion

Sajan_Mania_381's avatar
Sajan_Mania_381
Icon for Altostratus rankAltostratus
Mar 18, 2019

How to Load balance the traffic coming from different country ?

If we want to direct traffic coming from Country 1 to server A and traffic coming from Country 2 to server B and rest of the traffic should go to server C. How to achieve this?

 

  • Snl's avatar
    Snl
    Icon for Cirrostratus rankCirrostratus

    hope this sample irule help to start..

    when CLIENT_ACCEPTED {
     switch [whereis [IP::client_addr] country] {
     US { pool serveA_pool }
     CA { pool serverB_pool }
         default { pool serverC_pool}
    }
     }