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

support sticky sessions for load balancer #796

Merged
merged 21 commits into from
Oct 24, 2022
Merged

Conversation

samanhappy
Copy link
Collaborator

@samanhappy samanhappy commented Sep 19, 2022

resolves #795

Code changes:

  • add sticky configs in BaseLoadBalancer
  • choose server using BaseLoadBalancer first, if nil use specific load balancer
  • introduce consistent hash

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2022

Codecov Report

Base: 79.25% // Head: 76.83% // Decreases project coverage by -2.42% ⚠️

Coverage data is based on head (e71a2a8) compared to base (b67c5ff).
Patch coverage: 79.74% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #796      +/-   ##
==========================================
- Coverage   79.25%   76.83%   -2.43%     
==========================================
  Files         101      103       +2     
  Lines       11188    11577     +389     
==========================================
+ Hits         8867     8895      +28     
- Misses       1826     2174     +348     
- Partials      495      508      +13     
Impacted Files Coverage Δ
pkg/filters/proxy/loadbalance.go 86.61% <79.22%> (-12.25%) ⬇️
pkg/filters/proxy/server.go 100.00% <100.00%> (ø)
pkg/util/jmxtool/agent_controller.go 46.66% <0.00%> (-15.10%) ⬇️
pkg/cluster/op.go 64.63% <0.00%> (-7.56%) ⬇️
pkg/cluster/syncer.go 77.56% <0.00%> (-5.77%) ⬇️
pkg/filters/requestadaptor/requestadaptor.go 75.46% <0.00%> (-1.32%) ⬇️
pkg/cluster/member.go 70.81% <0.00%> (-1.08%) ⬇️
pkg/object/mqttproxy/broker.go 74.79% <0.00%> (-1.01%) ⬇️
pkg/filters/responseadaptor/responseadaptor.go 68.69% <0.00%> (-0.68%) ⬇️
pkg/cluster/cluster.go 59.57% <0.00%> (-0.53%) ⬇️
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/pool.go Outdated Show resolved Hide resolved
pkg/filters/proxy/pool.go Outdated Show resolved Hide resolved
README.zh-CN.md Outdated Show resolved Hide resolved
pkg/filters/proxy/pool.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
@samanhappy samanhappy changed the title add sticky sessions load balancer strategy support sticky sessions for load balancer Sep 28, 2022
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
pkg/filters/proxy/loadbalance.go Outdated Show resolved Hide resolved
@suchen-sci suchen-sci merged commit 2410c79 into easegress-io:main Oct 24, 2022
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.

[feature] Support sticky sessions for load balancer
5 participants