Does someone know how to setup Source hashing with regex?
What I want is the follwing: I have 3 ubuntu servers. 1 Loadbalancer, the second is transparent and the third has a caching mechanism (Apache TrafficServer). The second and third are connected to a webserver and the loadbalancer is the first hop for a connection.
When someone has a IP-address with a even last number, we will be send to the second server that will serve the webpage. When someone has a IP-address with a uneven number, will be send to the first server server that will send cache to the user.
The main reason is that I can proof that the one with a caching-mechanism is faster. A client wants to see that... It's kind of a A-B testing.
I do have to use SOURCE HASHING, which is supported by IPVSADM, but I cannot find a way to use some kind of regex so I can configure that the even IP-addresses will go to the first server, and people with an uneven number, they will go to the second server....
Does someone have an idea to create this? It's no problem to build a script. The only thing is how I use that in IPVSADM.
Hope that someone has an idea....