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 the Application Profiles or by using other services on the Edge router.
Create a rule
-
From control panel open the Cloud Director panel: VMware-based cloud → Cloud Director.
-
Open the virtual data center page.
-
Go to the section Networking → Edges.
-
Open the page of the desired Edge.
-
Click SERVICES.
-
Open the tab Load Balancer → Application Rules.
-
Click +.
-
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 the rule to work, multiple pools must be configured on the balancer. All members of the primary pool must be in the state of
down
. 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 main pool;<secondary_pool_name>
— name of the pool to which the traffic will be redirected.
If all members of the main pool are in the state of
down
The 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.
-
Click KEEP.
Add a rule to a virtual server
- From control panel open the Cloud Director panel: VMware-based cloud → Cloud Director.
- Open the virtual data center page.
- Go to the section Networking → Edges.
- Open the page of the desired Edge.
- Click SERVICES.
- Open the tab Load Balancer → Virtual Servers.
- Highlight virtual server.
- Click .
- Open the tab Advanced.
- Click +.
- Add rule.