Search code examples
nexus3

Is Nexus Repository 3 blob store setup necessary?


I am configuring Nexus Repository 3 and I have currently created two different blob stores: default and docker.

default is composed of maven and NuGet.

docker is composed of docker (obviously).

Are there any advantages of storing the repositories this way?

Should I keep it all in one blob store?


Solution

  • In my experience the setup of your blobstore configuration mostly depends on the following.

    1. Number of repositories in your NXRM3 instance.
    2. Repository format (Maven, NPM and so on).
    3. Version of artefacts. More precisely if the repository is about to store snapshots or release artefacts.

    In my humble opinion the following choices are not among the best.

    1. All repositories mapped to exactly one blobstore or just few of them (n:1 mapping).
    2. One blobstore per repository (1:1 mapping).

    In first you will have a lot of overhead when scheduling tasks. Particulary Compact blob store or Rebuild Maven repository metadata. In second you will have plenty of scehulded tasks to configure.

    Our NXRM3 repository mostly consists of Maven artefacts. Thus we decided to create three separated blobstores.

    1. Blobstore binding hosted repositories with Maven releases.
    2. Blobstore binding hosted repositories with Maven snapshots.
    3. Blobstore binding proxy repositories with Maven artefacts.

    The content of our snapshot repository changes very rapidly with every build on Jenkins. Thus we schedule the tasks of reindexing, removing snapshots and compacting blobstore on daily basis. On other blobstore the tasks are scheduled on weekly basis.

    I believe there is no general answer on how your blobstores should be configured. My recoomendations are try to minimze the time your scheduled tasks are being run, separate your blobstores for proxy and hosted repositories. And definitely think about snapshots and releases push and pop operations in your blobstore.