Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Elasticache Timeout from EC2

I am getting connection timeout from EC2 trying to connect to AWS Elasticache.

I launched a 1-node elasticache cluster I launched an EC2 instance, made sure availability zone was the same as the cluster, us-west-2b

I did not create a new VPC. I see one is already created.

I ran a nslookup on my elasticache endpoint. It looks like a different /20 than my ec2.

I looked through the documentation and the ec2 launch and did not see where I can specify the subnet, except the availabilty zone.

like image 923
stampede76 Avatar asked Mar 23 '16 03:03

stampede76


People also ask

Does ElastiCache run on EC2?

Your Amazon ElastiCache instances are designed to be accessed through an Amazon EC2 instance. If you launched your ElastiCache instance in an Amazon Virtual Private Cloud (Amazon VPC), you can access your ElastiCache instance from an Amazon EC2 instance in the same Amazon VPC.

What is TTL in ElastiCache?

Time to live (TTL) is an integer value that specifies the number of seconds until the key expires. Redis can specify seconds or milliseconds for this value. When an application attempts to read an expired key, it is treated as though the key is not found. The database is queried for the key and the cache is updated.

How many connections can ElastiCache handle?

Large number of connections Individual ElastiCache for Redis nodes support up to 65,000 concurrent client connections.

Is ElastiCache single threaded?

AWS ElastiCache servers with redis come in everything from very small to very large multi cpu boxes. But redis is single threaded.


1 Answers

I think the problem is about security groups of your instance.

To the best of my knowledge you need to allow the traffic on the security group associated to your EC2 instance.

If you are using memcached the port is 11211 if redis the port is 6379

Try to have a look to the AWS official documentation.

http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/GettingStarted.AuthorizeAccess.html

I hope this helps somehow.

like image 123
Maurizio Benedetti Avatar answered Sep 23 '22 22:09

Maurizio Benedetti