Fix sticky sessions Docker/Marathon labels

This commit is contained in:
Emile Vauge 2016-09-28 13:28:20 +02:00
parent df225d9170
commit 291c3b6dbc
No known key found for this signature in database
GPG key ID: D808B4C167352E59
5 changed files with 64 additions and 72 deletions

View file

@ -559,7 +559,7 @@ func (server *Server) loadConfig(configurations configs, globalConfiguration Glo
log.Debugf("Creating load-balancer drr")
rebalancer, _ := roundrobin.NewRebalancer(rr, roundrobin.RebalancerLogger(oxyLogger))
if stickysession {
log.Debugf("... setting to sticky session with cookie named %v", cookiename)
log.Debugf("Sticky session with cookie %v", cookiename)
rebalancer, _ = roundrobin.NewRebalancer(rr, roundrobin.RebalancerLogger(oxyLogger), roundrobin.RebalancerStickySession(sticky))
}
lb = rebalancer
@ -581,7 +581,7 @@ func (server *Server) loadConfig(configurations configs, globalConfiguration Glo
case types.Wrr:
log.Debugf("Creating load-balancer wrr")
if stickysession {
log.Debugf("... setting to sticky session with cookie named %v", cookiename)
log.Debugf("Sticky session with cookie %v", cookiename)
rr, _ = roundrobin.New(saveBackend, roundrobin.EnableStickySession(sticky))
}
lb = rr