Skip to content

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

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

you-looks-not-tasty
Copy link
Collaborator

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

POST /vs/{VipPort}/rs
PUT  /vs/{VipPort}
@ywc689 ywc689 added the pr/to-review-codes review codes line by line and check if problem exists. label Feb 11, 2025
update = true
}

if vsModel != nil {
Copy link
Collaborator

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) {
Copy link
Collaborator

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
}
Copy link
Collaborator

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?

Comment on lines +116 to +119
newFlags := vs.GetFlags()
newFlagsNOT := ^newFlags
tmpFlags := vsModel.RAMFlags ^ newFlagsNOT
if (tmpFlags & vsModel.RAMFlags) != newFlags {
Copy link
Collaborator

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()?

@ywc689 ywc689 removed the pr/to-review-codes review codes line by line and check if problem exists. label Mar 5, 2025
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.

2 participants