In Library Mode, each Server Instance runs locally and is managed by the REST Interface. This is the recommended mode of operation. The REST Interface will start additional server instances as required by the request throughput it is processing, up to the number specified in config.js.
Each Library Mode Server Instance is specified in config.js as follows:
glServers.push({ path: '../../../../server1', maxRequests: 100 });
For each instance, the following must be specified:
path: The path to the directory containing a Trillium Geolocation Server initialization file (gaserver.ini). This can be specified as an absolute path or as a path relative to the config.js file.
maxRequests: The maximum number of requests that the server instance can simultaneously process. If more requests than this limit are received, they will be rejected. This option can be set to 0 to specify unlimited simultaneous requests.
By default, the Geolocation REST Interface is configured to use a single server instance in Library Mode. The path for this instance is the relative path to the server directory within the Trillium Geolocation installation, and the maxRequests parameter is set to 0 (unlimited simultaneous requests).
To specify additional Server Instances in Library Mode, add them as follows:
glServers.push({ path: '../../../../server1', maxRequests: 100 });
glServers.push({ path: '../../../../server2', maxRequests: 100 });
glServers.push({ path: '../../../../server3', maxRequests: 100 });
It is recommended that a separate path setting is used for each Server Instance, otherwise Trillium Geolocation server log file corruption will occur (each Server Instance writes its own log file in the directory specified in path). Additional Trillium Geolocation server directories can be created by copying the server directory within the Trillium Geolocation installation.