We’re using Aerospike Ruby client (v2.11.0) and I’m using AWS ELB address to initialize the client.
::Aerospike::Client.new(elb_address)
We’re seeing occasional errors Aerospike::Exceptions::Aerospike: Server not available
File /webapps/api/vendor/bundle/ruby/2.6.0/gems/aerospike-2.11.0/lib/aerospike/cluster.rb line 65 in connect
File /webapps/api/vendor/bundle/ruby/2.6.0/gems/aerospike-2.11.0/lib/aerospike/client.rb line 64 in connect
File /webapps/api/vendor/bundle/ruby/2.6.0/gems/aerospike-2.11.0/lib/aerospike/client.rb line 56 in initialize
For connection, we’re just using the default policies. At the moment we have just 3 nodes in the cluster.
You can’t use aerospike with a load balancer, so its probably messing up the partitioning algorithm on the client side. DNS is fine, but load balancing is not ok for Aerospike see Smart Client | Aerospike
I was looking into this issue more. Turns out that when the initial connection times out, you can also get Aerospike::Exceptions::Aerospike: Server not available. I tried increasing this timeout from the default 1 second to 5 seconds, but we’re still getting that error.