-
Notifications
You must be signed in to change notification settings - Fork 13
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
affinity #203
base: 1.5.0
Are you sure you want to change the base?
affinity #203
Conversation
docs/use/affinity.md
Outdated
@@ -0,0 +1,170 @@ | |||
# Leveraging Affinity in Percona Everest | |||
|
|||
!!! warning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it should just be an info or note instead of a warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@recharte Let's say it is Important.
docs/use/affinity.md
Outdated
|
||
|**Attributes** |**Description** |**Note** | | ||
|----------------|-----------------|--------------| | ||
|**Components**|<ul><li>Config Server</li><li>DB Node</li><li>Router</br></br></li><li>DB Node</br><br></li><li>DB Node</li><li>Proxy</li></ul>|Applicable for **MongoDB sharded cluster**.<br/></br></br></br></br>Applicable for **MongoDB non sharded cluster**.</br></br>Applicable for **MySQL** and **PostgreSQL** databases.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel strongly opinionated about this but I think we could make the table simpler to understand if we go with something like:
- DB node
- Proxy/Router/PGBouncer - Applicable for MySQL, MongoDB sharded clusters and PostgreSQL databases.
- Config Server - Applicable for MongoDB sharded clusters.
docs/use/affinity.md
Outdated
```sh | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: topology.kubernetes.io/region | ||
operator: In | ||
values: | ||
- "us-west2" | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we show a screenshot configuring this instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didnt have the build so instead added this...
docs/use/affinity.md
Outdated
Let's consider a use case in which you want to ensure that no HAProxy pods should be scheduled to run on the same Kubernetes node. | ||
|
||
|
||
affinity: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: app | ||
operator: NotIn | ||
values: | ||
- haproxy | ||
topologyKey: "kubernetes.io/hostname" | ||
|
||
??? info "What happens under the hood" | ||
- The pod will not be scheduled on nodes that contain pods labeled with `app=haproxy`. | ||
|
||
- If no nodes match, the pod will not be scheduled until a suitable node becomes available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we use the default rule that we set as an example?
Simply setting topologyKey: "kubernetes.io/hostname"
ensures that the scheduler will try to spread the different DB pods across different k8s nodes, ensuring better fault tolerance in case of node failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think it's important to have the default rule explained somewhere so we could do both here 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can explain it here itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely. It will be more useful.
Co-authored-by: Diogo Recharte <[email protected]>
Co-authored-by: Diogo Recharte <[email protected]>
Co-authored-by: Diogo Recharte <[email protected]>
Co-authored-by: Diogo Recharte <[email protected]>
Co-authored-by: Diogo Recharte <[email protected]>
No description provided.