I’m running two fly apps – one is a rails app, the other is a container running a redis instance. I’ve read some info in the fly docs about the private networking stack, but when I try to make a connection over the internal address, it doesn’t work:
redis = Redis.new(url: 'redis://:PASSWORD@APPNAME.internal:10000')
# => Redis::CannotConnectError (Error connecting to Redis on APPNAME.internal:10000 (Errno::ECONNREFUSED))
I’ve also tried the above with the ipv6 address returned by the DNS commands from this article but I get the same error.
Maybe there’s something I’m missing about connecting to ipv6 addresses?
I think the confusion here comes from the port 10000 in services. That will an external port, internet-facing. The internal port number will be 6379, and that’s the one you should use to connect internally.