Forum Discussion
abachman_72712
Nimbostratus
Jul 31, 2009Traffic destined for certain port
New to working with iRules.
I need to write an iRule for Soap HTTP call. The HTTP traffic will need to go to a certain port listening on the server pool (IBM WebSphere JVM on port 9082), but traffic will need to go to primary server all the time unless that server is down. Created a VIP server on BigIP with service port 9082. Traffic will be generated outbound with a DNS name that points to this BigIP virtual server ip. Do they also need to add the port(9082)with the header as well? (e.g. dnsname:9082)
when HTTP_REQUEST {
if { [HTTP::header "Content-Type"] contains "SoapAction" } {
node 10.10.10.15 9082
} else {
pool mysoap_pool
}
}
Any suggestions would be helpful.
Thanks
TA
- hoolio
Cirrostratus
When the app sends the client a reference to the VIP, it should include the port of the VIP if it's not 80 for HTTP or 443 for HTTPS. It shouldn't matter for load balancing what is in the HTTP host header unless you specifically use an iRule to check the Host header value. - abachman_72712
Nimbostratus
Thanks. - abachman_72712
Nimbostratus
Is there a way to map ports on bigIP. For example, have client traffic browse on port 80, and when the traffic gets to the bigIP the bigIP can map that traffic to a different port say 9080? - hoolio
Cirrostratus
If you want to use a set of X number of servers normally and only use a set of Y servers if the first are down, you can do this without an iRule using priority groups. - abachman_72712
Nimbostratus
I have the virtual server set to HTTP 80 with Port translation enabled, and the pool members are configured for port 9082. The http request is getting a HTTP 404 error in return but the URL on port 9082 of the server is up and online. - hoolio
Cirrostratus
You should see the same behavior through LTM as you do direct to the host.when HTTP_REQUEST { Prepend /website if it's not there already if {not ([HTTP::uri] starts_with /website)}{ HTTP::uri "/website[HTTP::uri]" } }
- abachman_72712
Nimbostratus
Thanks Hoolio. - hoolio
Cirrostratus
In order to inspect or modify the HTTP content, you need to add a profile which tells LTM to parse the connection as HTTP. For greatest functionality, you can use an HTTP profile versus a Fast HTTP profile. You can start with the default HTTP profile. It should work as is. If you find you need to customze any of the settings, you can create a copy of the HTTP profile and modify that one.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects