Eduardo_SCR_151
Jul 11, 2016Nimbostratus
setting pool and tcp port via iRule
Hello. I have to create an iRule to do the following:
- I have a pool listening all tcp ports
- depending on the hostname, I need to send the connection to the servers in a different tcp port
One option, is to create one pool for each tcp port. But I would prefer, if possible, to set the pool listenning in all tcp ports, and then modify the port via iRule. This would be :
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"hostname1" {
pool genericpool
set port 100 }
"hostname2" {
pool genericpool
set port 200 }
}
}
My main concern is about the sentence "set port". I was not able to find examples like this, I only found examples specifying pool-member-port.
Thanks, Eduardo.