Forum Discussion

coda6_52611's avatar
coda6_52611
Icon for Nimbostratus rankNimbostratus
Nov 02, 2011

Dynamically Load Balanceacross TCP ports

We need some help is setting up load balancing for a set of web services, and a couple of web pages, here is our setup:

 

 

There are three types of ports in use:

 

 

Port 8080 is a web site used for an administration portal.

 

 

Ports 8081-8999 are ports used for stateless web services (https traffic with SSL being managed by F5).

 

 

Ports 9000-9999 are ports used for stateless web services (http traffic only)

 

 

The ports are hosted by three main servers in a pool run in this configuration:

 

 

server 1 hosts port 8080 as a primary.

 

 

server 2 hosts port 8080 as a secondary (in case of failure), and ports 8081-8999, and ports 9000-9999

 

 

server 3 hosts ports 8081-8999, and ports 9000-9999

 

 

What need is for the traffic to go to the VIP, each request will have a port number attached, and we want the F5 to check each machine in the pool for that specific port and direct the request based on the availability of the port. So for instance if I make an HTTPS request to port 8080 using the VIP, I expect the F5 to look at server 1, 2, and 3 and determine which ones are running port 8080 and direct my request there. The same is expected for ports 8081-8999 (SSL) and port 9000-9999.

 

 

One issue is that the servers hosting the ports, can have a service on any port at any time, so for instance I could make a web service request to port 8700 on the VIP. The service can make the port available on either server 2, server 3, or both possibly, depending on the needs of the service. This type of dynamic change is needed as part of our SOA environment, based on the number of services, we need to figure out how to manage this dynamically in the F5 without having to change an iRule every time we add a new service.

 

 

 

We are not experienced with building iRules so any help would be greatly appreciated.

 

 

 

Thank You

 

  • not sure if i understand correctly. i may create 3 pools; one for each portal type. for the pool which has primary and secondary pool member, i would use priority group activation. so, traffic will be sent to the primary pool member unless it is down.

     

     

    priority group activation

     

    http://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm_configuration_guide_10_1/ltm_pools.html

     

     

    the virtual server and pool are listening on "any" port.

     

     

    for health check, i might not use it but instead using LB_FAILED event to pick up another pool member if the selected pool member does not have that service running.

     

     

    LB_FAILED event

     

    http://devcentral.f5.com/wiki/iRules.LB_FAILED.ashx