Instructions without a Load-Balancer or IIS

Requirements


Limitations


  • These instructions do not deal with SSL or DNS configuration.
  • There are other methods besides using AlwaysUp to manage the server configurations, but none are as good as this option.
  • You will have to know how to Publish your application from Alpha Five.

Notes


  • There is no physical restriction on the number of Instances you can run on a particular server and they are not tied to how many CPU cores you have.

Steps


  1. Create a folder on your server as c:\aa\config.
  2. Create a folder also for c:\aa\logs.
  3. If not already installed, install one copy of Alpha Web Application Server.
  4. Fire up the server.
  5. Look in the "system tray" right-bottom side of the Desktop.
  6. Click on Configure Server and go through the licensing process under the Sessions tab -- make sure your server is properly licensed at this point.
  7. Go to the Logging tab and change all of the folder and names for all of the logs (even if you do not check to include the log.) Use this naming structure:

    • Access Log - c:\aa\logs\access.log
    • Error Log - c:\aa\logs\error.log
    • Raw HTTP Log - c:\aa\logs\raw.log
    • Xbasic Stack Log - c:\aa\logs\stack.log

  1. Save and close the configuration dialog.
  2. Right-click on the red server icon again and select Interactive Window. Enlarge the window if necessary.
  3. Type "?a5_GetAppServerConfigFile()" in the Interactive Window. This will give you the path to the configuration file. Grab that full path (excluding the file name), and open the config file path.
  4. Copy the configuration file to c:\aa\config and rename it to Instance1.xml (or any other name such as "myapplication.xml").
  5. Make as many copies of this file as you need, one for each instance. Rename each to Instance2.xml, Instance3.xml, etc. or some other naming structure.
  6. Open each configuration file in turn and make the following edits (in order as they appear in the file):

    • BindIP = "xxx.xxx.xxx.xx". (Enter a unique IP address for each instance)
    • Access_Log = "C:\aa\logs\myapp_access.log". (Make this specific for your instance)
    • Debugging.RawHttpLogfile = "C:\aa\logs\myapp_raw.log". (Make this specific for your instance)
    • Debugging.XbasicErrorStackLogfile = "C:\aa\logs\myapp_stack.log". (Make this specific for your instance.)
    • DOCUMENT_ROOT = "c:\a5webroot\myapplication1". (This is an example, please see my notes on Document Root below.)
    • Error_Log = "C:\aa\logs\myapp_error.log". (Make this specific for your instance.)
    • Licenses = "xxxxxxxx". (Just make sure your license is entered correctly. It should already be set from the initial configuration.)
    • Systray_Title = "My Application ABC". (Enter a value that identifies your instance.)

  1. Save each xml file.


You should now have one XML file for each instance in the c:\a5\config folder.

Document Root

  • Each Instance needs a separate Document Root. The Document Root is where you publish your Alpha Five web files to and typically look like this: "c:\a5webroot\myapplication1", "c:\a5webroot\myapplication2", etc.
  • In your Alpha Five application you will have set up your Publishing Profile to publish the application to this folder.
  • If you are hosting on ZebraHost, they look like this: "c:\a5v12\myapplication1", etc.

Using AlwaysUp


AlwaysUp is a 3rd party utility that runs the Alpha Web Server as a "Windows service". This means if your server reboots for any reason, the Alpha Web Server will start back up. There are alternatives to AlwaysUp such as the windows utility "srvany" but none provide the desirable extra features found in AlwaysUp.


  1. Start up AlwaysUp.
  2. Select Application > Add.
  3. Enter something like "My Application ABC" in the Name field, something to identify your application for this Instance.
  4. For the Application field, click the builder and go find your Alpha Five Web App Server EXE file, such as C:\Program Files (x86)\a5V12 ApplicationServer\A5ApplicationServer.exe.
  5. For the Arguments field, enter your Instance XML file in this format: -ConfigFile=C:\aa\Installs\instance1.xml
  6. Go to the Extras tab. You can set the Run the application on these CPU(s). But this is not supposed to be necessary, Alpha is supposed to spread instances across the available CPUs.
  7. Do that for all of your instances.
  8. There are other configuration settings you can make for AlwaysUp, but this minimal settings should suffice.
  9. Select Application > Start All (if not already started)


That's it. All of your instances should be running.


You need to complete the process by setting your DNS, etc.