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

Randomize service endpoint addition when configuring destination on ipvs service #100

Merged
merged 1 commit into from
Aug 4, 2017

Conversation

murali-reddy
Copy link
Member

Fixes #99

@murali-reddy murali-reddy force-pushed the 99-randomize-service-endpoints branch from 4566e3d to 7934759 Compare August 4, 2017 22:09
@murali-reddy
Copy link
Member Author

Tested the fix. Now endpoint gets picked up randomly. For e.g below check the service
TCP ip-172-20-39-170.us-west-2.c rr for consecutive access to same nodepot service.

~ # ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  100.64.0.1:https rr
  -> ip-172-20-35-14.us-west-2.co Masq    1      1          0
TCP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
TCP  100.65.184.74:http rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          0
  -> 100.96.2.3:http-alt          Masq    1      0          0
  -> 100.96.2.4:http-alt          Masq    1      0          0
  -> 100.96.3.4:http-alt          Masq    1      0          0
  -> 100.96.3.5:http-alt          Masq    1      0          0
TCP  ip-172-20-39-170.us-west-2.c rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          0
  -> 100.96.2.3:http-alt          Masq    1      0          0
  -> 100.96.2.4:http-alt          Masq    1      0          0
  -> 100.96.3.4:http-alt          Masq    1      0          0
  -> 100.96.3.5:http-alt          Masq    1      0          0
UDP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
~ # ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  100.64.0.1:https rr
  -> ip-172-20-35-14.us-west-2.co Masq    1      1          0
TCP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
TCP  100.65.184.74:http rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          0
  -> 100.96.2.3:http-alt          Masq    1      0          0
  -> 100.96.2.4:http-alt          Masq    1      0          0
  -> 100.96.3.4:http-alt          Masq    1      0          0
  -> 100.96.3.5:http-alt          Masq    1      0          0
TCP  ip-172-20-39-170.us-west-2.c rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          1
  -> 100.96.2.3:http-alt          Masq    1      0          0
  -> 100.96.2.4:http-alt          Masq    1      0          0
  -> 100.96.3.4:http-alt          Masq    1      0          0
  -> 100.96.3.5:http-alt          Masq    1      0          0
UDP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
~ # ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  100.64.0.1:https rr
  -> ip-172-20-35-14.us-west-2.co Masq    1      1          0
TCP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
TCP  100.65.184.74:http rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          0
  -> 100.96.2.3:http-alt          Masq    1      0          0
  -> 100.96.2.4:http-alt          Masq    1      0          0
  -> 100.96.3.4:http-alt          Masq    1      0          0
  -> 100.96.3.5:http-alt          Masq    1      0          0
TCP  ip-172-20-39-170.us-west-2.c rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          1
  -> 100.96.2.3:http-alt          Masq    1      0          0
  -> 100.96.2.4:http-alt          Masq    1      0          1
  -> 100.96.3.4:http-alt          Masq    1      0          0
  -> 100.96.3.5:http-alt          Masq    1      0          0
UDP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
~ # ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  100.64.0.1:https rr
  -> ip-172-20-35-14.us-west-2.co Masq    1      1          0
TCP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
TCP  100.65.184.74:http rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          0
  -> 100.96.2.3:http-alt          Masq    1      0          0
  -> 100.96.2.4:http-alt          Masq    1      0          0
  -> 100.96.3.4:http-alt          Masq    1      0          0
  -> 100.96.3.5:http-alt          Masq    1      0          0
TCP  ip-172-20-39-170.us-west-2.c rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          1
  -> 100.96.2.3:http-alt          Masq    1      0          0
  -> 100.96.2.4:http-alt          Masq    1      0          1
  -> 100.96.3.4:http-alt          Masq    1      0          1
  -> 100.96.3.5:http-alt          Masq    1      0          0
UDP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
~ # ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  100.64.0.1:https rr
  -> ip-172-20-35-14.us-west-2.co Masq    1      1          0
TCP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
TCP  100.65.184.74:http rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          0
  -> 100.96.2.3:http-alt          Masq    1      0          0
  -> 100.96.2.4:http-alt          Masq    1      0          0
  -> 100.96.3.4:http-alt          Masq    1      0          0
  -> 100.96.3.5:http-alt          Masq    1      0          0
TCP  ip-172-20-39-170.us-west-2.c rr
  -> 100.96.1.2:http-alt          Masq    1      0          0
  -> 100.96.1.3:http-alt          Masq    1      0          1
  -> 100.96.2.3:http-alt          Masq    1      0          1
  -> 100.96.2.4:http-alt          Masq    1      0          1
  -> 100.96.3.4:http-alt          Masq    1      0          1
  -> 100.96.3.5:http-alt          Masq    1      0          0
UDP  100.64.0.10:domain rr
  -> 100.96.2.2:domain            Masq    1      0          0
  -> 100.96.3.2:domain            Masq    1      0          0
~ #

@murali-reddy murali-reddy merged commit fbdd9e9 into master Aug 4, 2017
@murali-reddy murali-reddy deleted the 99-randomize-service-endpoints branch August 4, 2017 22:36
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.

1 participant