我将Redis用作AWS的服务,以用于移动设备中的聊天应用程序的内存缓存。我当前面临的问题是我无法从任何Redis客户端连接到Redis服务器。到目前为止,我已经从Redis文档中了解到您无法在AWS环境之外进行连接。
最佳答案
如documentation中所述,建议不要像尝试连接那样访问Elasticache集群。
Elasticache is a service designed to be used internally to your VPC. External access is discouraged due to the latency of Internet traffic and security concerns. However, if external access to Elasticache is required for test or development purposes, it can be done through a VPN.
您可能要做的是创建一个与AWS Elasticache Redis集群通信的新api,并且您的移动后端将通过使用此API与Redis进行通信。
通过这种方式,它将更加安全,易于管理(无需在移动应用程序上放置凭据),易于维护(可以使更改变得更容易)。
关于android - 如何从移动应用程序与Redis服务器连接以对移动应用程序的Redis数据库执行不同的操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62968120/