This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
Dockerhub Rate Limiting #5219
Comments
Good idea, I think this can also solve the problem of not being able to pull the k8s image in mainland China. Users only need to use the proxy server to pull the target images to master node or use per-downloaded images, and pull to the local docker registry, and then deploy openpai service. On the other hand, after this optimization, as long as the master node can access the Internet, our service can run normally. All tasks of pulling images from dockerhub are done by the master node, and then the worker nodes pull the images from the mirror registry deployed on the master node. |
TODO List:
|
This was referenced Jan 5, 2021
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Introduction
On November 20, 2020, rate limits anonymous and free authenticated use of Docker Hub went into effect. Anonymous and Free Docker Hub users are limited to 100 and 200 container image pull requests per six hours -- from official doc
Issues
In current OpenPAI, all jobs in the cluster pull images from dockerhub with a certain free account. So it will be soon to reach the rate limit if the cluster has heavy load.
When deploying or upgrading OpenPAI, there is a step that admin will build and push new images to configured registry (currently is docker.io/openpai). Admin will fail to build and push new images when reaching rate limit.
When start services in OpenPAI, the k8s cluster will create pods which pull images from configured registry (currently is docker.io/openpai). When reaching rate limit, cluster will fail to create pods.
Proposals
Work Plan
Test the rate limit from local script
Test scripts can find in this repo, currently python version is finished.
In local test phase, due to limit of download rate, I implement a test minimal image, reached docker hub rate limit after 326
downloads. After that, it will response a 500 error code,
In the repo above, there is also a bash script to query rest pull time. When reach limit rate, it shows as following.
Deploy a local pull through registry to check if the pull rate is reduced successfully
In above repo, there is also a boot_local_docker_pull_through_cache_registry.sh bash script, which can boot a pull-through
cache registry on local machine. With local pull through cache registry, After 400 downloads in 2 hours, the docker hub rest rate
limit is still 99 (100 quota for anonymous downloads).
Test the rate limit in OpenPAI cluster, see in what scenario this rate limit will be triggered and cause problems
Trying to submit multi taskrole jobs, to reach rate limit on int bed, but meet oom question, job name: v-xianglong_85cf447f
Deploy pull through registry in OpenPAI and test
Demos
TODO
Test cases
The text was updated successfully, but these errors were encountered: