Improve the session affinity feature
This commit is contained in:
parent
6809319318
commit
a158e5fc5a
12 changed files with 276 additions and 213 deletions
|
|
@ -185,8 +185,8 @@ http {
|
|||
|
||||
{{range $name, $upstream := $backends}}
|
||||
upstream {{$upstream.Name}} {
|
||||
{{ if $upstream.StickySession.Enabled }}
|
||||
sticky hash={{$upstream.StickySession.Hash}} name={{$upstream.StickySession.Name}} httponly;
|
||||
{{ if eq $upstream.SessionAffinity.AffinityType "cookie" }}
|
||||
sticky hash={{$upstream.SessionAffinity.CookieSessionAffinity.Hash}} name={{$upstream.SessionAffinity.CookieSessionAffinity.Name}} httponly;
|
||||
{{ else }}
|
||||
least_conn;
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue