If your Redis cluster is hosted somewhere on the cloud and you are wondering whether you can connect to your Redis cluster or not, here I will show you how you can quickly check if your Redis Remote Server is running and accepting connections.
- Redis Cluster
- sudo privileges
- redis-cli installed
- Telnet should be the first and the easiest thing that you can try. You can change your Redis port and endpoint accordingly.
telnet redis.endpoint.com 6379
If the connection is successfully established you will get:
Trying 10.140.110.121... Connected to redis.endpoint.com. Escape character is '^]'.
- Another proper way is to use
redis-cli -h redis.endpoint.com -p 6379
- If you don’t receive the above outputs, probably your Redis Cluster either has a firewall that blocks you, it’s within a private network or the cluster is down.
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.