Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rate limit for image pulling #159

Open
stevefan1999-personal opened this issue Aug 23, 2023 · 1 comment
Open

Rate limit for image pulling #159

stevefan1999-personal opened this issue Aug 23, 2023 · 1 comment

Comments

@stevefan1999-personal
Copy link

Since DockerHub imposed a download limit for each IP, and under the NAT (AWS is infamous for this recently since it started taking money for dedicated IPv4 address, so we have to use NAT gateway of some sort) we share the same IP.

This means there could be multiple pulls under a same IP address for all the nodes in the cluster and will contest for image pulling backoff, which is under the category of Thundering herd problem.

Until DockerHub provides a stable IPv6 service, we can't possibly give each node a dedicated IPv4.

In order to mitigate this we will need to make the node to download the image one by one at a suitable interval. Otherwise, it will take at least quadratic time for all nodes to finish downloading images.

@stevefan1999-personal
Copy link
Author

At the very least, I advise we have a cluster level lease lock to implement leader locking: Lease | Kubernetes

We can use an init container to contest for locks, and when the init container and downloader finishes, the lock should automatically be released, and is available for other nodes to contest with.

Another approach is to use a stateful set and rollout the deployment to each node one by one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant