Skip to main content
Loading

Dynamically Increasing the Number of Connector Instances

You can dynamically add connector instances to your change-notification system. You add them by running the asinfo command with action set to add. This command persists the instances in memory only, and does not add them to the xdr section of the /etc/aerospike/aerospike.conf configuration file.

The change-notification system includes the dynamically added nodes in its round-robin load-balancing of the messages that it sends to the connector instances.

Prerequisiteโ€‹

Prepare additional connector instances and that you can start when necessary. For the connector that you are using, follow the instructions for installing and configuring connector instances.

Procedureโ€‹

For every connector instance that you want to add, follow these steps:

Start the connector instanceโ€‹

See the Prerequisite section for a link to the instructions for the type of connector that you are using.

Run asinfo to add the connector instance to the change-notification systemโ€‹

Run the command that is valid for the version of your Aerospike database:

If your Aerospike database is at version 5.0.0 or later, and you are not using TLSโ€‹

asinfo -v "set-config:context=xdr;dc=<ConnectorDC>;node-address-port=<NodeAddress>:<NodePort>;action=add"
  • dc: The dc that the connector instance belongs to. This value must match the name of the dc that you are using for the connector instances that are listed in the xdr section of /etc/aerospike/aerospike.conf.
  • node-address-port: The address and port of the node on which the connector instance is configured. For a full description of this parameter, see this reference documentation.

Example:

asinfo -v "set-config:context=xdr;dc=connector;node-address-port=192.168.1.134:8080;action=add"

If your Aerospike database is at version 5.0.0 or later, and you are using TLSโ€‹

asinfo -v "set-config:context=xdr;dc=<ConnectorDC>;node-address-port=<NodeAddress>:<NodePort>:<TLSName>;action=add"
  • dc: The dc that the connector instance belongs to. This value must match the name of the dc that you are using for the connector instances that are listed in the xdr section of /etc/aerospike/aerospike.conf.
  • node-address-port: The address and port of the node on which the connector instance is configured. For a full description of this parameter, see this reference documentation.

Example:

asinfo -v "set-config:context=xdr;dc=connector;node-address-port=192.168.1.134:8080:connector.aerospike.com;action=add"

If your Aerospike database is at a version earlier than 5.0.0โ€‹

asinfo -v "set-config:context=xdr;dc=<ConnectorDC>;http-url=http://<NodeAddress>:<NodePort>;action=add"
  • dc: The dc that the connector instance belongs to. This value must match the name of the dc that you are using for the connector instances that are listed in the xdr section of /etc/aerospike/aerospike.conf.
  • http-url: The HTTP URL of the node on which the connector instance is configured. For a full description of this parameter, see this reference documentation.

Example:

asinfo -v "set-config:context=xdr;dc=connector;http-url=http://192.168.1.134:8080;action=add"

If your Aerospike database is at a version earlier than 5.0.0, and you are using httpsโ€‹

asinfo -v "set-config:context=xdr;dc=<ConnectorDC>;http-url=https://<NodeAddress>:<NodePort>;action=add"
  • dc: The dc that the connector instance belongs to. This value must match the name of the dc that you are using for the connector instances that are listed in the xdr section of /etc/aerospike/aerospike.conf.
  • http-url: The HTTP URL of the new outbound node. For a full description of this parameter, see this reference documentation.

Example:

asinfo -v "set-config:context=xdr;dc=connector;http-url=https://connector.aerospike.com:8080;action=add"

Resultโ€‹

If the asinfo command runs successfully, it returns ok.

To see the status of the node for the connector instance, run the asadm command info xdr for <dc>, where <dc> is the value of dc in the asinfo command. The output looks like this:

Admin> info xdr for DC1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~XDR Information DC1 (2021-06-17 00:11:48 UTC)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Node|Success|~~~~~~~~Retry~~~~~~~~~|Recoveries| Lag| Avg|Throughput
| |Connection|Destination| Pending|(hh:mm:ss)|Latency| (rec/s)
| | Reset| | | | (ms)|
10-0-0-3.heln.qwest.net:3000| 224| 0| 0| 0| 00:00:00| 0| 1078
10-0-0-5.heln.qwest.net:3000| 206| 0| 0| 0| 00:00:00| 0| 970
| | | | 0| | 0|
Number of rows: 2