This post has already been read 10538 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.
Laters,
b@m
Hi Dave,
I’d recommend adjusting your health monitors to use the dbmonitor.aspx and pingmonitor.aspx pages instead of status.aspx. Status.aspx is heavier on the servers but also requires authentication so customers opting to use Windows Authentication instead of Anonymous will have issues with this. The pages I mention do not require any authentication.
Regards,
Richard
Hi,
is this really a recommended/valid LB configuration for AppSense products? AppSense provides a “Best Practices document” for load balancing their services and it seems totally different to your article.
Thanks
Hi Trent,
It is an alternative option to the fail over methods that AppSense provide. Assuming a server fails in the personalisation server list AppSense will drop to the next one. The mthod described here will allow for an Active / Active load balancing method rather than an Active / Passive. Useful if you have deployments of more than 10,000.
Not a replacement – just an alternative.
Thanks,
Dave