Open niaomingjian opened 2 years ago
Redis can connect fast only if I run pongo in my VirtualBox VM and turn off VM's internet network at the same time.
It seems it takes 20 seconds to look up redis
if the internet network is open. What's the root cause of this situation?
Enabled the redis in pongo. Tested the following simple code. Redis connect always takes 20 seconds.
output:
If pongo expose and access redis with host ip or internal ip in docker network (like pongo-daa49114), redis connect fast.
Host Centos8
docker version
docker compose version Docker Compose version v2.6.0
In a windows PC installed docker for desktop with WSL2, redis connect with SERVICE_NETWORK_NAME alias (i.e. pongo-xxxxxxxx-redis.pongo-xxxxxxxx) is fast, but slow in the CentOS machine. connect with service name
redis
is slow too.Host Windows10
docker version
docker compose version Docker Compose version v2.0.0-rc.1
Why did redis connect take so much time (with service name redis)? Anybody encountered this case?