Dynamically Increasing the Number of Source Connector Instances
You can dynamically add source 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 source connector instances.
Prerequisiteโ
Prepare additional source connector instances you can start when necessary. Follow these instructions for installing and configuring Aerospike Kafka source connector instances.
Procedureโ
For every source connector instance you want to add, follow these steps:
Start the source connector instanceโ
Follow these instructions to start the source connector instance.
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 source connector instance belongs to. This value must match the name of the dc that you are using for the source connector instances that are listed in thexdr
section of/etc/aerospike/aerospike.conf
.node-address-port
: The address and port of the node on which the source 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 source connector instance belongs to. This value must match the name of the dc that you are using for the source connector instances that are listed in thexdr
section of/etc/aerospike/aerospike.conf
.node-address-port
: The address and port of the node on which the source 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 source connector instance belongs to. This value must match the name of the dc that you are using for the source connector instances that are listed in thexdr
section of/etc/aerospike/aerospike.conf
.http-url
: The HTTP URL of the node on which the source 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 source connector instance belongs to. This value must match the name of the dc that you are using for the source connector instances that are listed in thexdr
section of/etc/aerospike/aerospike.conf
.http-url
: The HTTP URL of the new source (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 source 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