So both VMs in your swam are within the same GCP project? Are they deployed to the default VPC? If they are, there should be a firewall rule called default-allow-internal that allows internal communication between VMs.
If they’re not deployed on the default VPC, you may have want to have that rule created for your custom VPC.
Are you connecting from client to server via internal IP or external IP? Because that firewall only covers internal traffic.
Yes they are connected to the same network. When i try to connect using Redis cli command from manage to worker, it works. The problem is only when i try it from inside the docker. I just saw that the problem exists only for Redis docker. I ran a similar test for nginx and it works.
That sounds like a possible config issue. What does your redis.conf look like? I think there’s a binding param in there that sets what interface it listens for connections on.