Forum Discussion
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.
1 Reply
- Vijay_E
Cirrus
Your question has been answered here: https://devcentral.f5.com/questions/changing-destination-pool-tcp-port-via-irules
I would recommend creating multiple pools if your intention is to use just 2-3 different pools. However, if it is more in number or if you expect the number to grow, the example link should be useful.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com