Configure multiple dispatchers
If you have multiple dispatchers on a host, you must specify unique ports and application data directories for each dispatcher to ensure dispatcher information does not get mixed up.
While multiple dispatchers are typically not needed, you might have multiple dispatchers to support different environments using the same version of the Genero Application Server on the same host. For example, you may wish to co-locate your production, training, and development environments.
To start multiple dispatchers on a single host, there are two options:
- Have a separate application server configuration file for each dispatcher.
- Make a copy of the default configuration file (as.xcf) for each dispatcher, giving each copy a unique name.
- Specify different settings for the ports and application data directory in each configuration file. The elements you need to configure are shown in Table 1.
- Start each dispatcher with the
-f
option to specify the configuration file to use:$FGLASDIR/bin/httpdispatch -f $FGLASDIR/etc/mydispatcherx.xcf
- Alternatively, you can share the default configuration file between all the dispatchers by starting dispatchers with the -E option to specify unique ports and application data directories for each dispatcher. For more information and a sample command, go to Dispatcher override option (-E).
- If using Apache web server, you must create different
ProxyPass
andProxyPassReverse
directives in the Apache configuration for eachfastcgidispatch
dispatcher, as Apache must deliver requests to the GAS with the corresponding port and path alias. For more information on configuring Apache, go to FastCGI GAS configuration on different versions of Apache. - If using Internet Information Services (IIS) web server, you must create a different application pool for each isapidispatch dispatcher, each with its own application root directory containing the isapidispatch.ini file. For more information on configuring IIS, go to Manual configuration for IIS 8.x and IIS 10.x.
Elements | Resources | Setting values across dispatchers |
---|---|---|
TCP_SERVER_PORT |
res.ic.server.port |
A GAS dispatcher listening port is set by the TCP_SERVER_PORT element. Each
dispatcher on a server requires a unique listening port. In fact, all port
numbers – both the listening ports and the set admin ports – must be unique between all the
dispatchers. |
TCP_ADMIN_PORT |
res.ic.admin.port |
The admin port is for GAS administration tasks. Each dispatcher on a server requires a unique admin port. In fact, all port numbers – both the listening ports and the set admin ports – must be unique between all the dispatchers. |
res.appdata.path (Application data directory) |
res.appdata.path |
The application data directory, or appdata, is where the
application data files (log, tmp,
session, and so on) managed by the GAS are located. It is recommended that this
directory be unique between all the dispatchers. Tip:
While not recommended, you can share the application data directory between dispatchers. For more information, see Shared application data directory. |
Dispatcher override option (-E)
You can share the default configuration file (as.xcf) between all the
dispatchers provided you override the following
resources with different values on starting the dispatcher:
res.ic.server.port
res.ic.admin.port
res.appdata.path
-E
option to override the
settings for the server port, admin port, and the appdata path. (Line breaks have
been added to improve readability.)$FGLASDIR/bin/httpdispatch -E res.ic.server.port=dispatcherx-server-port
-E res.ic.admin.port=dispatcherx-admin-port
-E res.appdata.path=appdatax-path
Where:- dispatcherx-server-port defines a unique listening port for this dispatcher.
- dispatcherx-admin-port defines the unique admin port for this dispatcher.
- appdatax-path defines the unique path to the appdata directory for this dispatcher.
Default as.xcf appdata settings
In this example, the default settings for the appdata resources of the GAS are shown. The
res.appdata.path
resource specifies the appdata directory, which is the root directory for the
log, tmp, and session directories. In
the example, the appdata path is shown for a Windows® system. <RESOURCE Id="res.appdata.path"
Source="INTERNAL">C:\ProgramData\FourJs\gas\5.00</RESOURCE>
Resources for the log, tmp, and
session directories are set within the appdata directory:
- The
res.log.output.path
resource and theLOG
element define the path to the log directory:<RESOURCE Id="res.log.output.path" Source="INTERNAL">$(res.appdata.path)/log</RESOURCE> #... <LOG> <OUTPUT Type="$(res.log.output.type)">$(res.log.output.path)</OUTPUT> # ... </LOG>
-
The
res.path.tmp
resource and theTEMPORARY_DIRECTORY
element define the path to the temporary directory:<RESOURCE Id="res.path.tmp" Source="INTERNAL">$(res.appdata.path)/tmp</RESOURCE> # ... <TEMPORARY_DIRECTORY>$(res.path.tmp)</TEMPORARY_DIRECTORY>
-
The
res.path.session
resource and theSESSION_DIRECTORY
element define the path to the session directory:<RESOURCE Id="res.path.session" Source="INTERNAL">$(res.appdata.path)/session</RESOURCE> #... <SESSION_DIRECTORY>$(res.path.session)</SESSION_DIRECTORY>