I have the current setup.
Account A exposes an elasticache(redis) service via private link. The elasticache servers sit behind a NLB.
Account B accesses the service with the DNS name created during the VPC endpoint creation.
When running the cli command from Account B:
redis-cli -c -h dns-name -p 6379
The inital connection is successful. However, then when I run get foo
, if the slot for key foo is not on the node connected to currently, redis redirects to another node in the server as expected. However, this redirection involves a private IP address of Account A which Account B has no idea about. Thus resulting in a timeout. Is there any workaround for this?
Yes, you would need a Redis client which supports NAT mapping, as the ioredis package for Node.js. AFAIK, redis-cli does not support that.