Bug 1455325

Summary: [3.3][RFE] Randomize node lists
Product: OpenShift Container Platform Reporter: Samuel Munilla <smunilla>
Component: NetworkingAssignee: Samuel Munilla <smunilla>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: aos-bugs, bbennett, bleanhar, bmeng, bvincell, byount, eparis, rchopra, zzhao
Version: 3.3.0   
Target Milestone: ---   
Target Release: 3.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: Setting the router environment variable ROUTER_BACKEND_PROCESS_ENDPOINTS=shuffle will randomize the order of backends in the haproxy configuration. Reason: With long running sessions and a router which reloads regularly the first endpoint in the config may receive significantly more load than other backends. Setting the environment variable will randomize the order of the backends on every reload and thus help spread the load.
Story Points: ---
Clone Of: 1447115 Environment:
Last Closed: 2017-06-15 18:40:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1447115, 1455326, 1455327, 1456989    
Bug Blocks:    

Comment 1 Eric Paris 2017-05-30 21:26:54 UTC
https://github.com/openshift/ose/pull/736

Comment 3 zhaozhanqi 2017-06-01 06:57:40 UTC
verified this bug on openshift v3.3.1.31


When enable the env: 
oc env dc router ROUTER_BACKEND_PROCESS_ENDPOINTS=shuffle

check the endpoints in haproxy.config, it will be random order:


    server 1d3e7a9efe9cd4c03828da92f8e9f623 10.1.0.8:8080 check inter 5000ms cookie 1d3e7a9efe9cd4c03828da92f8e9f623 weight 100
  server 453bbe2377d1107c9316326e9f65e17d 10.1.0.4:8080 check inter 5000ms cookie 453bbe2377d1107c9316326e9f65e17d weight 100
   server e1c82daa47291c4e11fdcb16d0a060d9 10.1.0.6:8080 check inter 5000ms cookie e1c82daa47291c4e11fdcb16d0a060d9 weight 100
  server f558554d5699469f291a8bf906aec554 10.1.0.9:8080 check inter 5000ms cookie f558554d5699469f291a8bf906aec554 weight 100


before this fixed, the endpints will be in order:

    server 1d3e7a9efe9cd4c03828da92f8e9f623 10.1.0.4:8080 check inter 5000ms cookie 1d3e7a9efe9cd4c03828da92f8e9f623 weight 100
  server 453bbe2377d1107c9316326e9f65e17d 10.1.0.6:8080 check inter 5000ms cookie 453bbe2377d1107c9316326e9f65e17d weight 100
   server e1c82daa47291c4e11fdcb16d0a060d9 10.1.0.8:8080 check inter 5000ms cookie e1c82daa47291c4e11fdcb16d0a060d9 weight 100
  server f558554d5699469f291a8bf906aec554 10.1.0.9:8080 check inter 5000ms cookie f558554d5699469f291a8bf906aec554 weight 100

Comment 5 errata-xmlrpc 2017-06-15 18:40:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1425