Skip to main content

Configuring the Load Balancer (Linux w/ Docker)

The Informer Load Balancer (available in 5.0.13 and later) splits Informer into separate processes for its core components, which improves performance under larger request or data volumes. It is also the supported way to use HTTPS with Informer.

The processes are:

  • Queries: handles all database query executions.
  • API: the main web server component, handling all UI requests.
  • Load-Balancer: acts as a proxy server and is the main entry point for all requests.
  • Scheduler (optional): handles all schedule executions.
Current installs ship with the Load Balancer

New Docker installs come with the Load Balancer pre-configured. These steps are for adding it to an installation that does not have it, or customizing the process split. Keep the image versions and entrypoints in any service you add consistent with your installed version (see your existing docker-compose.yml and the installation guide).

Configure the Load Balancer

  1. Stop all containers:

    docker-compose stop
  2. Remove the existing Informer container:

    docker-compose rm informer
  3. Edit docker-compose.yml:

    • Remove the ports entry from the Informer service.

    • Add a service for the load balancer:

      i5-load-balancer:
      image: docker.entrinsik.com:5000/i5-load-balancer
      working_dir: /i5-load-balancer
      ports:
      - "80:80"
      volumes:
      - ./config.json:/i5-load-balancer/config.json
    • To run a separate process for queries, duplicate the Informer service entry, renaming it informer-queries.

    • To run a separate process for scheduled Jobs, duplicate the Informer service entry, renaming it informer-jobs, and set - schedule__enabled=true in its environment. On the other Informer services, set - schedule__enabled=false.

    • Add an extra_hosts entry to each Informer service (not the load balancer), changing the hostname to your Informer server:

      extra_hosts:
      - "informer5.myserver.com:0.0.0.0"
  4. Edit config.json and add the load-balancer rules.

    With a separate process for Jobs:

    {
    "http": "80",
    "host": "informer5.myserver.com",
    "loadBalancer": {
    "rules": [
    { "regex": ".*\\/jobs\\/[^\\/]*$", "url": "http://informer-jobs" },
    { "regex": ".*_(query|run|refresh)+", "url": "http://informer-queries" },
    { "regex": "$", "url": "http://informer" }
    ]
    }
    }

    Without a separate process for Jobs, omit the first rule:

    {
    "http": "80",
    "host": "informer5.myserver.com",
    "loadBalancer": {
    "rules": [
    { "regex": ".*_(query|run|refresh)+", "url": "http://informer-queries" },
    { "regex": "$", "url": "http://informer" }
    ]
    }
    }
  5. Start all containers:

    docker-compose up -d

To serve Informer over HTTPS, see Configuring HTTPS (Linux w/ Docker).