-
Notifications
You must be signed in to change notification settings - Fork 739
Passive Update mode supported #1014
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
base: devel
Are you sure you want to change the base?
Passive Update mode supported #1014
Conversation
POST /vs/{VipPort}/rs PUT /vs/{VipPort}
update = true | ||
} | ||
|
||
if vsModel != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the contrary side of previous if
condition. if...else...
is more efficient.
update = true | ||
} | ||
|
||
if len(vsModel.RSs.Items) == len(rss) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the contrary side of previous if condition. if...else... is more efficient.
h.logger.Info("Try update update. rs nat mode has changed.", "VipPort", params.VipPort, "rs", newRs.ID(), "cache nat mode", cacheRs.Spec.Mode, "update nat mode", newRs.GetFwdModeString()) | ||
update = true | ||
break | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't it need to consider any other field changes in RS?
newFlags := vs.GetFlags() | ||
newFlagsNOT := ^newFlags | ||
tmpFlags := vsModel.RAMFlags ^ newFlagsNOT | ||
if (tmpFlags & vsModel.RAMFlags) != newFlags { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's purpose of the four line codes? To tell if vsModel.RAMFlags != vs.GetFlags()
?
There will rescheduled to the header realserver while DPVS_SO_SET_ADD | DPVS_SO_SET_EDIT occurred.
The high frequent service changes may lead to backend load imbalance due to schedule resets.
POST /vs/{VipPort}/rs?passiveUpdate=true
PUT /vs/{VipPort}?passiveUpdate=true