WebBalancer / WebManager¶
These are the list of configurable properties for the AMI WebBalancer and WebManager which are responsible for managing deployments with multiple AMI Web servers.
For more information and how to set up the WebBalancer, see here.
WebBalancer Properties¶
To run the AMI WebBalancer, include webbalancer in your local.properties
file.
This is set in the ami.components
property:
File Locations¶
-
Default:
data/webbalancer.routes
- File containing a list of routing rules for determining how incoming client ip addresses are routed to AMI web server addresses.
- Routing Rules are one entry per line with descending priority.
- Each line is in the form
client_ip_mask;target1,target2,target3;BREAK[or CONTINUE]
-
Default:
persist/webbalancer.sessions
- File that stores the active session routing in case the Web Balancer restarts.
Check Frequencies¶
-
Default:
5 seconds
- How often to check for changes to routes file and stale sessions.
-
Default:
5 seconds
- How often to test servers marked as DOWN, to see if they are alive.
-
Default:
30 seconds
- How often to ping servers marked as UP to ensure they are healthy.
-
Default:
/portal/rsc/ami/normal.png
- The URL to request from web server for HTTP OK status.
-
Default:
1 minute
- After what period of time is a session with zero connections considered stale.
Client HTTP Connectivity¶
-
Default:
33330
(Optional)- The http port to listen for insecure connections on. Ff not specified, http is not available.
-
Default: Optional
- Specifies the network interface that the
ami.webbalancer.http.port
port be bound to.
- Specifies the network interface that the
-
Default: Optional
- Controls access to the http port. Provide either a list of permitted hostname patterns, or plugin for blocking/granting access based on foreign network address.
- Syntax:
- file:
file:<file_containing_a_hostname_patterns_per_line\>
- text:
text:<newline_delimited_list_of_hostname_patterns>
- plugin:
plugin:<class_name_implementing_com.f1.ami.amicommon.AmiServerSocketEntitlementsPlugin\>
- file:
-
Default: Optional
- The https port to listen for secure connections. If not specified, https is not available.
-
Default: Optional
- Specifies the network interface that the
ami.webbalancer.https.port
port be bound to.
- Specifies the network interface that the
-
Default: Optional
- Controls access to the https port. Provide either a list of permitted hostname patterns, or plugin for blocking/granting access based on foreign network address.
- Syntax:
- file:
file:<file_containing_a_hostname_patterns_per_line\>
- text:
text:<newline_delimited_list_of_hostname_patterns>
- plugin:
plugin:<class_name_implementing_com.f1.ami.amicommon.AmiServerSocketEntitlementsPlugin\>
- file:
-
Default: Optional
- Path to the keystore file (using Oracle keytool).
-
Default: Optional
- Password associated to the keystore file.
WebBalancer.routes
file¶
Overview¶
This file (specified by ami.webbalancer.routes.file
) should contain a list of rules, one rule per line.
Rule Format
Parameter | Description |
---|---|
CLIENT_MASK | A pattern matching expression for client ip addresses, (*=wild) |
SERVERS_LIST | a comma-delimited list of [weighting*] protocol://host:port entries. (Only http,https protocols supported, default is http) |
ON_FAILURE | If all servers in SERVERS_LIST are down, either CONTINUE trying other rules or BREAK and return error to user. Default is BREAK |
Each new client connection is passed through the webbalancer rules engine to determine which list of webservers are candidates for forwarding starting at the highest priority (first) rule.
If the client's ip address (as seen by the webbalancer) matches the CLIENT_MASK portion then a web server from the SERVERS_LIST option is chosen for forwarding, see selection strategy for details. The selected forwarding is "sticky for all subsequent connections from the same client ip address for the life of the session (see ami.webbalancer.session.timeout.period for determining when a session can expire).
Selection Strategy
The servers from the SERVERS_LIST with an UP status (see ami.webbalancer.server.test.url
property determining UP/DOWN status of a server) and the least number of active client sessions is chosen, based on the servers' weighting. Ties are broken via round-robin.
All entries have a default weighting of 1, but can be overridden by prefixing with a weighting and star (*). Servers with higher weightings will be assigned more users. For example,
In this scenario, server 2 would get twice the number of users as server1. Server 3 would get half the number of users as server 1.
Note: If a client address can not be matched to a rule the user will receive an error message.
Example
Default:
WebManager Properties¶
To run the AMI WebManager, include webmanager in your local.properties
file.
This is set in the ami.components
property:
Properties List¶
-
Default: Optional
- The server port that the WebManager listens on for connections from AMI web servers
-
Default: Optional
- The server port to bind to
-
Default: Optional
- Controls access to this port. Provide either a list of permitted hostname patterns, or plugin for blocking/granting access based on foreign network address.
- Syntax:
- file:
file:<file_containing_a_hostname_patterns_per_line\>
- text:
text:<newline_delimited_list_of_hostname_patterns>
- plugin:
plugin:<class_name_implementing_com.f1.ami.amicommon.AmiServerSocketEntitlementsPlugin\>
- file:
-
Default: Java working directory, typically under the root installation of AMI (
ami/amione
)- The working directory for file requests.
-
Default: Optional (OS dependent)
- A
key=value
comma-delimited list of roots that web server file requests are mapped to. - The key is a "logical name" and the value is the "actual location". E.g:
/public=/opt/files,/=/
takes all file requests under/public
and maps them to/opt/files
, otherwise all files starting with/
are mapped to/
- For Windows machines, this defaults to
c:/=c:/
- A
-
Default:
true
- If
true
, file requests requesting a parent directory (via..
) will be rejected. Also, requests denoting home directory (~
) will be denied. - IMPORTANT SECURITY NOTE: Setting to
false
will allow remote access to all host files accesible by user process.
- If