Combatibility with redis api for testing mockups

0

I am just getting started with Golang and ElastiCache and wish to be able to use https://github.com/elliotchance/redismock. I realize that the full cluster capabilities differ significantly, but would I be able to do testing of my code using a mock redis client and have that code work when deployed against an Elasticache cluster?

已提問 3 年前檢視次數 338 次
2 個答案
0

Hi imarsman2,
ElastiCache Redis is fully compatible with the Redis APIs and as you can see in this documentation [1] self-managed Redis applications can be migrated seamlessly to ElastiCache for Redis without any code changes. The only modification you need to apply when migrating your code to ElastiCache is to enter the endpoint of the cluster, see "Finding Connection Endpoints" [2] for more details about the endpoints. For your particular use case, if redismock is deigned to be compatible with Redis (with or without the cluster protocol), your code should not have problems to interact with redismock and ElastiCache.
Please also note that in order to deliver a managed service experience, a few commands requiring advanced privileges are restricted in ElastiCache [3].
I hope this will help!
[1] https://aws.amazon.com/elasticache/redis/
[2] https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Endpoints.html
[3] https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/RestrictedCommands.html

AWS
已回答 3 年前
0

That is indeed helpful! Thank-you.

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南