Forum Discussion

hatim1's avatar
hatim1
Icon for Nimbostratus rankNimbostratus
Mar 16, 2017

LB DB servers

Hi all,

 

I am looking into the way to load balance mySQL DB servers.

 

I would like to send traffic to pool-A if URI start with "X" and to pool-B when it starts with "Y".

 

I wrote the following but it doesn't seem top work;

 

when CLIENT_ACCEPTED { TCP::collect 100 }

 

when CLIENT_DATA { set payload [TCP::payload] switch -glob $payload { "X" { pool pool-A } "Y" { pool pool-B } }

 

}

Thanks for your help.