Configuring High Availability & Load Balancing
  • 29 Sep 2021
  • 5 Minutes to read
  • Dark
    Light
  • PDF

Configuring High Availability & Load Balancing

  • Dark
    Light
  • PDF

The distributed architecture of your Inedo product allows you to configure server clusters over any number of servers for both load-balancing and failover purposes. By doing so, any single server can take over the cluster in the event of server failure and outage. This can improve your Inedo product's performance in high-traffic environments.

Using the High Availability & Load Balancing feature in ProGet requires a ProGet Enterprise license. This feature is available in all editions of BuildMaster and Otter.

You can manage your cluster by using the Cluster Management page in your Inedo product.

Prerequisites

High Availability & Load Balancing requires the following components to be configured:

  • Load Balancer
  • Machine Key (Windows only, does not apply to ProGet v6 and newer)
  • Shared Storage
  • Shared Database
  • Inedo Product (Encryption Key & Settings)

Selecting a Load Balancer

Your Inedo product is built to be compatible with any load balancing platform, including both software-based (such as HAProxy, NLP, or nginx) and appliance-based (such as F5, A10, Citrix) platforms. Each load balancer can be configured differently, so please consult the manufacturer's documentation for configuring the load balancer to work with IIS.

Session Affinity (sticky sessions) is not required. While you can enable this, it may simplify your traffic and load balancer configuration not to use them.

Example: Microsoft's Network Load Balancer

If you are new to load balancing, Microsoft's Network Load Balancing Cluster (NLB) is relatively easy to configure. See Using Microsoft Network Load Balancing (NLB) for guidance on how to use NLB with Inedo products.
:::

Database Server

You will need a stand-alone SQL Server that all servers in your clustercan connect to. This could be as simple as SQL Express, but we recommend a database cluster so that there's no single point of failure within your High-availability setup.

Your Inedo product can work with any SQL Server Cluster installation, regardless of the failure detection mechanism and failover policy. SQL Server's Database Mirroring may also be used, but note that Microsoft has deprecated that feature in favor of AlwaysOn Availability Groups.

How to Create a Cluster

Any number of servers can be in a cluster to start, and more servers may be added later to distribute load and ensure rapid responses.

A ProGet Enterprise License allows for up to five servers per instance by default.

Step 1: Install Product on Each Server

Each server must be running the same version of an Inedo product. You can use the standard installation guides for each Inedo product to install the software on each server in the cluster.

The easiest method is usually the Inedo Hub.

When installing your Inedo product on each server, make sure to point each install to the same, shared database by using the same database connection string for each.

Step 2: Configure the EncryptionKey & MachineKey

After installation, make sure the EncryptionKey value in the Inedo product’s configuration file is the same across all servers. See Installation Configuration Files to find the configuration file and where to set the EncryptionKey value.

Machine Keys (ProGet 5 for Windows Only)

This section only applies to ProGet v5.3 and earlier on Windows. Machine Keys do not need any special configuration for ProGet v6 or later.

On each server, configure a common machine key. See Microsoft's documentation for how to configure this in your web.config or machine.config files.

Machine keys can also be configured within the IIS Manager. To do this:

  • On the first server, select the ProGet website
    • Double click Machine Key
      • Use validation method SHA1 and Auto Encryption method
      • Deselect any check boxes
      • Click Generate Keys
      • Click Apply on the right panel; this will update the web.config with a machine key
  • On the remaining servers, select the ProGet website
    • Double click Machine Key
      • Use validation method SHA1 and Auto Encryption method
      • Deselect any check boxes
      • Enter the Validation key and Decryption key that was generated on the first server
      • Click Apply on the right panel; this will update the web.config with a machine key

Step 3: Configure the Inedo Service Messenger

The service messenger is a component of all Inedo products that enables simple communication between the software’s web interface and its background service. By default (on a single server) it uses a named pipe. In a load-balanced configuration, it needs to be configured to use TCP instead.

The messenger is optional, but certain parts of the Inedo suite’s web interface may be slightly degraded without it. See the Service Messenger Configuration for installation and configuration.

Step 4: Configure Shared Storage

Your Inedo product is compatible with any type of common storage that all services can access, whether software-based (e.g., SAMBA share, Windows Server Storage Spaces, etc.) or appliance-based (e.g., dedicated NAS). The only requirement is that the storage is readable and writeable by all servers.

Server-level Shared Storage

To configure server level shared storage, update the following:

Inedo Product Value
BuildMaster Artifacts.BasePath value in Administration > Advanced Settings.
ProGet Storage.PackagesRootPath value in Administration > Advanced Settings.
Otter No configuration is required

(ProGet) Feed-level Shared Storage

To configure storage at a feed level, first, navigate to the Manage Feed page for each feed. Click change on the right side of the Disk Path property.

ProGet Only

For cloud storage options, see Cloud Storage.

Step 5: Enable in Product

Once complete, from any web server, click on the Configure Load Balancing link on your Inedo product’s administration page, then click on the Enable Load Balancing button.

Then, click on the Configure High Availability Mode link on the software’s administration page, and then click on the Enable High Availability Mode button.

Step 6: Verify Health & Configuration

Once enabled, the Indexing Cluster Health box on the administration page will be shown above the Service Status box. Clicking on the More Info link will display the Indexing Cluster Status page. On this page, you can see the status of every server in your cluster, as well as which server is currently the primary server.

If a server is no longer in your cluster, you may delete it by clicking the appropriate red X button.


Was this article helpful?