i have 2 apps, a Python app from which I want to send traffic to a Redis app on fly. I have tried configuring the IP address and the hostname of the Redis app in the Python app but getting timeouts. Is there a guide that describes how i can connect them?
You could use Fly-managed Redis, which makes the setup a whole lot easier: Preview: Managed Upstash Redis with read replica support
If not, here’s a handy Fly-deployable geo-replicated Redis server, to which Fly apps can talk over
6pn: GitHub - fly-apps/redis-geo-cache: A global Redis cache
Fly managed upstash redis will timeout each connection within minutes. If you launch your own instance of redis (either as a separate fly app or as a process within an existing fly app) you can control its behavior.
We have this guide for setting up a standalone redis server: Redis - standalone Redis Server · Fly Docs
If your python app supports redis urls, use something like
redis://default:YOUR_REDIS_PASSWORD@YOUR_REDIS_APP_NAME.internal to connect to it. If it doesn’t support urls, make sure to use the
YOUR_REDIS_APP_NAME.internal as the redis hostname.
Another thing to try is
fly ssh console into your python app, and try running
redis-cli -u redis://default:YOUR_REDIS_PASSWORD@YOUR_REDIS_APP_NAME.internal info. If that works and the python app still doesn’t, that may mean there is a bug in the python app.