This post has already been read 10225 times!
I thought I would write a post on load balancing the Personalisation servers you may have deployed in your AppSense Environment Manager deployment. Whilst AppSense offer an in built load balancing method within their console this seems to only offer an active/passive fail over scenario. In the event that you max out a server or just want to set up an active/active cluster you can follow these steps.
Log into your NetScaler and expand Traffic Management – Load Balancing.
Click on Servers then click Add. Add your 2 Personalisation Servers into the server listing.
You will now need to create a new Monitor to specifically check that the AppSense Personalisation Server is up AND has a valid connection to the database. Click on Monitors and add a new monitor.
Click Add, give the new monitor a name and select the type HTTP-ECV
Select the Special Parameters tab and fill out the Send String and Receive String fields as follows:
Send String: “GET /PersonalizationServer/status.aspx”
Receiver String: “Successfully opened a database connection”
Both without quotes.
Click create to set up your new monitor.
Click the Services Node and create 2 Services, 1 for each AppSense Personalisation Server you added earlier.
First give the service a name, select your server you added earlier from the list and ensure the protocol is HTTP.
Click OK and then locate the monitor thats assigned by default (normally PING) Change this to the new monitor you created earlier. Click the existing monitor.
Click Add Binding
Select you new monitor from the list provided and click Bind.
You will now see your 2 Personalisation Servers with a bound service showing as UP.
Now you can create the Virtual Server to load balance the 2 AppSense Personalisation Servers.
Click the Virtual Servers node and click Add.
Give your new Virtual Server a name, select HTTP as the protocol and give it a free IP Address on your subnet.
Click OK then select to bind the 2 services you have just created.
Click on the services and bind your 2 Personalisation Servers to the Virtual Server
Click OK and you should have a new Load Balancer balancing your Personalisation Servers.
Finally you need to set up the Method and Persistence to the Load Balancer. Open up the Load Balanced Virtual Server and add the Method and Persistence Options.
Ensure you set the Method to Round Robin and the Persistence to Cookie Insert and click OK on both options.
At this point you have a load balancer set up for your 2 AppSense Personalisation Servers running on a unique IP Address. You can use the IP Address or for a better experience you can add a dos record to point to the Virtual IP.
All that remains is to add your new Virtual Server to your Personalisation Server Configuration.
Open the AppSense Environment Manager Console and click on User Personalisation
Click on Connect and Connect to either of your active Personalisation Servers. Expand Sites then the Site that your 2 servers reside. In this case I am using the Default Site for ease.
Right click the site and click on Add Virtual Host
Add the dns name or IP Address for the new Virtual Server and click OK.
Thats it, you will be able to access personalisation using the new Virtual Server you have created.
NOTE: This will only load balance the presentation layer of the solution not the SQL part. If you want to know how to use NetScaler to load balance a SQL Mirrored Database then please read the following article I have previously written. Set this up for your AppSense Database and when configuring the Personalisation Server initially point the Database connection to the Virtual Server rather than the individual Server.
Hope this helps some of you out.