Posted By pchang on 09/02/2008 8:00 PM
You can set up a normal pool and choose whatever load balancing method you want. The iRule would be something like this:
when LB_SELECTED {
use [LB::server addr] to figure out what server was selected so you can do your string replacement logic on the host name
HTTP::header replace "Host"
}
ok, after playing around, I don't think this will work. I need to add different replacement strings depending on which pool member the request will be sent to.
For example, if the LB is going to send the request to pool member 01 (servername01), I need it to change the host header to servername01. If it is going to send it to pool member 02, I need it to change the host header to servername02. If it is going to send it to pool member 03, I need it to change the host header to servername03. If it is going to send it to pool member 04, I need it to change the host header to servername04. Does that make sense?
Thanks!