Monitoring the VMware View VDI Hosts using Citrix NetScaler
May 1, 2015 4 Comments
Yesterday I was at a long time customer of mine which had implemented VMware Horizon View as a their VDI solution. This customer load balances everything through Citrix NetScaler, it’s pretty much company policy to load balance every infrastructure component unless. Good policy I think.
A little information on how VMware (Horizon) View works from an architectural point of view, (see image below). A VMware VDI connection dataflow is completely serial, it cannot switch connection over servers. You will also need to create a Persistency Group on the NetScaler to tie these protocols together so they stay in the same connection data flow. In the below scenario the environment consists of a single Horizon View deployment using two VMware Connection Servers and two VMware VDI Hosts.
Image from http://vmfocus.com
Not about load balancing. This blog post will not go into detail of how to load balance VMware View (Connections Servers) but how to configure the monitor the VMware VDI Hosts behind the VMware Connection Servers. There are a numerous sites on the topic of load balancing, for instance:
The problem or issue. Since the VMware View VDI Host is behind the Connection Server we have no direct contact with these servers. Should the VMware View VDI Host for whatever reason fail the NetScaler will still feed the Connection server with requests. So what we want is that the Virtual Server is marked DOWN when the VMware VDI Host is no longer operational.
The Solution. To make sure the above does not happen we’ll create two monitors on the Citrix NetScaler which will monitor both solution in line (The Connection Server and backend VDI Host).
Prerequisites. We are going to assume there is some basic knowledge of Citrix NetScaler and the Virtual Server is in place. An important notice on this particular configuration: you cannot use Service Groups for your backend Connection Servers. The reason for this is that there needs to be a custom/specific monitor for each backend connection (The IP-address of the VDI Host is unique within the monitor). For this reason you will have to create individual services.
Monitor #01. Create a monitor of the type HTTP (see image below). Make sure to tick the ‘Secure’ (on the bottom of Create Monitor) option since it’s using SSL.
Under ‘Special Parameters’ we’ll just put a simple GET request and expect a 200 Reponse Code in return.
Bind this Monitor to each of your VMware (Horizon) View Connection Server service within Citrix NetScaler. This does not have to be created for every service. There are no unique characteristics within this monitor so it can be re-used for every VMware Connection Server service.
Monitor #02: Create a monitor of the type TCP (see image below). In the parameter Destination IP fill in the IP-address of the VMware VDI Host that is behind the VMware Connection Server 01. In the parameter Destination Port fill in port number 902. In the below example my VDI appliance has IP-address 192.168.1.1.
This monitor will have to be created for (and binded to) every VMware Connection Server service within Citrix NetScaler.
The result. When both of the monitors are bound to the VMware Connection Server service within Citrix NetScaler the service will go DOWN if either the Connection Server is not giving back a 200 HTTP Response Code or the VDI Host is not giving back a TCP Response on port number 902.