NetScaler Autoscaling

So had a case appear earlier today where we needed to scale out the NetScaler deployment within a container enviroment. More specific we needed a good way for NetScaler to automatic add new entries within a load balanced vserver when a container orchestration enviroment scaled out a stack with new containers.

So in most cases a container orchestration platform already has a built-in load balancing mechanism like HAproxy for instance which is used to load balance between the different containers within a host. In most cases you have multiple container hosts and therefore have multiple HAproxy instances with its own IP address and exposed port which represents a service.

Now we could of course have each HAproxy IP within a DNS entry with round robin, but that would not provide us with a good health monitoring service, so if a host went down and suddenly a service would be unavailable for some users who would connect.

Now we often need a new load balanced layer above the HAproxy tier to provide load balanced between the different HAproxy instances with  proper health monitoring.  The issue is that we need to insert the new container instances when they get provisioned so they are automatically load balanced.

Now regular NetScaler has no built-in integration with Container orchestration enviroments, this is only supported if using for instance MAS or NITROX which has Service Registration / Discovery integration with different container enviroments.

However there is an option to setup DNS based autoscaling in NetScaler that can be used and will populate service members in a load balanced virtual server based upon DNS entries which are part of the same DNS name.

So since many container enviroments manages their own DNS namespace it can be used to publish a service using the same FQDN.

From a NetScaler perspective first we need to define a new service group, define AutoScale mode to DNS based setup.

image

Then we want to add a service group member select server based, then click on the + sign

image

Define the FQDN of the host name (A-record) you want to be used to auto scale setup

image

Now after you have specified a FQDN and clicked OK, you will now see all the servers which are attached to the A-record in the DNS server which the NetScaler is poiting too.

image

and voila!

Leave a Reply

Scroll to Top