Jump to content
Welcome to our new Citrix community!
  • Priority Load Balancing: High availability simplified

    • Validation Status: Validated
      Has Video?: No

    Priority Load Balancing: High availability simplified

    Submitted March 23, 2022

    Author: Raghav SN


    One primary design consideration to keep in mind when building a production application deployment is that any software or hardware component in your deployment can fail. That’s why you should always have at least one level of redundancy for each component. The ability for your apps to endure software or hardware failures will improve your users’ experience and the trust they have for your product or service.

    In this blog post, I’ll look at how NetScaler ADC’s Priority LB feature simplifies the creation of redundancy for app deployments and reduces the number of configuration API calls required to implement and manage the deployments.

    Sample Application Deployment

    Consider a shopping cart app with two levels of redundancy for achieving the required service-level objective. First, you’ll want to create a service group entity and bind the application instances corresponding to a redundancy level with a specific order:

    add servicegroup shoppingCart SSLbind servicegroup shoppingCart <Primary application instance IPs> 443 -order 1bind servicegroup shoppingCart <secondary application instance IPs> 443 -order 2bind servicegroup shoppingCart <tertiary application instance IPs> 443 -order 3

    Please note, if the app instances are autoscaling based on the load and are represented by a domain name, you should use an autoscale service group with a domain-based server, as shown below.

    add servicegroup shoppingCart SSL -autoscale DNSadd server shoppingCartPrimary_server shoppingcart_primary.company.combind servicegroup shoppingCart shoppingCartPrimary_server 443

    Building Endurance to Failure


    NetScaler ADC has rich application monitoring capabilities that give you visibility into the health of an application instance. Application owners can leverage these capabilities to switch from one redundancy level to another seamlessly.

    For our sample application deployment, you can build redundancy by creating an LB virtual server with the required load-balancing settings for the application deployment. Bind the appropriate application monitors to the service group and bind the service group to the LB vserver. The numerical value of the order field in the bind servicegroup command in our Sample Application Deployment section above will dictate the order in which the instances are considered for load-balancing decisions. By default, the lower the numerical value, the higher the preference during selection.

    add lb monitor shoppingCartHttpsMon http -secure on -httprequest “GET /shoppingCart/products” -respCode 200bind servicegroup shoppingCart -monitorName shoppingCartHttpsMonadd lb vserver shoppingCart SSL <Virtual server IP> 443bind lb Vserver shoppingCart shoppingCart

    This configuration would ensure application instances across all redundancy levels are continuously monitored for health. The clients can be load balanced to secondary instances (bound with order 2) only if all the primary instances (bound with order 1) in the servicegroup are down. If the app owners don’t want to wait until all instances in a redundancy level go down to switch to the next level, you can switch when a percentage of your choosing goes down. For example, if the owner of the shopping cart app wants to switch between redundancy levels if 50 percent of instances are down, they’ll apply this configuration:

    set lb Vserver shoppingCart -orderthreshold 50

    Learn more about priority order for load balancing services in our product documentation.

    Get the Information You Need in a Single Pane of Glass

    With the Priority LB feature, instances across all redundancy levels are associated with a single LB virtual server, so IT admins can easily see the state of the app and related statistics with a single command or via GUI view, as shown below.


    Admins can also filter the state-of-the-app information based on the configured order value, as shown here using the NITRO API:


    Please note, you can implement data center redundancy with NetScaler ADC’s GSLB feature. The configuration pattern above should work for with GSLB feature by replacing the LB vserver with GSLB vserver and the serviceGroup with the GSLB serviceGroup entities.

    Speed Up Your Deployments

    Before the Priority LB feature was available, you used the backup vserver configuration to achieve redundancy for apps. Implementing two levels of redundancy using a backup vserver configuration, using the sample deployment above, required 16 command lines or NITRO calls, as shown here:

    add lb monitor shoppingCartHttpsMon http -secure on -httprequest “GET /shoppingCart/products” -respCode 200add servicegroup tertiaryShoppingCart SSLbind servicegroup tertiaryShoppingCart <tertiary application instance IPs> 443bind servicegroup tertiaryShoppingCart -monitorName shoppingCartHttpsMonadd lb vserver tertiaryShoppingCart SSLbind lb vserver tertiaryShoppingCart tertiaryShoppingCartadd servicegroup secondaryShoppingCart SSLbind servicegroup secondaryShoppingCart <secondary application instance IPs> 443bind servicegroup secondaryShoppingCart -monitorName shoppingCartHttpsMonadd lb vserver secondaryShoppingCart SSL -backupVserver tertiaryShoppingCartbind lb vserver secondaryShoppingCart secondaryShoppingCartadd servicegroup primaryShoppingCart SSLbind servicegroup primaryShoppingCart <Primary application instance IPs> 443bind servicegroup primaryShoppingCart -monitorName shoppingCartHttpsMonadd lb vserver primaryShoppingCart SSL -backupVserver secondaryShoppingCartbind lb vserver primaryShoppingCart primaryShoppingCart

    Implementing two similar levels of redundancy using the Priority LB feature only requires eight command lines or NITRO calls. That’s a 50 percent reduction in API calls that will help you reduce the deployment time for your application and make life easier for your IT admins.

    Learn More

    With the Priority LB feature in NetScaler ADC, you can reduce the number of API calls required to implement two levels of redundancy by at least 40 percent. The feature makes management and administration of apps on NetScaler ADC easier, giving IT admins greater visibility into redundancy levels. Learn more about NetScaler ADC and the Priority LB feature.

    User Feedback

    Recommended Comments

    There are no comments to display.

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...