WebManager & WebBalancer¶
The WebManager and WebBalancer are specialized components of the AMI platform for managing user files and load across multiple Web servers.
WebManager User Guide¶
The WebManager is a centralized server for deployments with multiple 3forge Web servers. The WebManager is used together with either:
- Directly specified 3forge Web servers
- A WebBalancer (see the WebBalancer User Guide below for more details)
The WebManager is responsible for storing and sending requested layouts and user preferences to specified Web instances.
WebManager Setup¶
Configuring a WebManager is the same as other 3forge components through a local.properties file. In a fresh AMI installation, navigate to the amione/config directory and create a local.properties file and do the following:
-
Navigate to the
amione/configdirectory of the 3forge installation and open thelocal.propertiesfile. Create one if it does not exist. -
Set the
ami.componentsproperty to host the WebManager:Note
Do not run any other components.
-
For a minimal configuration, add the following properties:
-
Additional configuration properties are:
For more details on the configuration properties, refer to the WebManager Configuration Properties.
Web to WebManager Connection Setup¶
Establishing a connection between a 3forge Web server and the WebManager requires some additional properties in the Web instance(s).
In the local.properties file of a target Web installation, add the following properties corresponding to the established WebManager:
Note
The WebManager's directories can be accessed by using a file browser in the UI (e.g. through File > Save As...) or the FileSystem class.
The Web's directories can be accessed from the standalone AmiScript methods writeBinaryFile and readBinaryFile.
WebBalancer User Guide¶
The WebBalancer is load-management server that distributes user load across multiple Web servers. Users are routed to different Web hosts according to rules specified in a dedicated WebBalancer.routes file.
The WebBalancer is typically used with a WebManager (see above) to ensure users have access to their files, regardless of which Web instance they are routed to.
WebBalancer Setup¶
-
Navigate to the
amione/configdirectory of the 3forge installation and open thelocal.propertiesfile. Create one if it does not exist. -
Set the
ami.componentsproperty inlocal.propertiesto host a WebBalancer:Note
The WebBalancer can be run with other components.
-
For a minimal configuration, add the following property using the default
webbalancer.routesfile (found inamione/data):Launching AMI will now automatically redirect you to
localhost:33332, the address of a default Web configuration (and the defaultwebbalancer.routesrule).
By default, the WebBalancer is hosted on port 33330 for HTTP connections.
Users should connect to the WebBalancer address. The WebBalancer will then route users to different Web servers according to the rules defined in webbalancer.routes.
Note
This is a minimal quick-start setup for enabling the WebBalancer.
For a full list of configurable properties including HTTP(S) connection control, see this page.
WebBalancer Routing¶
The webbalancer.routes file contains a list of rules mapping IP addresses to 3forge Web servers. By default, it comes with a 3forge installation and is located in amione/data.
The rule format is:
| Parameter | Description |
|---|---|
CLIENT_MASK |
Regular expression matching patterns of client IP addresses (*=wildcard) |
SERVERS_LIST |
Comma-delimited list of protocol://host:port servers which can optionally be prefixed with a weighting (val*). Higher weightings are assigned more users and the default weighting if not specified is 1. Only HTTP(S) protocols are supported, the default is HTTP |
ON_FAILURE |
Behavior when all servers in SERVERS_LIST are down. Either CONTINUE (try other rules) or BREAK (returns error to user). Default is BREAK |
The default rule is:
This routes all users to localhost:33332 (default Web values) and returns an error if unavailable.
More detail on routing rules can be found on the configuration page here
Web to WebBalancer Connection¶
The WebBalancer requires the AMI REST server to be enabled on each target Web server.
Ensure the following properties are enabled for each Web instance: