Load balancing port ranges with Netscaler

So I got a question earlier today, if it was possible to load balance a specific port range within Netscaler. Now by default we cannot specify a port range when setting up a load balanced vServer or setting up services.

In order to ensure that traffic from a specific endpoint going to the same backend service we have some options.

1: Persistency Groups, in this case we need to define load balanced vServers and services for each port nr and then we need to define a persistency group afterwards. Which I have blogged about earlier https://msandbu.wordpress.com/2015/02/09/netscaler-and-persistency-groups/

2: Another option we have is to define the port nr to * and service to ANY, which means that we can have a single vServer and single service objects, the issue is that it will intercept ANY traffic to ANY port, which is a bad thing.

What we can do with option 2 is define a listening policy. Listen policy will allow us to customize which ports a vServer should respond to. For instnace we can define a vServer with ANY service and port equals * but then we attach a listen policy and define for instance port range between 80 to 8080. Even thou the vServer is setup with ANY port and ANY service it will only listen to requests coming from within the port range in the listen policy.

Listen policies can be defined within the vServer, such as shown in the screenshot below


Leave a Reply

Scroll to Top