Virtual repositories aggregate other repositories. This is supposed to scale up smoothly, but problems can present themselves when you exceed twenty aggregated repositories (with the understanding that the scale of included repositories can affect this number). Artifactory has to perform a calculation event in its virtual repositories every time it has to serve an artifact. This ensures that responses are coming from the correct repositories. Virtual repositories use this resolution algorithm to:
- Serve any files found in local repositories first.
- Serve any files found in remote repository caches second.
- Download and serve remote artifacts last.
To determine which repository contains a particular artifact, Artifactory must check every repository in the virtual. The Trace Artifact Retrieval REST API can be used to view this logic in action. The worst-case scenario from this algorithm should be clear: What if an artifact is in the last remote repository in the virtual list? If a given artifact is at the bottom of the resolution algorithm (Show above as step #3), it will take far longer to download versus pulling it directly from a remote repository.