3. Instance Level Configuration¶
This chapter describes elements of the AMPS configuration that set parameters for the instance as a whole.
Element | Description |
---|---|
Name
|
This element defines the name of your AMPS instance. The instance name
is used to uniquely identify this instance for replication purposes, to
generate file names for use by the AMPS instance, and is shown in log
statements and for other administrative purposes. 60East recommends that
the name be short and meaningful, and that each instance in your AMPS
installation have a distinct name. When creating a name, the name should
not contain special characters such as spaces, path separator characters
( 60East recommends that the name of the instance stay the same for as long
as the application will be connected to the same replication partners or
retain transaction log data. This name is used in the files
created by the instance as part of the transaction log, in the
replication path for replicated instances, and in the client names
created for replication connections. If your AMPS installation will use
replication, the This element is required, and there is no default. |
Group |
Identifies the replication group for this instance. If no Instances that have the same Replication passthrough uses the group name to specify which instances to provide passthrough for. See the AMPS User Guide for a discussion of replication, including passthrough. Defaults to the instance |
ProcessName |
Specifies the process name to set for this instance. When this element is
present, AMPS uses the name specified as the process name. Otherwise, the
process name uses the default set by Linux, which is the executable name
( This element is most useful for systems that host multiple AMPS instances and want to be able to quickly tell the instances apart based on the process name. This element is optional. If not present, the AMPS executable does not change the process name. |
Description |
This element is used to provide a description of the AMPS instance for monitoring tools (including the AMPS Galvanometer). AMPS provides the contents of this element in the admin interface, but does not use the description for any other purpose. |
Environment |
This element is used to provide information about the environment of the AMPS instance to monitoring tools (including the AMPS Galvanometer). AMPS provides the contents of this element in the admin interface, but does not use this element for any other purpose. |
RegexTopicSupport |
Sets whether this instance supports regular expression topic matching. When this option is 60East recommends leaving this option set to the default unless there is a specific reason to change it, and unless the configuration and applications have been reviewed to ensure no regular expression topics are used. Defaults to |
Authentication |
Sets the default authentication module to use for transports that do not verify the identity of a connected user. The module specified must be one of the modules configured in the
Defaults to |
Entitlement |
Sets the default entitlement module to use for transports that do not explicitly specify an entitlement module. Entitlement modules enforce permissions for a connected user. The module specified must be one of the modules configured in the
Defaults to: |
Authenticator |
Sets the default authenticator module to use for outgoing connections from AMPS that do not explicitly specify an authenticator module. Authenticator modules provide credentials to use for outgoing connections. The module specified must be one of the modules configured in the
Defaults to: |
SuggestedMinimumVersion |
The suggested minimum AMPS version to use this configuration file. If the
AMPS instance that loads this configuration file has a version number
less than the suggested minimum version, AMPS issues a warning. This
option can be useful when upgrading a set of AMPS instances, or when the
AMPS instance will see improved performance from a particular feature.
For example, an application that will run correctly without hash indexes,
but would see improved performance with hash indexes, could provide a
Defaults: when no value is provided, AMPS does not check the configuration file against the version number of the instance. |
RequiredMinimumVersion |
The required minimum AMPS version to use this configuration file. If the
AMPS instance that loads this configuration file has a version number
less than the suggested minimum version, AMPS issues an error and will
not start. This option can be useful for enforcing upgrade on a set of
AMPS instances, or when the AMPS instance must support a particular
feature. For example, an application that uses message queues could
provide a Defaults: when no value is provided, AMPS does not check the configuration file against the version number of the instance. |
ConfigIncludeCommentDefault |
Sets the default for how Defaults: Defaults to |
ConfigCycleDetectionThreshold |
Sets the maximum size to allow for an expanded configuration file. This setting is intended to prevent cycles of include files (for example, where file A includes file B and file B includes file A) from consuming all of the memory on the system before failing. Defaults: Defaults to 5MB. |
Table 3.1: Instance Level Configuration Parameters
<AMPSConfig>
....
<Name>AMPS</Name>
<Group>Sample-AMPS</Group>
....
</AMPSConfig>
Example 3.1: Instance-Level Configuration Example
SOW Statistics Interval¶
AMPS can publish SOW statistics for each SOW topic which has been
configured. The SOWStatsInterval
is specified as an interval (see
Table 3.2)
between updates to the /AMPS/SOWStats
topic.
Element | Description |
---|---|
SOWStatsInterval |
Interval for which SOW statistics are updated. |
Table 3.2: SOW Statistics Interval Parameters
<AMPSConfig>
...
<SOWStatsInterval>10s</SOWStatsInterval>
...
</AMPSConfig>
Example 3.2: Sow Statistics Interval Example
Slow Client Policies¶
AMPS includes a set of parameters that specify how the instance should manage slow clients. Sometimes, AMPS can publish messages faster than an individual client can consume messages, particularly in applications where the pattern of messages includes “bursts” of messages. Clients that are unable to consume messages faster or equal to the rate messages are being sent to them are ”slow clients”. By default, AMPS queues messages for a slow client in memory to grant the slow client the opportunity to catch up. However, scenarios may arise where a client can be over-subscribed to the point that the client cannot consume messages as fast as messages are being sent to it. In particular, this can happen with the results of a large SOW query, where AMPS generates all of the messages for the query much faster than the network can transmit the messages.
Slow client management is one of the ways that AMPS prevents slow clients from disrupting service to the instance. 60East recommends enabling slow client management for instances that serve high message volume or are mission critical. Slow client policies for all Transports in the instance are set at the root level of the configuration file. A Transport can override any of these settings, or choose to use the instance-wide settings. Details on slow client handling are available in the AMPS User Guide.
Element | Description |
---|---|
MessageMemoryLimit |
The total amount of memory to
allocate to messages before
offlining clients. This applies to
all clients. For example, setting a
value of Default: 10% of total host memory or
10% of the amount of host memory
AMPS is allowed to consume (as
reported by This option is specified in bytes,
and accepts the standard AMPS notation
(for example, |
MessageDiskLimit |
The total amount of disk space to allocate to messages before disconnecting clients. Default: This option is specified in bytes,
and accepts the standard AMPS notation
(for example, |
MessageDiskPath |
The path to use to write offline files. Default: |
ClientMessageAgeLimit |
The maximum amount of time for the
client to lag behind. If a message
for the client has been held longer
than this time, the client will be
disconnected. This parameter is an
AMPS time interval (for example,
Default: No age limit |
ClientMaxCapacity |
The amount of available capacity a
single client can consume. Before a
client is offlined, this limit
applies to the
Default: |
Table 3.3: Slow Client Management
Minidump Settings¶
AMPS minidumps contain information on the current state of the AMPS program execution, which is useful for support and diagnostics. AMPS will generate a minidump file on any crash event, or a minidump file can be generated at any point in time through the monitoring interface (see the AMPS Monitoring Reference Guide).
AMPS allows you to set the directory in which minidump files will be created and the permissions mask for minidump files.
Element | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MiniDumpDirectory |
Location to store AMPS mini dumps. Default is
The special value |
||||||||||||
MiniDumpFileMask |
Permissions mask for minidump files. The value of the mask is an octal number (by convention, four digits) in the same format as the standard umask command, and AMPS applies this mask exactly as the umask command would. The file is created with the user and group that the AMPS server process runs under. AMPS accepts a maximum value of For example, here are some common umask settings:
Default: |
Table 3.4: Mini Dump Directory Parameters
<AMPSConfig>
...
<MiniDumpDirectory>/var/tmp</MiniDumpDirectory>
<MiniDumpFileMask>0644</MiniDumpFileMask>
...
</AMPSConfig>
Example 3.3: MiniDump Configuration Example
Configuration Validation¶
The configuration validation option can be used to enable or disable the validation checking performed by AMPS on the initialization of each instance. Disabling the configuration validation can cause AMPS to start in an invalid state or not properly log warnings or errors in the configuration file.
Caution
Configuration validation should only be disabled during testing or debugging in cases where it is known that the configuration may produce errors (for example, while developing a configuration generator). 60East strongly recommends against disabling configuration validation in a production or development environment.
Element | Description |
---|---|
ConfigValidation |
Setting this to When this option is set to |
Table 3.5: Config Validation Parameters
<AMPSConfig>
<ConfigValidation>enabled</ConfigValidation>
</AMPSConfig>
Example 3.4: Configuration Validation Example
Tuning¶
The Tuning
section of the configuration file sets instance-level
parameters for tuning the performance of AMPS. In many cases, AMPS
self-tunes to take advantage of the hardware and environment. However,
explicitly setting tuning parameters is sometimes necessary in cases
where an AMPS instance cannot determine the best value. For example, if
multiple AMPS servers are running on the same system, 60East recommends
disabling NUMA.
Caution
Use the Tuning
element with care.
Options in the Tuning
element can affect AMPS performance,
and the behavior of Tuning
options may be version-specific.
Element | Description |
---|---|
NUMA/Enabled |
Setting this to The default value of Likewise, if the system that hosts AMPS runs other
CPU-intensive processes, setting this option
to This option can also be set by setting the
Default: |
Table 3.6: Tuning Parameters
<AMPSConfig>
<Tuning>
<NUMA>
<Enabled>enabled</Enabled>
</NUMA>
</Tuning>
</AMPSConfig>
Example 3.5: Tuning Example
Externals¶
The AMPS server depends on external libraries for some functionality. The Externals configuration item allows you to control the exact shared object loaded for some of these external libraries, particularly those related to security.
Element | Description |
---|---|
SSL/Library |
The path and shared object name of the SSL library to use for this instance. AMPS requires an SSL library that is compatible with OpenSSL 1.0.2 or later. By default, AMPS specifies the object name, and uses the standard shared object loading mechanism to resolve the object name. With this configuration option, you can direct AMPS to load a specific shared object. Default: |
Crypto/Library |
The path and shared object name of the cryptography library. By default, AMPS specifies the object name, and uses the standard shared object loading mechanism to resolve the object name. With this configuration option, you can direct AMPS to load a specific shared object. Default: |
Curl/Library |
The path and shared object name of the Default: |
Table 3.7: Externals Parameters
<AMPSConfig>
<Externals>
<SSL>
<Library>/opt/audited/libopenssl.so</Library>
</SSL>
<Crypto>
<Library>/opt/audited/libcrypto.so</Library>
</Crypto>
<Curl>
<Library>/opt/resolver/lib/libcurl.so</Library>
</Curl>
</Externals>
</AMPSConfig>
Example 3.6: Externals Example