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

WeightedRoundRobin load balancer #5237

Merged
merged 8 commits into from Aug 26, 2019
Merged

WeightedRoundRobin load balancer #5237

merged 8 commits into from Aug 26, 2019

Conversation

juliens
Copy link
Member

@juliens juliens commented Aug 21, 2019

What does this PR do?

Add a new load balancer to make weighted round-robin load balancing.
Weighted RoundRobin balanced on services and not on servers.

Motivation

Be able to do weighted round-robin load balancing (like canary).

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

Breaking changes

To be homogeneous with WRR, we renamed stickyness on server loadBalancer to sticky.

# BEFORE
- "traefik.http.services.service0.loadbalancer.stickiness=true"
- "traefik.http.services.service0.loadbalancer.stickiness.cookiename=foobar"
- "traefik.http.services.service0.loadbalancer.stickiness.httponlycookie=true"
- "traefik.http.services.service0.loadbalancer.stickiness.securecookie=true" 

# AFTER
- "traefik.http.services.service0.loadbalancer.sticky=true"
- "traefik.http.services.service0.loadbalancer.sticky.cookie.name=foobar"
- "traefik.http.services.service0.loadbalancer.sticky.cookie.httponly=true"
- "traefik.http.services.service0.loadbalancer.sticky.cookie.secure=true"
# BEFORE
[http.services.Service0.loadBalancer.stickiness]	        
  cookieName = "foobar"
  secureCookie = true
  httpOnlyCookie = true

# AFTER
[http.services.Service0.loadBalancer.sticky.cookie]
  name = "foobar"
  secure = true
  httpOnly = true

Co-authored-by: Ludovic Fernandez ldez@users.noreply.github.com

docs/content/routing/services/index.md Outdated Show resolved Hide resolved
pkg/config/dynamic/http_config.go Outdated Show resolved Hide resolved
pkg/config/dynamic/http_config.go Outdated Show resolved Hide resolved
pkg/server/service/loadbalancer/wrr/wrr.go Show resolved Hide resolved
pkg/server/service/service.go Outdated Show resolved Hide resolved
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

@ldez ldez changed the title [breaking] WeightedRoundRobin load balancer WeightedRoundRobin load balancer Aug 25, 2019
@ldez ldez added the breaking label Aug 25, 2019
Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

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

LGTM

@traefiker traefiker merged commit 6fed76a into traefik:v2.0 Aug 26, 2019
v2 automation moved this from To review to Done Aug 26, 2019
@juliens juliens deleted the service-lb branch September 6, 2019 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v2
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants