Manual Chapter : BIG-IP Solutions Guide v4.6.2: Monitoring and Load Balancing to Different Applications on the Same Port

Applies To:

Show Versions Show Versions

BIG-IP versions 1.x - 4.x

  • 4.6.2
Manual Chapter


16

Monitoring and Load Balancing to Different Applications on the Same Port


Configuring monitoring and load balancing to different applications on the same port

Using port translation and monitors functionality, the BIG-IP system can monitor and load balance different applications on the same port. For example, requests for cgi, asp and HTML pages can all be serviced through port 80. However, you may want to monitor the health and limit connections for each of these three applications separately.

You can configure a virtual server that references a rule that directs requests to three different pools. This allows the BIG-IP system to collect separate statistics at the pool and pool member level. With port translation enabled, however, all pool members must reference a node on port 80, and pool members in different pools all point to the same node. Because health monitoring is performed at the node level, and the pool members refer to the same node, members in different pools share the same health state. The same is true of node connection limits. However, because the virtual port and the actual port on the servers are the same, port translation is no longer necessary. If you disable port translation for each pool you want to monitor, you can change the port of the members in these pools even though traffic through the system continues to have a client destination port of 80. If you change the port for members of some of the pools, separate nodes are created for each pool member. Note that you can select any port numbers: the port numbers that you specify are not important. Once separate nodes are created, it is possible to have separate health states and connection limits.

You can then create multiple monitor instances with the same destination, as long as the monitor instances are associated with different monitor templates. (The destination of a monitor instance is derived from the destination address and port of the associated monitor template. If destination address is not specified in the monitor template, the associated node address and port are used.)

You can create monitor instances that monitor port 80, but use three different methods specific to the applications. These monitor instances then set the health state of the nodes which are specific to the application. For example, if the cgi monitor instance with the identifier (1.1.1.2:80:http_cgi) does not receive the expected response to a request, the health state of the associated node with identifier (1.1.1.2:81) is set to DOWN. This causes the BIG-IP system to direct traffic away from the cgi_pool pool member with the identifier (1.1.1.2:81) while regular_pool and asp_pool load balancing remain the same. Note that the identifier of the monitor instance is derived from its destination and the name of the associated monitor template. The monitor instance destination is derived from the associated template destination. If the template destination is incomplete, the monitor instance destination is derived from the associated node. In the following example, the http_cgi monitor destination is *:80 and the node is 1.1.1.2:81 resulting in a monitor instance destination of 1.1.1.2:80.


#pools
pool regular_pool {
member 1.1.1.1:80
member 1.1.1.2:80
}
pool cgi_pool {
translate port disable
member 1.1.1.1:81
member 1.1.1.2:81
}
pool asp_pool {
translate port disable
member 1.1.1.1:82
member 1.1.1.2:82
}
#rules
rule app_switch {
if (http_uri ends_with "cgi") {
use pool cgi_pool
}
else if (http_uri ends_with "asp") {
use pool asp_pool
}
else {
use pool regular_pool
}
}
#monitors
monitor http_cgi {
# type http
use "http"
interval 5
timeout 16
dest *:80
send "GET /index.cgi"
recv "200 OK"
username ""
password ""
}
monitor http_asp {
# type http
use "http"
interval 5
timeout 16
dest *:80
send "GET /index.asp"
recv "200 OK"
username ""
password ""
}
node 1.1.1.1:80 1.1.1.2:80 use monitor http
node 1.1.1.1:81 1.1.1.2:81 use monitor http_cgi
node 1.1.1.1:82 1.1.1.2:82 use monitor http_asp

virtual 5.5.5.5:80 use rule app_switch
 

Figure 16.1 Application specific monitors with the same destination


Disabling port translation on a per-pool basis

In order to configure monitoring and load balancing to different applications on the same port, you must disable port translation at the pool level. Port translation uses an alias port that identifies a specific node managed by the BIG-IP system to the external network. You disable port translation for specific pools. Port translation for pools is enabled by default.

To configure port translation for a pool using the Configuration utility

  1. In the navigation pane, click Pools.
    The Pools screen opens.
  2. Select a Pool or click the Add button.
    The Pool Properties or Add Pool screen opens.
  3. In the Pool Properties or Add Pool screen, clear the Enable Port Translation box.
  4. Click Done.

To configure port translation for a pool from the command line

To configure port translation at the pool level from the command line, type the bigpipe pool command, using the appropriate arguments, as follows:

bigpipe pool <pool_name> translate port disable


Additional configuration options

For more information on configuring monitors and pools on the BIG-IP system, refer to the following documentation: