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

introduce server match model for sticky session #838

Merged
merged 8 commits into from
Nov 11, 2022

Conversation

samanhappy
Copy link
Collaborator

This PR is trying to enhance sticky session by introducing a server match model.

The existing model CookieConsistentHash will influence a bit stickiness when servers scale out because of re-hashing, but the new model will keep the max stickiness in the same situation by matching server exactly.

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2022

Codecov Report

Base: 76.81% // Head: 77.06% // Increases project coverage by +0.25% 🎉

Coverage data is based on head (d99838f) compared to base (2410c79).
Patch coverage: 93.50% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   76.81%   77.06%   +0.25%     
==========================================
  Files         103      108       +5     
  Lines       11577    12241     +664     
==========================================
+ Hits         8893     9434     +541     
- Misses       2176     2282     +106     
- Partials      508      525      +17     
Impacted Files Coverage Δ
pkg/filters/proxy/loadbalance.go 89.00% <93.33%> (+2.38%) ⬆️
pkg/filters/proxy/pool.go 80.17% <100.00%> (+0.99%) ⬆️
pkg/object/httpserver/mux.go 79.25% <0.00%> (-7.95%) ⬇️
pkg/filters/headerlookup/headerlookup.go 84.61% <0.00%> (-1.40%) ⬇️
pkg/filters/corsadaptor/corsadaptor.go 90.32% <0.00%> (-0.31%) ⬇️
pkg/object/httpserver/routers/routers.go 69.64% <0.00%> (ø)
pkg/object/httpserver/routers/spec.go 75.15% <0.00%> (ø)
pkg/util/ipfilter/ipfilter.go 61.17% <0.00%> (ø)
pkg/object/httpserver/routers/ordered/router.go 77.21% <0.00%> (ø)
pkg/object/httpserver/routers/radixtree/router.go 94.73% <0.00%> (ø)
... 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.

@samanhappy samanhappy marked this pull request as ready for review November 3, 2022 09:02
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 59cc1a2 into easegress-io:main Nov 11, 2022
@samanhappy samanhappy deleted the sticky branch November 12, 2022 09:44
caoshengdong pushed a commit to caoshengdong/easegress that referenced this pull request Dec 20, 2022
* introduce server match model for sticky session

* improve performance

* apply suggestions

* Update pkg/filters/proxy/loadbalance.go

Co-authored-by: Bomin Zhang <[email protected]>

* rename mode

* Update pkg/filters/proxy/loadbalance.go

Co-authored-by: Bomin Zhang <[email protected]>

* fix typo

* support application based model

Co-authored-by: Bomin Zhang <[email protected]>
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.

None yet

4 participants