Network configuration - aerospike/aerospike-benchmark GitHub Wiki
Connecting to an Aerospike cluster
To connect to an Aerospike cluster, pass the --hosts
flag (or -h
for short), followed by a list of seed host(s) with format hostname1[:tlsname1][:port1][,...]
. For more information on how to format this string, see the documentation for as_config_add_hosts
here.
For example, to connect to localhost:3000
(note that this is the default if -h
and -p
aren't specified):
target/benchmarks -h 127.0.0.1:3000
To connect to a two-node cluster with nodes at 192.168.0.1
and 192.168.0.2
, both running Aerospike on port 3000, run:
target/benchmarks -h 192.168.0.1,192.168.0.2
Connecting to a cluster requiring authentication
If a cluster requires authentication to connect to, you can specify the username with --user
(-U
for short) and password with -P
. The password must immediately proceed the -P
without an intervening space. If -P
is not supplied, the password will be prompted for on the command line.
For example, to log into a server with username "MyUsername" and password "MyPassword", run
target/benchmark -U MyUsername -PMyPassword
To set the authentication mode on the username/password credentials provided, use --auth
followed by one of INTERNAL
, EXTERNAL
, or EXTERNAL_SECURE
(the default is INTERNAL
).
Socket/connection timeouts
To set the total timeout on all transactions (i.e. start-to-finish timeout), pass the --timeout
(or -T
) flag followed by the timeout in milliseconds. To specify different timeouts for read and write transactions, use --readTimeout
and --writeTimeout
.
To run with a 1 second total timeout:
target/benchmark -T 1000
To set timeouts on the socket connections, pass the --socketTimtout
flag followed by the timeout in milliseconds. To specify different timeouts for read and write socket connections, use --readSocketTimeout
and --writeSocketTimeout
.
To set the maximum number of retries before aborting the current transaction, use --maxRetries
. The default max number of retris is 1.