Skip to content

Batch requests for docker image size#170

Open
jovandeginste wants to merge 1 commit intodevopshq:masterfrom
kuleuven:batch-size
Open

Batch requests for docker image size#170
jovandeginste wants to merge 1 commit intodevopshq:masterfrom
kuleuven:batch-size

Conversation

@jovandeginste
Copy link

We have a registry with many thousands of images. The function to calculate the size of the docker images sometimes takes down the whole Artifactory instance because of the required memory. Even when only a few images are return by the initial query, since the size of all images is then requested.

Instead of querying the size of every asset on the registry, this function now batches the artifacts in slices of 40 (there are limits in de query size), and requests the size of those artifact paths per slice. It then fills out the size information for thoses artifacts in the internal dictionary, as before.

This means the query is a lot more efficient for us:

  • The size query takes a few seconds instead of a few minutes.
  • Especially for queries returning only a few results!
  • No single (background) query should take down the whole server.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants