Preference Order Load Balancing Algorithm
Overview
Starting from version 22.1.1, NSX Advanced Load Balancer has added a new algorithm called preference order within the GSLB Service pool. This algorithm can be used to load balance the traffic among the GSLB pool members.
To use this algorithm, you must assign the preference order to each pool member. Once preference order is assigned, NSX Advanced Load Balancer will direct the traffic to the first available member in ordered list specified by user as per the preference order.
Lower the preference order, high is the preference which means that the DNS Service chooses the member with the lowest preference that is operationally up.
Configuring Preference Order Algorithm to Add Priority to GSLB Pools
Using the UI
-
Navigate to Applications > GSLB Services.
-
Click Create or edit icon to open the Edit GSLB Service window. For complete configuration steps, see GSLB Service Configuration.
-
Under GSLB pool, click Add Pool to open New GSLB Pool window.
-
Enter the GSLB pool details. For more details, see GSLB Pool Editor.
-
Select Preference Order from the Pool Members Load Balancing Algorithm drop-down menu.
-
Under Pool Member, enter a Preference Order value ranging from 1 to 128.
-
Click Done to save the New GSLB Pool configuration.
-
Click Save.
Using the CLI
- Set the GSLB service pool algorithm to
gslb_algorithm_preference_order
.[admin:ctrl]: > configure gslbservice GS-1 Updating an existing object. Currently, the object is: +----------------------------------+--------------------------------------------------+ | Field | Value | +----------------------------------+--------------------------------------------------+ | uuid | gslbservice-88ad049f-e188-40f3-90de-235c6cb676a2 | | name | GS-1 | | domain_names[1] | foo.avi.com | | groups[1] | | | name | GS-1-pool | | priority | 9 | | algorithm | GSLB_ALGORITHM_ROUND_ROBIN | | members[1] | | | ip | 10.10.10.1 | | ratio | 1 | | enabled | True | | resolve_fqdn_to_v6 | False | | preference_order | 1 | | members[2] | | | ip | 10.10.10.2 | | ratio | 1 | | enabled | True | | resolve_fqdn_to_v6 | False | | preference_order | 1 | | enabled | True | | down_response | | | type | GSLB_SERVICE_DOWN_RESPONSE_NONE | | controller_health_status_enabled | True | | health_monitor_scope | GSLB_SERVICE_HEALTH_MONITOR_ALL_MEMBERS | | enabled | True | | use_edns_client_subnet | True | | wildcard_match | False | | site_persistence_enabled | False | | pool_algorithm | GSLB_SERVICE_ALGORITHM_PRIORITY | | min_members | 0 | | resolve_cname | False | | is_federated | True | | tenant_ref | admin | +----------------------------------+--------------------------------------------------+ [admin:ctrl]: gslbservice> groups index 1 [admin:ctrl]: gslbservice:groups> algorithm gslb_algorithm_preference_order Overwriting the previously entered value for algorithm
- Configure
preference_order
value at GSLB service pool member level.[admin:ctrl]: gslbservice:groups> members index 1 [admin:ctrl]: gslbservice:groups:members> preference_order 2 Overwriting the previously entered value for preference_order [admin:ctrl]: gslbservice:groups:members> save [admin:ctrl]: gslbservice:groups> members index 2 [admin:ctrl]: gslbservice:groups:members> preference_order 4 Overwriting the previously entered value for preference_order [admin:ctrl]: gslbservice:groups:members> save save[admin:ctrl]: gslbservice:groups> save [admin:ctrl]: gslbservice> save
The overall configuration is as shown below:
+----------------------------------+--------------------------------------------------+ | Field | Value | +----------------------------------+--------------------------------------------------+ | uuid | gslbservice-88ad049f-e188-40f3-90de-235c6cb676a2 | | name | GS-1 | | domain_names[1] | foo.avi.com | | groups[1] | | | name | GS-1-pool | | priority | 9 | | algorithm | GSLB_ALGORITHM_PREFERENCE_ORDER | | members[1] | | | ip | 10.10.10.1 | | ratio | 1 | | enabled | True | | resolve_fqdn_to_v6 | False | | preference_order | 2 | | members[2] | | | ip | 10.10.10.2 | | ratio | 1 | | enabled | True | | resolve_fqdn_to_v6 | False | | preference_order | 4 | | enabled | True | | down_response | | | type | GSLB_SERVICE_DOWN_RESPONSE_NONE | | controller_health_status_enabled | True | | health_monitor_scope | GSLB_SERVICE_HEALTH_MONITOR_ALL_MEMBERS | | enabled | True | | use_edns_client_subnet | True | | wildcard_match | False | | site_persistence_enabled | False | | pool_algorithm | GSLB_SERVICE_ALGORITHM_PRIORITY | | min_members | 0 | | resolve_cname | False | | is_federated | True | | tenant_ref | admin | +----------------------------------+--------------------------------------------------+ [admin:ctrl]: >
Reference
Document Revision History
Date | Change Summary |
---|---|
January 31, 2023 | sUpdated Configuring Preference Order Algorithm to Add Priority to GSLB Pools section (version 22.1.3) |
July 15, 2022 | Created the article for Preference Order Load Balancing Algorithm (version 22.1.1) |