Issue with using Aerospike with an AWS Elastic IP

aws

#1

We’re trying to setup our Aerospike cluster (2 C4.2xlarges in our AWS VPC) so that it is available behind an Elastic IP. Obviously, this is the safer route as we won’t need a configuration change to update hostnames for our Aerospike clients in the case where one of our Aerospike nodes goes down.

We found that using the Elastic IP address itself doesn’t actually work for whatever reason, but using the Publish DNS entry does. We figured this out after googling around for a while and finding this. We tried using the recommended steps here but those didn’t work and actually were causing issues between the nodes:

[ec2-user@aerospike-3-4 log]$ aql -h localhost -p 6000
2016-04-02 01:00:22 WARN AEROSPIKE_ERR_TIMEOUT
Aerospike Query
Copyright 2013-2015 Aerospike. All rights reserved.

aql> 2016-04-02 01:00:23 WARN AEROSPIKE_ERR_TIMEOUT
2016-04-02 01:00:25 WARN AEROSPIKE_ERR_TIMEOUT

aql>
aql>
aql> 2016-04-02 01:00:27 WARN AEROSPIKE_ERR_TIMEOUT

We figured this out, but I wanted to inform others since this seems like a very weird issue to have.


#2

The other issue is that Elastic IPs are public IPs, which means accessing them, even from other EC2 servers, will always roundtrip to the public internet and back again which increases latency and does not work with security groups easily as you read about in the post.

Always use the DNS names that AWS provides because they will automatically resolve to internal IPs when used inside the AWS network.