External Upstash & Fly.io

Hi, how do I use an external upstash account (not created with fly ctl) and a database on that within fly’s architecture?

I have looked though multiple posts here that mention use of family: 6 (ipv6) but I believe this is needed for upstash on fly. I have a barebones client, code copied from the upstash console, works locally e.g. using IORedis:

const redisConnectionString = ‘rediss://default:xxx@simple-wolf-16227.upstash.io:6379‘;
const queueConnection = new IORedis(redisConnectionString);

I have tried:

const redisConnectionString = ‘rediss://default:xxx@simple-wolf-16227.upstash.io:6379?family=6‘;
const queueConnection = new IORedis(redisConnectionString);

and:

const redisConnectionString = ‘rediss://default:xxx@simple-wolf-16227.upstash.io:6379‘;
const queueConnection = new IORedis(redisConnectionString, { family: 6 });

I always get:

{"errno":-3007,"code":"ENOTFOUND","syscall":"getaddrinfo","hostname":"simple-wolf-16227.upstash.io"}

What is the expected way to achieve this? Seems odd that an external service would not be contactable from within fly but can imagine its something to do with resolving upstash.io dns records.

It doesn’t look like global-cac1.upstash.io has a valid AAAA record. What happens if you use ipv4? Fly machines can connect just fine over ipv4.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.