This is my first technical topic. Through all my technical topics I am trying to concentrate on those technical issues related to Windchill for which you might not get a direct support. These topic are purely based on the experience I had. You, the reader may be surely having other observations and experience and I would welcome you to post a reply to the topic so that we share knowledge
Terms I am using LB – Load Balancer
In a Cluster most of the systems are configured to work with hardware LBs. But there are cases when we have to select a software LB. Most engineers turn towards Apache while doing it. When implementing Apache we had to do some extra work encountered some issues which shifted my mind from Apache. One of the things is when working on a Unix environment its not an easy job to share a partition over machines. This needs to be done since if Apache is the load balancer it needs the static files of the Application accessible locally. We need to spend extra space on pasting the files on LB. Secondly on Apache 2.2 setting the AJP worker to balance the load it does balance the load but it does it wrong. Every other page hit is sent to another slave. In short, it is unable to maintain the sticky sessions. This is a very critical issue.
So we went out to the open source market to check if there were any other options for load balancing through softwares. We discovered Pen. Pen is a load balancer which is pretty good at maintaining the sticky sessions. It also maintains a history of client for past 2048 hits to the server and redirects the client to same slave in case the client revisits. Hold on, don’t think about too much since can get rid of the history.
Pen does not take too much of space at all neither a lot memory. It load balances the HTTPS protocol unlike most of us when using Apache configure AJP workers to load balance that is in practice.
Where do you download Pen?
Download the zip file , un-tar it and follow the below procedure to install
In the above line I have added sfw/bin and ccs/bin to include gcc and make in the path, make sure you have the respective path on your machine
Once done, you will have pen install and you will be able to see all the necessary files.
Ok now there is nothing much to configure after we install. Below is pretty much the command you need your LB to kick off.
$ sudo ./pen lbhost:80 slave1:80 slave2:80
$sudo ./pen 188.8.131.52:80 184.108.40.206:80 220.127.116.11:80
$ sudo ./pen 18.104.22.168:443 22.214.171.124:443 126.96.36.199:443
This will get started your load balancer working.
As we discussed earlier that Pen maintains a history of past 2048 clients and redirects them to the slave by looking up in the history. If that is acceptable to you then it is fine since the clients are as it is equally distributed. In some case it might happen that clients that are mapped to one slave are high in number and that slave might get overloaded.
Also Pen keeps a watch on the slave to see if they are available. If not it will redirect the client to the live slave.
The solution to that is pretty straight forward. You reduce the table size down to any number between 1 to 5. By doing so the server will redirect the upcoming clients alternately. It won’t mess up the load balancing activity here since it also simultaneously monitors the hit ratio to the slaves.
To achieve this configuration you need to add the –c option in the startup command
$ sudo ./pen –c 1 lbhost:80 slave1:80 slave2:80
$sudo ./pen –c 1 188.8.131.52:80 184.108.40.206:80 220.127.116.11:80
$ sudo ./pen –c 1 18.104.22.168:443 22.214.171.124:443 126.96.36.199:443
Now these are some basic configurations I have given that you will need. There are other options that you can check our on its website and use accordingly, which is best for your cluster.