-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Update Kubernetes Service Discovery Provider to use pods endpoints #1134
Conversation
d2aed69
to
88034a5
Compare
👍 this is a must-have because currently there is no load balancing between multiple pods (unless the http connection resets) - one pod behind the service receives all traffic. |
@ussamoo sorry it has taken me so long to merge this. Thanks for your help with Ocelot!!!!! |
Are we sure this is right? We are having the exact behavior this sounds like it was supposed to fix. The k8s service endpoint exists specifically to distribute load. Just trying to understand because we've looked up and down the issues/docs here and can't tell a) what ocelot is actually supposed to do and |
Do you think the implementation is wrong or just asking about the behavior? I haven't tested the new behavior but please share your observations and how you tested. |
Hey there, we found that we had to add the load balancer options and specify round robin on each route to get load balancing - after that, it does appear to be working. Previously, it did some load balancing, but during burst traffic it would single out a pod. I hope this helps We tested in AWS EKS and used cloudwatch logs to see which pods were accepting the requests. Pretty low tech, but that's how we spotted the issue and it was fine enough |
Fixes #1126 #1129
Proposed Changes
Updated the KubeProvider to build the list of services based on the endpoints of a given kubernetes service in a specific namespace.
This will fix the issues related to the load balancing since Ocelot will send traffic directly to the pod endpoint instead of the service.