On this page:
In certain types of application environments, a large number of nodes can be spawned dynamically and live for a relatively brief period of time.
For example, a dynamic workload manager can spawn transient JVMs for an existing application server (called a servant) based on application load or other policies. The spawned JVMs are identical, but each has a different process ID.
Similarly, in dynamic hosted environments such as AWS, Rackspace, and others, nodes can be brought up and taken down frequently.
Considerations for a Dynamic Environment
The AppDynamics app agent operates substantially the same way in a dynamic environment as it does in a traditional data center. However, a few considerations apply when deploying agents in these environments:
- Ensure that the agents can reach your Controller. Particularly if your Controller operates on-premises while the agents run on hosted servers, you need to ensure that the agents can access the Controller through the firewalls in your environment.
Configure custom node expiration handling. By default, the Controller manages the lifecycle for a node based on default timeout settings. You will likely want to reduce the default expiration times for nodes, as described in Historical and Disconnected Nodes. To manage this directly, rather than relying on activity timeouts, a strategy would be to run a script in the JVM before it shuts down that invokes the mark-nodes-historical resource in the AppDynamics REST API to declare itself historical to the Controller.
- Depending on the nature of your environment, it may not make sense to track each JVM instance as a distinct node in AppDynamics, since the set of nodes in this case would be boundless. Also, since the JVMs are identical, representing them as different nodes in AppDynamics does not best reflect the logical model of the environment. The following section provides more information.
Configuring the Agent for Dynamic Environments
You can configure AppDynamics to reuse node names for these types of environments. With node name reuse enabled, after a node is shut down and marked as historical in AppDynamics, the name of the node becomes available for reuse in subsequently registered nodes. You can also specify a node name prefix when reusing node names to indicate the association between all concurrently running JVMs for the dynamic application.
To configure the agent for this environment, use the following properties:
- Reuse Node Name Property to enable re-use of node names, and
- Auto Node Name Prefix Property to set the prefix used for automatically-named nodes
When enabled, the Controller manages name assignments for the agents. It forms node names by appending a sequentially incremented number as the suffix to the prefix you specify. Be sure to avoid specifying the node name using any other mechanism (such as in controller-info.xml file or via a system property).
The following listing shows sample settings for the properties as they may appear in a startup script: