-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use podAntiAffinity
so brokers don't accidentally run on the same machine
#33
Comments
I'm not sure we should really use this by default. Some of my thoughts why ... Kubernetes will try to schedule the pods of stateful set on separate nodes where possible on its own. So for the basic situations anti-affinity is not needed. The situation when it might not work perfectly is for example:
The pod affinity would cause us some complications:
With regards to the replication, at the end this is not about not running two Kafka nodes on the same host but about not running two Kafka hosts with different rack IDs on the same host. So what we should do is add support for The practical complication with podAntiAffinity is that we will need to configure it somehow - we will at least need a set of files without it for testing on single node installations such as minikube / minishift and set of files with anti affinity for running on real clusters. That sounds like something would should be done after #31. I guess that sooner or later we will anyway get to the state when deploying the cluster will be done by some controller - there it would be even easier because you would just tell the controller that it should deploy "with anti-affinity" and it would generate the code for you. |
Is that true of
Can you open a separate issue for that, @scholzj?
I'm happy to defer this issue until we have such a controller. |
You are right, I raised #36 for the rack IDs. |
hey anything on this yet? - |
Hi @vinu this feature is planned for the current sprint so it will be available at the end of the next 3 weeks. |
* Add support for user-configurable pod and node affinities Fixes #33
Fix checkstyle issues
We should use
podAntiAffinity
so brokers don't accidentally run on the same physical machine, because that would defeat the point of Kafka holding multiple replicas of partitions.The text was updated successfully, but these errors were encountered: