dragonflyoss / Dragonfly

This repository has be archived and moved to the new repository https://github.com/dragonflyoss/Dragonfly2.
https://d7y.io
Apache License 2.0
6k stars 773 forks source link

Dragonfly for docker image distribution #850

Open xzy256 opened 5 years ago

xzy256 commented 5 years ago

Question

I test the dragonfly for image distribution efficiency. I have 2 supernode, 18 dfclient. I simulate dfclient pull 20G image at some time with crontab. Only 2 dfclient can pull successfully. Others occur Get https://registry-1.docker.io/v2/: dial tcp 34.232.31.24:443: connect: network is unreachable error, some image mirror layer print output like 60b1ddcd47df: Retrying in 1 second. I restart supernode, pull again at pull error machine, it can pull succeccful. Why? Q: Have you test really the image distribution efficiency for simulating pull request at same time with installing crontab work?

What you use for docker image distribution at your department?

config:

# cat /etc/dragonfly/dfget.yml 
minRate: 32k
# cat /etc/dragonfly/dfdaemon.yml 
dfget_flags: ["--expiretime","30m0s","--alivetime","35m0s"]

a part info for docker info:

Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 docker.registry.clouddev.sogou:5000
 127.0.0.0/8
Registry Mirrors:
 http://127.0.0.1:65001/

supernode start cmd:

docker run -d  --net=host --name supernode --restart=always -p 8001:8001 -p 8002:8002 -v /search/odin/xuezhiyou/.small-dragonfly:/home/admin/supernode docker.registry.clouddev.sogou:5000/xzy-test/supernode:0.4.3 --advertise-ip=10.141.186.89

dfclient start cmd:

docker run -d --net=host --name dfclient -p 65001:65001 -v /etc/dragonfly:/etc/dragonfly -v /search/odin/xuezhiyou/.small-dragonfly:/root/.small-dragonfly docker.registry.clouddev.sogou:5000/xzy-test/dfclient:0.4.3 --registry http://docker.registry.clouddev.sogou:5000 --node=10.141.186.89,10.141.186.91 --ratelimit="100M"
lowzj commented 5 years ago

What's your docker pull command?

xzy256 commented 5 years ago

docker pull deep/sogou-centos7-vm-cuda8-base:tf1.8.0

xzy256 commented 5 years ago

@Starnop say that

it is a concurrency problem of supernode