Hi Shashi,
Setting affinities is optional. If no affinities are configured, then the cluster will decide on its own which nodes to choose for where to run the project and for where to failover to. You only need to set up affinities if you want to limit which nodes in your cluster you want to use or if you want to establish which are the preferred nodes you'd like to use to run your project.
You would set an weak and positive affinity for a node if you prefer it to run on that node rather than run on some other node.
So, let's say you have 4 or 5 nodes in your cluster, and you'd prefer that the project only run on 2 out of those five, then you'd set weak positive affinities for each of the 2 nodes you'd prefer for the project to run on.
Thanks,
Alice