Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node selectors and improved affinity options #86

Merged
merged 11 commits into from
Nov 29, 2024
Merged

Conversation

antejavor
Copy link
Collaborator

@antejavor antejavor commented Nov 27, 2024

This PR introduces the four modes for affinity:

  • Default - By default, data pods will avoid being scheduled on the same node as other data pods and coordinator pods will avoid being scheduled on the same node as other coordinator pods. Deployment won't fail if there is no sufficient nodes.

  • Unique - The unique affinity, will schedule the pods on different nodes in the cluster. This means coordinators and data nodes will not be scheduled on the same node. If there is more pods than nodes, deployment will fail.

  • Parity - The parity affinity, will enable scheduling of the pods on the same node, but with the rule that one node can host pair made of coordinator and data node. This means each node can have max two pods, one coordinator and one data node. If not sufficient nodes, deployment will fail.

  • NodeSelection - The nodeSelection affinity, will enable scheduling of the pods on the nodes with specific labels. So the coordinators will be scheduled on the nodes with label coordinator-node and data nodes will be scheduled on the nodes with label data-node. If not sufficient nodes, deployment will fail.

@antejavor antejavor marked this pull request as ready for review November 27, 2024 14:14
@antejavor antejavor self-assigned this Nov 27, 2024
@antejavor antejavor added this to the Memgraph-2.22.0 milestone Nov 27, 2024
@antejavor antejavor linked an issue Nov 27, 2024 that may be closed by this pull request
@antejavor
Copy link
Collaborator Author

CI/CD failing because of this: #87

Copy link
Collaborator

@as51340 as51340 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will go over changes on the call, looks good but want to check few things.

Copy link
Collaborator

@as51340 as51340 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changes needed, then we merge, resolved on the call. Great work 💪

@antejavor antejavor merged commit 1e3bee4 into main Nov 29, 2024
1 of 2 checks passed
as51340 pushed a commit that referenced this pull request Dec 2, 2024
This PR introduces the four modes for affinity:

Default - By default, data pods will avoid being scheduled on the same node as other data pods and coordinator pods will avoid being scheduled on the same node as other coordinator pods. Deployment won't fail if there is no sufficient nodes.

Unique - The unique affinity, will schedule the pods on different nodes in the cluster. This means coordinators and data nodes will not be scheduled on the same node. If there is more pods than nodes, deployment will fail.

Parity - The parity affinity, will enable scheduling of the pods on the same node, but with the rule that one node can host pair made of coordinator and data node. This means each node can have max two pods, one coordinator and one data node. If not sufficient nodes, deployment will fail.

NodeSelection - The nodeSelection affinity, will enable scheduling of the pods on the nodes with specific labels. So the coordinators will be scheduled on the nodes with label coordinator-node and data nodes will be scheduled on the nodes with label data-node. If not sufficient nodes, deployment will fail.

Add load balancer service (#90)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce node selectors for HA
2 participants