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

Rework servers load-balancer to use the WRR #9431

Merged
merged 10 commits into from
Nov 16, 2022

Conversation

juliens
Copy link
Member

@juliens juliens commented Oct 11, 2022

What does this PR do?

This PR reworks the servers load-balancer to use the WRR load balancer instead of the oxy load balancer.
The healthcheck was rewritten to fit the WRR healthcheck mechanism.

Motivation

To simplify the code base.

More

  • Added/updated tests
    - [ ] Added/updated documentation

Additional Notes

As we are reusing the sticky cookie mechanism we implemented in WRR, we dropped the support of the old cookie value (before 2.5) in the sticky feature.
This means that if a Traefik is upgraded from <2.5 to this version, the active user's sticky session will be discarded.

The services are now reused, this means that if two routers use the same service, load balancing will be shared by both routers.

CloseNotifier implementations are removed because they are not used anymore as the http.Request context always has a cancellable context. See https://github.com/golang/go/blob/7c84234142149bd24a4096c6cab691d3593f3431/src/net/http/httputil/reverseproxy.go#L340

The pipelining middleware is also removed because of https://github.com/golang/go/blob/32a52e039953889a3aaa6a3e7f0ad0f7dfcbeac3/src/net/http/server.go#L670

Co-authored-by: Kevin Pollet pollet.kevin@gmail.com

@ddtmachado
Copy link
Contributor

Linking the motivation of the motivation :)
#9122 and #1035 (comment)

Copy link
Contributor

@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

Copy link
Member

@kevinpollet kevinpollet left a comment

Choose a reason for hiding this comment

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

LGTM ✨

Copy link
Member

@rtribotte rtribotte 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 fadee5e into traefik:master Nov 16, 2022
v2 automation moved this from To review to Done Nov 16, 2022
@ldez ldez deleted the refacto-lb branch November 16, 2022 11:27
@sunyakun sunyakun mentioned this pull request Jul 24, 2023
2 tasks
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

6 participants