Accessing redis container from a container in different region

Hi,

I’m wondering how to access a redis endpoint (volume is in ewr) from a container (in mia). I can successfully connect to redis w/ wireguard at [app-name]-redis.internal:6379 – but it doesn’t work when I’m in one of my containers. I’ve tried using ewr.[app-name]-redis.internal:6379, but that doens’t work either. Any ideas how to connect from a container in a diff region? I just kind of assumed it would given it works for postgres using the top2.nearest.of prefix.

Thanks!

Assuming the redis app and vm app are in the same organization, they should be able to connect using .internal, using the port (which would be 6379, so it’s not that) …

Are you using the Fly image for Redis (Redis on Fly)? Or your own? Only the Fly one requires a password so if you aren’t sending one, that’s an easy thing to miss.

Next thought: is this container a Node app? Only that can have issues with IPv6 which is not the default. The fix for that:

Ruling those out as the cause … er, that’s the extent of my knowledge. Someone else will be able to assist though.

Hey – thanks for the reply. I am using the Fly image for Redis. I have set a password, and can connect fine from my client on my mac. The container IS a node app – that could definitely be it. Unfortunately I can’t seem to find a config for IPv6 addresses in the node queue library I’m using GitHub - OptimalBits/bull: Premium Queue package for handling distributed jobs and messages in NodeJS.. That could definitely be it though, just don’t know how to fix yet.

You’re welcome.

Ah. Seems likely to be that then since ioredis is listed as a dependency:

Actually! Just found the option using bull: GitHub - OptimalBits/bull: Premium Queue package for handling distributed jobs and messages in NodeJS.

… I just can’t read, apparently :slight_smile:

That worked – thank you so much random internet stranger!!!

2 Likes