Forum Discussion

ASP_Palermo_311's avatar
ASP_Palermo_311
Icon for Nimbostratus rankNimbostratus
Feb 22, 2017

Balancing to Tomcat servers

I have many servers in a "Pools List" that are running Tomcat, now the full uri include: I want balance among the "Pools", but the user request mustn't include "port" (8080) or path, like: Is it possible do it with a iRule??

 

2 Replies

  • Assuming you want to send traffic to the pool of tomcat servers whenever the host header does not have ":8080", you can use something like this:

    when HTTP_REQUEST {
    if { not ([HTTP::host] contains ":8080") } {
    pool POOL_TOMCAT_Servers
    }
    }
    
  • Hi,

    you must :

    • create the VS listening on port 80
    • create pool with member port 8080
    • create an irule or LTM policy redirecting URI / to /path_to_app/index.jsp
    • change Tomcat configuration with following configuration to write response page with external URLs (to prevent rewrite needs on the F5):

    file /etc/tomcat6/server.xml

    
    

    if the external service is HTTPS: