Forum Discussion

Si_Tran_89480's avatar
Si_Tran_89480
Icon for Nimbostratus rankNimbostratus
Jul 12, 2017

Irule question

Is it possible to write an Irule that can redirect certain percent of traffic to different pools?

 

thanks

 

Si

 

3 Replies

  • P_K's avatar
    P_K
    Icon for Altostratus rankAltostratus

    I don't think so. It only directs traffic depending on certain conditions like URI, CLient IP etc..

     

    You can distribute traffic among different servers by configuring ratio based load balancing method or something similar.

     

  • eey0re's avatar
    eey0re
    Icon for Cirrostratus rankCirrostratus

    Yes - you would either need a global counter (probably using a table - look at the

    class
    function) to send every nth request to a different pool, or use a random number generator like this example from the codeshare.

  • I am not able to think of the possible scenario when you would actually need this to be done.