Download page Share a Proxy Among Node.js Agents.
Share a Proxy Among Node.js Agents
This page describes how to configure multiple Node.js Agents on a machine to share a single, multi-tenant Java proxy.
Configure a Shared Proxy
- Stop the Node.js application.
Create directories for the agent and the agent logs and for the proxy control directory. The permissions on this directory must be readable and executable by the application user that the application and writable by the proxy user.
mkdir /tmp/appd /tmp/appd/logs /tmp/appd/proxy_ctrl_dirCODE
When you upgrade the Node.js Agent, you may want to create these directories automatically.
Disable automatic proxy launching for each agent. In the AppDynamics
proxyAutolaunchDisabledto true and set the
proxyCtrlDirto the directory that you created.
... proxyAutolaunchDisabled: true, proxyCtrlDir: '/tmp/appd/proxy_ctrl_dir', ...CODE
Ensure that each agent that reports to the multi-tenant proxy is configured with a unique node name.
- Before you start the agents, start the shared Java proxy and pass the agent control directory from the
proxyCommunicationDirargument to the
runproxyscript. AppDynamics recommends that you configure the proxy to start on system startup. See Start the Proxy Manually for Node.js.
- Restart the Node.js application. The nodes should appear in the Controller UI flow maps in a couple minutes.
Proxy Sharing Limits
By default, a single proxy can handle up to ten agents. If you need to run more, you will have to adjust the
maxPermSize settings in the
When adding agents, use debug mode and monitor the
proxy.out file, which indicates whether the proxy is running out of heap. The file is visible when running in debug mode.