AFAIK, Artifactory keeps two replicas of each artifact.
1. In a cluster of N nodes with local storage (no shared filesystem), how does Artifactory pick which nodes will get the two replicas when artifact is first deployed to Artifactory?
2. When a client requests artifact X, how does Artifactory determine which nodes host given artifact and how does it decide which node will provide the artifact for this request?
3. Is there artifact-to-node affinity? In other words, if node1 and node2 have two replicas of artifact X, and I manually move the artifact from node1 to node7, will Artifactory attempt to revert this move? If there is this affinity, is it stored in the DB? Can it be modified? The reason I am asking is in the cluster of N nodes, some artifact hashes are present on all N nodes, so I have N replicas. I'd like to remove some of them to decrease disk space pressure.
Thank you. I can provide more details, if necessary.
AFAIK, Artifactory keeps two replicas of each artifact
This is only if you are using a sharded type configuration. For example, double or redundant shards or a clustered filesystem. In either case, the number of replicas is configurable.
- In a cluster of N nodes with local storage (no shared filesystem), how does Artifactory pick which nodes will get the two replicas when artifact is first deployed to Artifactory?
The node that received the request will get a copy and then whatever other number of nodes is needed to meet the redundancy requirement.
For sharding, this is configurable with the writeBehavior (where you can specify round-robin, freePercentageSpace, or freeSpace)
When a client requests artifact X, how does Artifactory determine which nodes host given artifact and how does it decide which node will provide the artifact for this request?
Is there artifact-to-node affinity? In other words, if node1 and node2 have two replicas of artifact X, and I manually move the artifact from node1 to node7, will Artifactory attempt to revert this move?
There is no affinity.
The node that received the request will respond to it. If it does not have the binary, it will stream it from a node that does and then sends it to the user.