Set controller and instance affinities in the CCR file to determine which nodes a project can run on.
Field | Description |
---|---|
Name | The name of the object of the affinity, which is the controller name or instance name that the affinity is set for. For instance affinities, the affinity for one instance must refer to the other instance. |
Strength | The strength of the affinity. Valid values are
strong or weak.
Strong requires the project to run on a specific controller. If you have strong positive affinity set for a controller node, and the node fails, the failover process tries to restart the project on that node. If the node has not recovered, the project restart fails, and you must restart manually. Weak requires the project to start on the preferred controller if possible, but if that controller is unavailable it may start on another available controller. |
Charge | The charge of the affinity. Valid values are positive or negative. If positive, the project runs (for a strong affinity) or prefers to run (for a weak affinity) on the named controller. If negative, the project does not run (or prefers not to run) on the named controller. |
When failover is enabled for a project, affinities can affect restarts. For example, your project has a strong positive affinity for controller node A—that is, the project can run only on controller A. Controller A crashes while your project is running. When your project tries to restart, controller A is still unavailable. A project cannot attempt multiple restarts if an appropriate controller for the project to run on is unavailable. Due to its strong positive affinity for controller A, there is only one appropriate controller available, so your project can try to restart only once. You must restart the project manually when controller A returns to service or reconfigure the affinities.