Search code examples
redisredis-clusterhiredisgoogle-cloud-memorystore

Migrate from Redis to Memorystore


Currently we are using hiredis-vip client library for C++ to connect Redis instance.

Memorystore documentation says that all existing tools and client libraries for Redis just work with Memorystore. So, will my existing C++ codes work with Memorystore without any code change?


Solution

  • I was able to verify the usability of C/C++ client library with Memorystore. Spun up GCE instance and Memorystore in the same region and zone. Then I installed hiredis-vip client library on GCE, compiled and built the sample example code.

    Ref. Code. https://github.com/vipshop/hiredis-vip/blob/master/examples/example.c

    You may find the references online about library installation and C/C++ code compilation and building process. I only had to modify the IP address. This code ran flawlessly. So, it is proved that we can move our applications using open source Redis to use Memorystore for Redis without any code changes.