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][pip] PIP-380: Support setting up specific namespaces to skipping the load-shedding #23304

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions pip/pip_379.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# PIP-379: Support setting up specific namespaces to skipping the load-shedding
lhotari marked this conversation as resolved.
Show resolved Hide resolved

# Background knowledge

Some of the Pulsar protocols, for example the KoP will use a system topic to store the metadata, eg: the topic's offset,
when the bundle owner changes the topic's data will need to be full recovered to the broker, and when unloaded,
it needs to remove the broker local memory, if the topic's data were huge, it may cause slow loading.

# Motivation

Support setting up specific namespaces to skipping the load-shedding, for the system topics namespace,
or for benchmark-relevant namespaces we better be skipping the load shedding because for system topics,
if the ownership transfers to another broker, it may need to recover the data by replaying the messages,
it will cause message pub/sub temporary unavailable.

# Goals

## In Scope

- Support setting up specific namespaces to skipping the load-shedding
- Use `RoundRobinBrokerSelector` to assign the skipped namespaces bundle.

# High Level Design

Add new configuration `loadBalancerSheddingExcludedNamespaces` to the `ServiceConfiguration`.
While doing the load-shedding, filter out the configuration namespaces.

For shedding excluded namespaces, use `RoundRobinBrokerSelector` to assign the ownership, it can make the assignment
more average because these will not automatically rebalance to another broker unless manually unloaded it.

# Detailed Design

## Design & Implementation Details

## Public-facing Changes

### Configuration

Add new configuration `loadBalancerSheddingExcludedNamespaces` to the `ServiceConfiguration`.

```java
@FieldContext(
dynamic = true,
category = CATEGORY_LOAD_BALANCER,
doc = "The namespaces skip for load shedding"
)
private Set<String> loadBalancerSheddingExcludedNamespaces = new TreeSet<>();;
```

# Monitoring

No new metrics are added in this proposal.

# Security Considerations

No new security considerations are added in this proposal.

# Backward & Forward Compatibility

## Revert

No changes are needed to revert to the previous version.

## Upgrade

No other changes are needed to upgrade to the new version.

# Alternatives

None

# General Notes

# Links

<!--
Updated afterwards
-->
* Mailing List discussion thread:
* Mailing List voting thread:
Loading