1 year ago
#159215

SZDevelopment
Connecting to GCP redis memory store with cloud run
we are currently trying to connect to a memory store redis instance with cloud run using the npm redis library https://www.npmjs.com/package/redis in version 4.0.3
The config looks like this:
const redisConfig = {
url: 'redis://<IP-ADDRESS>:6379',
legacyMode: true,
socket: {
reconnectStrategy: (retries) => Math.min(retries * 50, 500),
},
};
...
redisClient
.connect()
.then(() => {
process.stdout.write('redis connection initiated');
})
.catch((err) => {
process.stdout.write('redis connection failed', err);
});
previously the same caching system was working on a kubernetes cluster, so we'd consider the setup correct.
From the logs in our cloud run we were able to confirm, that a connection is established, but we are not able to see any cache hits or load on the redis instance.
Does anyone know if there are some specific things to consider when connecting to a redis instance on gcp with cloud run that we might be missing?
Thanks in advance for your help
node.js
google-cloud-platform
google-cloud-run
node-redis
google-cloud-memorystore
0 Answers
Your Answer