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

[improve][broker] PIP-192: Support broker isolation policy #19592

Conversation

Demogorgon314
Copy link
Member

Master Issue: #16691

Motivation

Currently, The ExtensibleLoadManager don't support broker isolation policy yet.

Modifications

Add a BrokerIsolationPoliciesFilter to filter out an unqualified broker with isolation policies.
Add broker isolation support for TransferShedder.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@Demogorgon314 Demogorgon314 self-assigned this Feb 22, 2023
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Feb 22, 2023
@Demogorgon314 Demogorgon314 force-pushed the Demogorgon314/PIP-192-Support_Broker_isolation_policy branch from 4175af3 to 9404c68 Compare February 22, 2023 07:25
@Demogorgon314 Demogorgon314 marked this pull request as ready for review February 22, 2023 15:28
}
};

public Set<String> applyIsolationPolicies(Map<String, BrokerLookupData> availableBrokers,
Copy link
Contributor

@heesung-sn heesung-sn Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is good to consider the isolation policy here in this shedding strategy. However, it might be better if we just do not automatically unload/transfer bundles that configure any isolation policy or anti-affinity group.

Reasoning: These bundles configure limited sets of brokers to transfer/unload, which is not an ideal target to move around regarding load balance. (Hopefully, not all of the top k loaded bundles comply with isolation policy) It would be better to move other bundles that don't comply with any policies. "Fix bundles that have hard limits but move other free ones."

For this reason, we could probably filter out those bundles with isolation or anti-affinity group policy in the TopKBundles, just like we filter out the system namespace bundles. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is harmful to keep this logic here. I can add those bundle filtering logic(filtering out bundles with isolation and anti-affinity-group in topk bundles) in my next PR(anti-affinity group support).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's keep the logic here temporarily, since your proposal will change the original behavior. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. sounds good to me.

@Demogorgon314 Demogorgon314 force-pushed the Demogorgon314/PIP-192-Support_Broker_isolation_policy branch from 1c2e004 to aaec1c8 Compare March 5, 2023 04:35
Copy link
Contributor

@gaoran10 gaoran10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Demogorgon314 Demogorgon314 requested a review from Technoboy- March 8, 2023 02:02
@Demogorgon314 Demogorgon314 added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/broker ready-to-test labels Mar 9, 2023
@Demogorgon314 Demogorgon314 reopened this Mar 9, 2023
@Technoboy-
Copy link
Contributor

/pulsarbot run-failure-checks

@Technoboy- Technoboy- added this to the 3.0.0 milestone Mar 11, 2023
@Technoboy- Technoboy- merged commit b6a7382 into apache:master Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs ready-to-test type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants