Configure Microsoft Azure load balancers

Configure a Microsoft Azure load balancer.

Before you begin

Ensure that you have:

  • An Access Gateway high availability cluster with at least one worker.
  • Internal IP addresses for all Access Gateway cluster members including the admin node.
  • The Virtual Private Clouds (VPCs) used by the Access Gateway cluster.
  • The external domain for the load balancer (for example, oag-external.com).
  • Credentials for your DNS service provider to create required CNAME entries.

Steps

  1. Connect to the Microsoft Azure portal and configure basic load balancer settings:
    1. Open the Microsoft Azure portal (https://portal.azure.com) in a browser.
    2. Sign in to the portal.
    3. Under Azure services, click Create a resource.
    4. In the search bar, enter Load Balancer. From the list, select Load Balancer.
    5. Click Create.
    6. In the Create Load Balancer pane, specify the following:

      Field

      Value

      Resource Group

      The name of the Access Gateway resource group (for example, AccessGateway).

      Name

      A name for the balancer (for example, AccessGatewayExternalLB).

      Region

      Select the region that hosts the Access Gateway nodes.

      Type

      Public

      Sku

      Standard

      While you can create load balancers that use the Basic Sku, those load balancers don't support health probes using HTTPS/443.

      Public IP Address

      Create new

      Public IP address name

      Associated external name (for example, www.externalfacingdomain.com).

      Assignment

      Static

      Availability Zone

      Select an appropriate availability zone.

    7. Click Next:Tags.
    8. Enter any relevant tags. Click Next: Review and Create. The load balancer is created. This could take several minutes.
    9. Connect to the Microsoft Azure portal and configure basic settings.
  2. Create a back-end pool. Back-end pools specify the instances of Access Gateway that the load balancer acts as a front end for.
    1. Click the name of the load balancer.
    2. In the Settings section, click Backend Pools.
    3. Click the Add to add a new back-end pool.
    4. Specify the following:

      Field

      Value

      Name

      A name for the pool (for example, AccessGatewayLBBackendPool).

      Virtual network

      From the dropdown, select the virtual network that contains the Access Gateway instances.

      IP Version

      Select IPV4.

      Associated to

      Virtual machines

    5. Click Add.
    6. Select each Access Gateway node that the load balancer should use.
    7. Click Add.
    8. Click Save.
  3. Configure health probes. Load balancers must be able to tell the health of the instances they interact with.
    1. Click the name of the load balancer.
    2. In the Settings section, click Health Probes.
    3. Click Add to add a health probe.
    4. Specify the following information for the new probe:

      Field

      Value

      Name

      A name (for example, AccessGatewayLBHealthProbe).

      Protocol

      HTTPS

      Port

      443

      Path

      /

      Interval

      20

      Unhealthy threshold

      2

    5. Click Add. A health probe is created.

    Microsoft Azure load balancer probes determine health based on a return code of 200. Access Gateway returns a code of 400 by default. A no-auth application can be created to return a 200 result as described in the next section.

  4. Create no-auth applications.

      For each high availability node, create a no-auth application associated with the private IP address. These applications return a value of 200 on success. 200 is the default HTTP return code for a healthy instance.

      1. Return to or open a browser to the Access Gateway Admin UI console.
      2. Select the Applications tab.
      3. For each IP address, create an associated application:
        1. Click Add.
        2. Select No-auth.
        3. In the Essentials tab, specify:
          FieldValue
          NameAn appropriate name for the application, such as LBHealth-Admin, where the suffix distinguishes the application from other health monitoring applications.
          Public DomainEnter the associated public IP address.

          Protected Web Resource

          Leave unchanged as initially populated by wizard.

          GroupsEveryone
        4. Click Next. The Attributes tab opens.
        5. Click Next. The Policies tab opens.
        6. Click Done.
  5. Enable session affinity.

    Load balancers must specify session affinity, which is also referred to as sticky sessions. Microsoft Azure specifies sticky sessions using a load balancer rule.

    1. Return to the Microsoft Azure portal.
    2. Click the name of the load balancer.
    3. Click Load Balancing rules.
    4. Click Add to create a load balancer rule.
    5. Specify the following values for the load balancer rule:

      Field

      Value

      Name

      A name for the rule (for example, SessionAffinityRule).

      IP Version

      IPV4

      Front end address

      Leave unchanged.

      Port

      443

      Back end port

      443

      Backend poolName of previously created pool.

      Health probe

      Name of previously created health probe.

      Session persistence

      Client IP

  6. Register load balancer with DNS service provider. The following steps to associate a load balancer with DNS may vary by DNS provider:
    1. In the Microsoft Azure console, click Home. Under Recent resources, click the name of the load balancer.
    2. In the Essentials pane, click View frontend IP configuration.
    3. Note the front-end IP address of the load balancer.
    4. Connect to your DNS Service provider and add a CNAME record mapping the front-end IP address to the external name. For example: CNAME host: www.[your external name], target: front-end IP address.
    5. Return to the Azure console.
  7. Test
    1. Return to or sign in to the Access Gateway Admin UI console.
    2. Select the Applications tab.
    3. Click Add.
    4. Select Sample Header.
    5. In the Essentials tab, specify the following:
      FieldValue
      NameA name for the application (for example, Load Balancer Header Test).
      Public Domainwww.[external domain] (for example, www.oag-external.com)
      GroupsEveryone
    6. Click Next.
    7. Click Next.
    8. Click Done.
    9. Open a new browser or an incognito (private browsing) window.
    10. Enter the URL associated with the application.
    11. The Access Gateway sample app page should display.

Related topics

Load balancers