Thought about it? Okay, then read on!
It’s no secret that the bulkiest part of your Nexus Repository deployment is your blob storage. 10 TB is typical for large deployments. Some of our customers self-report as having blob storage closer to 50 TB, and that’s not the most extreme we’ve seen.
Regardless of whether you’re running in the cloud or on-prem, that can get expensive. Some back-of-the-envelope estimation shows that 10 TB of storage in an AWS S3 bucket costs around $230 a month. And that doesn’t include the cost of data transfer, backups, lost performance, etc.
Remember, your blob storage will grow if you ingest new components faster than you delete old components. Any effort to delete old components will help keep your blob storage controlled.
For that reason, an obvious best practice for anyone using Nexus Repository is to use cleanup policies to control your blob storage. At a minimum, consider a cleanup policy for components that haven’t been downloaded for a certain number of days. 90 days is a very generous starting point. 30 days is stricter but still reasonable for most production environments. That’s our standard recommendation for repos for apps that are actively developed.
If you want to be even stricter, set the cleanup policy to slightly longer than your average build cadence. For example, a repo for a legacy app built once every three months should have a cleanup policy for components older than four months. A repo for a team building snapshots once a week should have a cleanup policy for components older than 10 days.
And remember! Cleanup policies only soft delete the components. To actually reclaim the storage space, you need to run the Admin - Compact blob store task.
There’s a lot more to say about cleanup policies – stay tuned for further advice.