Applogin (32-bit)

Version 2.1
Copyright 1997-2000 University of Wisconsin - Madison, CAE Center.
Released as Freeware.

This program (ALOGIN32.EXE) is designed to load balance our applications servers at login time. This program will check the file servers listed in its INI file for the one with the least number of connections and return a value indicating the server choice that was made.  This program can be included in NetWare login scripts to select the application server to use at login time. 

This program allows us to distribute the load across our application servers. It also has the advantage that we could "disable" one of the servers via the INI file. Then in a few days, we can take the server down for maintenance and not have users loose access to their applications.  In our setup, we have three application file servers. A copy of all our applications is kept on each one. We use the NT Resource kit tool ROBOCOPY to keep the three file servers in sync.

Obtaining ALOGIN32

You can download ALOGIN32 from here. The source code to the program is also available here. The helper service described in this document can be obtained from here.

Using ALOGIN32.EXE

The first thing you need to do is to configure the APPLOGIN.INI file to match your environment. (See the section on the INI file parameters below) Once you have modified the INI file, just copy both ALOGIN32.EXE and APPLOGIN.INI file to your server's SYS:PUBLIC directory.

Next modify your system login script to include the Applogin program. Below is an example of what we use for our login script:

REM ALOGIN32.EXE looks for Z:\APPLOGIN.INI
MAP ROOT INS S1:=SYS:PUBLIC
WRITE "Logging in to Application Server..."
#z:\alogin32 
WRITE "APPLOGIN Returned %ERROR_LEVEL\n"
IF "%ERROR_LEVEL" = "0" THEN
   DOS SET APPSERV = "CAEAPPS1"
   MAP G:=CAEAPPS1\PC_APPS:
END
IF "%ERROR_LEVEL" = "1" THEN
   DOS SET APPSERV = "CAEAPPS1"
   MAP G:=CAEAPPS1\PC_APPS:
END
IF "%ERROR_LEVEL" = "2" THEN
   DOS SET APPSERV = "CAEAPPS2"
   MAP G:=CAEAPPS2\PC_APPS:
END
IF "%ERROR_LEVEL" = "3" THEN
   DOS SET APPSERV = "CAEAPPS3"
   MAP G:=CAEAPPS3\PC_APPS:
END

APPLOGIN.INI

The configuration for ALOGIN32 is done by INI file. The file takes on the standard windows INI file format. Here are the available sections and their options.

[servers]

This section lets you specify what file servers the program should check. The format for the entries is:

server<n>=<servername>

Where <n> is a number starting at 1 and increasing for each server listed and <servername> is the name of the file server to check.  The program will start reading this section for entries. If you have 3 servers listed, be sure that they are numbered 1,2, and 3. If you skip a number (say you used 1,2, and 4), the program would only find the first two servers. The number specified is also the return value by the program for the server selected. That is, if ALOGIN32 selects the server found in the server2 entry, it will exit with error level 2.

Here is an example for this section

[servers]
server1=caeapps1
server2=caeapps2
server3=caeapps3

[disabled]

This section lets you specify servers that should not be checked. This lets you take a server offline for a period of time and not have to modify both the INI file and the login script. The format of this section is simply the server name followed by "=1".

For example, if I wanted to take the CAEAPPS2 server offline for a while, I would use the following in the INI file:

[disabled]
caeapps2=1

[HelperService]

New to version 2.1, ALOGIN32 can use a helper service running on NT workstations or servers to speed up the time it takes for ALOGIN32 to run. Without the service, ALOGIN32 needs to attach, get the login count, and detach from each server in the list. If network traffic is heavy, then ALOGIN32 may take a bit of time to perform its tasks. The helper service (ALOGINSVC) will poll the servers and return the server it should use. We found quite an improvement in performance by using the helper service. If enabled, ALOGIN32 will send UDP packets to the specified helpers and wait up to 5 seconds for a response. If no response is received, then ALOGIN32 will revert to the self polling mode of selecting a file server.

Here is an example of this section:

[HelperService]
UseHelper=1
ServerCount=3
server1=helper1.mydomain.com
server2=helper2.mydomain.com
server3=helper3.mydomain.com
ServicePort=1666

The UseHelper entry tells the ALOGIN32 if it should use this or not. A value of 1 will enable it. If the entry is not present, then it will default to not using the helper service.

The ServicePort entry tells ALOGIN32 what UDP port the helper service is listening on for requests.

The ServerCount specifies how many helper server entries there are in the file

The server<n> entries are the DNS names of the machines running the helper service.

 

Version History

Version 2.1

Version 2.0

Version 1.0