Customize Application Rules
Application Rules — A way to manage traffic based on specific requests. You can create advanced load balancing rules that cannot be configured through Application Profiles or other services on the Edge router.
Create a rule
-
From the Control Panel, open the Cloud Director panel: from the top menu, click Products → VMware-based Cloud → Cloud Director.
-
Open the virtual data center page.
-
Go to Networking → Edges.
-
Open the page of the desired Edge.
-
Press SERVICES.
-
Open the Load Balancer → Application Rules tab.
-
Press +.
-
Enter the name of the rule.
-
Insert a script that will determine the balancing:
In the other pool
To an external resource
If the primary pool fails, traffic can be redirected to another balancing pool. For this rule to work, multiple pools must be configured on the balancer. All members of the primary pool must be in the
down
state. Script view:acl pool_down nbsrv(<primary_pool_name>) eq 0
use_backend <secondary_pool_name> if <primary_pool_name>Specify:
<primary_pool_name>
— name of the primary pool;<secondary_pool_name>
— name of the pool to which traffic will be redirected.
If all members of the main pool are
down
, traffic can be redirected to an external website using a script:acl pool_down nbsrv(<pool_name>) eq 0
redirect location <url> if pool_downSpecify:
<pool_name>
— name of the main pool;<url>
— Web site URL.
-
Press KEEP.
Add a rule to a virtual server
- From the Control Panel, open the Cloud Director panel: from the top menu, click Products → VMware-based Cloud → Cloud Director.
- Open the virtual data center page.
- Go to Networking → Edges.
- Open the page of the desired Edge.
- Press SERVICES.
- Open the Load Balancer → Virtual Servers tab.
- Highlight the virtual server.
- Click .
- Open the Advanced tab.
- Press +.
- Add a rule.