Skip to content

[Feat]: Add a download data rate limitation for the sync mode #2410

Description

@SimHeb

Is your feature request related to a problem? Please describe.

When running zot on small scale edge locations or IOT environments with a shared internet line, there might be the relevance to limit the download data rate for the download from a registry.

Especially when mirroring another registry as written in here, syncing the registry might cause a very high bandwith footprint in initial deployment

Describe the solution you'd like

Make the downloadRate configurable for the zot registry could easily accomplish this requirement.
E.g. setting something like this:

{
  "distSpecVersion": "1.0.1",
  "storage": {
    "rootDirectory": "/tmp/zot",
    "gc": true
  },
  "http": {
    "address": "0.0.0.0",
    "port": "8080"
  },
  "extensions": {
    "sync": {
      "enable": true,
      "registries": [
        {
          "urls": ["https://k8s.gcr.io"],
          "content": [
            {
              "prefix": "**", 
              "destination": "/k8s-images"
            }
          ],
          "pollInterval": "12h",
          "downloadRate": "100mbps",   
          "onDemand": false,
          "tlsVerify": true
        },
      ]
    }
  }
}

would create a low bandwith consuming zot container registry

Describe alternatives you've considered

I am not aware of an alternative solution that provides such a functionality

Additional context

Especially in wide scale environments, such as retailers that have local container registries, limiting the download bandwith is a strong requirement

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions