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.
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
-
Stop all containers:
docker-compose stop -
Remove the existing Informer container:
docker-compose rm informer -
Edit
docker-compose.yml:-
Remove the
portsentry from the Informer service. -
Add a service for the load balancer:
i5-load-balancer:image: docker.entrinsik.com:5000/i5-load-balancerworking_dir: /i5-load-balancerports:- "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=truein its environment. On the other Informer services, set- schedule__enabled=false. -
Add an
extra_hostsentry to each Informer service (not the load balancer), changing the hostname to your Informer server:extra_hosts:- "informer5.myserver.com:0.0.0.0"
-
-
Edit
config.jsonand 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" }]}} -
Start all containers:
docker-compose up -d
To serve Informer over HTTPS, see Configuring HTTPS (Linux w/ Docker).