You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "thatmlopsguy (via GitHub)" <gi...@apache.org> on 2025/07/30 09:33:30 UTC
[PR] feat: add topologySpreadConstraints support in deployment [tika-helm]
thatmlopsguy opened a new pull request, #24:
URL: https://github.com/apache/tika-helm/pull/24
This PR adds support for Kubernetes topologySpreadConstraints to the Tika Helm chart, enabling better pod distribution across nodes and availability zones for improved availability and resilience.
What is topologySpreadConstraints?
topologySpreadConstraints is a Kubernetes feature that allows you to control how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains. This helps achieve high availability by ensuring pods are distributed evenly.
Benefits
- High Availability: Ensures pods are distributed across different nodes/zones
- Fault Tolerance: Reduces risk of service disruption if a node or zone fails
- Resource Optimization: Better utilization of cluster resources
- Backward Compatible: Empty default value means no breaking changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add topologySpreadConstraints support in deployment [tika-helm]
Posted by "thatmlopsguy (via GitHub)" <gi...@apache.org>.
thatmlopsguy commented on PR #24:
URL: https://github.com/apache/tika-helm/pull/24#issuecomment-3152392664
Example:
```
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: tika-helm
app.kubernetes.io/instance: my-release
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/name: tika-helm
app.kubernetes.io/instance: my-release
```
First Constraint (Node-level distribution):
- maxSkew: 1: Maximum allowed difference in pod count between any two nodes
- topologyKey: kubernetes.io/hostname: Distribute pods across different nodes (hostnames)
- whenUnsatisfiable: DoNotSchedule: If constraint can't be satisfied, don't schedule the pod
- labelSelector: Only consider pods with these labels when calculating distribution
Second Constraint (Zone-level distribution):
- maxSkew: 1: Maximum allowed difference in pod count between any two zones
- topologyKey: topology.kubernetes.io/zone: Distribute pods across different availability zones
- whenUnsatisfiable: ScheduleAnyway: If constraint can't be satisfied, schedule anyway (soft constraint)
- labelSelector: Same label selector to identify relevant pods
Real-world Scenarios
Scenario 1: 3 Replicas, 3 Nodes
With maxSkew: 1 and topologyKey: kubernetes.io/hostname:
✅ Good: Node1(1 pod), Node2(1 pod), Node3(1 pod) - perfectly balanced (maxSkew=0)
❌ Violates:: Node1(2 pods), Node2(1 pod), Node3(0 pods) - maxSkew=2
❌ Violates: Node1(0 pods), Node2(3 pods), Node3(0 pods) - maxSkew=3
Scenario 2: Multi-Zone Deployment with 6 replicas across 3 zones:
✅ Good: Zone-A(2), Zone-B(2), Zone-C(2) - maxSkew=0
❌ Violates: Zone-A(3), Zone-B(2), Zone-C(1) - maxSkew=2
❌ Violates: Zone-A(4), Zone-B(1), Zone-C(1) - maxSkew=3
Benefits for Tika Deployment
- High Availability: If one node/zone fails, other instances continue running
- Load Distribution: Prevents all pods from running on the same node
- Resource Utilization: Better use of cluster resources across nodes/zones
- Fault Tolerance: Reduces blast radius of infrastructure failures
Configuration Options
DoNotSchedule: Hard constraint - pod won't be scheduled if constraint is violated
ScheduleAnyway: Soft constraint - scheduler prefers to satisfy but will schedule anyway if needed
This makes your Tika deployment more resilient and better distributed across your Kubernetes cluster infrastructure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add topologySpreadConstraints support in deployment [tika-helm]
Posted by "thatmlopsguy (via GitHub)" <gi...@apache.org>.
thatmlopsguy commented on PR #24:
URL: https://github.com/apache/tika-helm/pull/24#issuecomment-3151232530
Hello @lewismc can you review. Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add topologySpreadConstraints support in deployment [tika-helm]
Posted by "lewismc (via GitHub)" <gi...@apache.org>.
lewismc merged PR #24:
URL: https://github.com/apache/tika-helm/pull/24
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add topologySpreadConstraints support in deployment [tika-helm]
Posted by "lewismc (via GitHub)" <gi...@apache.org>.
lewismc commented on PR #24:
URL: https://github.com/apache/tika-helm/pull/24#issuecomment-3169072326
Thank you so much @thatmlopsguy really helpful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add topologySpreadConstraints support in deployment [tika-helm]
Posted by "lewismc (via GitHub)" <gi...@apache.org>.
lewismc commented on PR #24:
URL: https://github.com/apache/tika-helm/pull/24#issuecomment-3151387117
Hi @thatmlopsguy thanks for this PR. I was aware if them but haven't used [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/) before.
Please provide an example of overriding the value on the CLI that was we can have it as a reference. Thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org