In a scenario, there are two data centers at one location. This can be a larger building with several fire protection sections or a complete campus. The NetScalers form an HA and are
distributed so that there is one instance in each DC. Each DC also contains servers that are load-balanced via NetScaler.
This can looks like this:
The connection between the two data centers is very good! But due to technical needs, it is necessary that the web servers in the same DC receive the requests where the primary/active NetScaler is located.
This sound for a job for Global Server Loadbalancing (GSLB). And yes, this will work great! But let's take a step back and see if there aren't other solutions.
And yes, there is a more minimalist solution that once again shows the strengths of NetScaler!
1. Build one ServiceGroups for Datacenter 1 and one for Datacenter 2
2. Add all the Servers from Datacenter 1 to the ServiceGroup from Datacenter 1
3. Add all the Servers from Datacenter 2 to the ServiceGroup from Datacenter 2
4. Create two Loadbalancer vServer with the same IP-Adress and Port for Datacenter 1 and 2 like
here
For this to work, we need listen policy expressions on the vServer - a much underestimated function of the NetScaler.
And here comes the next exciting feature: the NetScaler can determine the value of the currently used primary instance via the NSIP!
You can edit this in the "Basic Settings" section under "more".
5. Now bind the Servicegroup for Datacenter 1 to the LB vServer for Datacenter 1 with a low order value.
6. And bind the Servicegroup for Datacenter 2 to the LB vServer for Datacenter 1 with a higher order value.
7. Also do it reverse for Datacenter 2
Thats all!
If the NetScaler in Datacenter 1 is the primary Instance every request to the Loadbalancer vServer will distributed to Backend-Server from Servicegroup-Datacenter 1 as long there are servers
available. If not, then Servicegroup-Datacenter 2 will used. Reverse its the same if the primary NetScaler is in Datacenter 2.
In this example a HTTP LB is used and. But this also work with other protocols and in other scenarios. This is only a shot hint for a using listen policy expressions.
Kommentar schreiben