enable dynamic backend configuration by default
This commit is contained in:
parent
d26357734e
commit
8a67ace5c3
6 changed files with 10 additions and 10 deletions
|
|
@ -77,7 +77,7 @@ const (
|
|||
sslSessionCacheSize = "10m"
|
||||
|
||||
// Default setting for load balancer algorithm
|
||||
defaultLoadBalancerAlgorithm = "least_conn"
|
||||
defaultLoadBalancerAlgorithm = ""
|
||||
|
||||
// Parameters for a shared memory zone that will keep states for various keys.
|
||||
// http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_zone
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ func TestMergeConfigMapToStruct(t *testing.T) {
|
|||
func TestDefaultLoadBalance(t *testing.T) {
|
||||
conf := map[string]string{}
|
||||
to := ReadConfig(conf)
|
||||
if to.LoadBalanceAlgorithm != "least_conn" {
|
||||
if to.LoadBalanceAlgorithm != "" {
|
||||
t.Errorf("default load balance algorithm wrong")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ func buildLoadBalancingConfig(b interface{}, fallbackLoadBalancing string) strin
|
|||
return fmt.Sprintf("%s;", backend.LoadBalancing)
|
||||
}
|
||||
|
||||
if fallbackLoadBalancing == "round_robin" {
|
||||
if fallbackLoadBalancing == "round_robin" || fallbackLoadBalancing == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue