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

feat(kuma-cp) Fair loadbalancing with ingress #851

Merged
merged 3 commits into from
Jun 25, 2020

Conversation

jakubdyszkiewicz
Copy link
Contributor

Summary

Problem

With the following setup:

Cluster 1

  • Gateway
  • Backend-1 (service: backend)

Cluster 2

  • Ingress
  • Backend-2 (service: backend)
  • Backend-3 (service: backend)

When gateway wants to communicate to service backend it has following configuration
envoy cluster: backend
endpoints:

  • backend-1 endpoint
  • ingress endpoint (only one since both replicas are hidden behind ingress from cluster 2)

therefore traffic was load balanced equally 50% to backend-1 and 50% to backend-2 and backend-3

We want to have fair load balancing - meaning 33% goes to backend-1, 33% to backend-2 and 33% to backend-3.

To do this we need to add number of instances and put it as a weight into LbEndpoints when we build XDS Config for Envoy.

Documentation

No docs to write. It's implementation only.

@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team June 24, 2020 15:34
Copy link
Contributor

@lobkovilya lobkovilya left a comment

Choose a reason for hiding this comment

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

LGTM

@jakubdyszkiewicz jakubdyszkiewicz merged commit 3da0df2 into master Jun 25, 2020
@jakubdyszkiewicz jakubdyszkiewicz deleted the feat/ingress-lb branch June 25, 2020 16:56
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.

2 participants