rfelsburg_12081
Mar 20, 2013Nimbostratus
Question regarding port passthrough to pools
Basically, we have a pool setup with each member being
member1.example.com:0
member2.example.com:0
with a vip of lb.example.com listening on all ports.
Each pool member recieves the port passed by the client via the URL. I'm looking to change the port that is passed to the pool member though, so that if the user enters: lb.example.com:8080, the port passed to the member pool is 8082 instead of 8080, as if the user had entered lb.example.com:8082.
I wrote my existing iRule, thinking that the port passed to the pool, was simply the one in the Host header. It's not. Even after modifying the host header, the connection goes onto the original port. Any thoughts? Please let me know if I haven't explained it well enough, I'll snag actual definitions.
For a little scope, the idea is to abstract the port away from the originating URL, and the pool members completely. So that the iRule alone controls what port is gone to, and instead of having a pool for each port, we have a single pool that picks up the port from the iRule.
when HTTP_REQUEST {
set new_host "[getfield [HTTP::host] : 1]:8082"
HTTP::header replace Host "$new_host"
}