-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Elasticache Redis Cluster MOVED Redirect fails #4
Comments
@neonexus please make an issue on the ioredis repo, will take a look there. |
@Salakar there's no need, I found the fix yesterday as I was leaving work. Ultimately, it would be good to make mention of this in the documentation. Because AWS Elasticache Redis Clusters are designed to be used with a single endpoint address, I was configuring the connection with "host". Didn't realize I had to use "hosts: [{host: 'Elasticache CFG Endpoint'}]" to trigger the clustering options. Once I fixed the config, everything worked again. |
I was having trouble with this too so I'm posting my solution to connect to an AWS Redis (ElasticCache) cluster. I had the most success using the ioredis package for connecting to Redis from a Node.js script on my EC2 instance. I used the path that AWS calls the "Configuration Endpoint" for My EC2 is behind a VPC, so I also made sure my inbound network connections allowed port 6379 as documented here. This solution also fixed the
|
When using AWS's Elasticache Redis Cluster (has built-in failover / replication / load balancing, no need to know the server addresses), occasionally Elasticache has to move data around, so it issues a MOVED Redirect, but this causes the adapter to fail, so Sails falls flat on it's face during lift. This is the console output I get when attempting to lift the app:
As you can probably tell, I have a model called ActivePeople that uses the adapter; it tracks live usage of the app (and wether or not the app is in focus).
Please help!
The text was updated successfully, but these errors were encountered: