Skip to content

Configurable Broker tier selection for Realtime servers#19062

Open
abhishekrb19 wants to merge 3 commits intomasterfrom
configurable_broker_realtime_tier_strategy
Open

Configurable Broker tier selection for Realtime servers#19062
abhishekrb19 wants to merge 3 commits intomasterfrom
configurable_broker_realtime_tier_strategy

Conversation

@abhishekrb19
Copy link
Contributor

@abhishekrb19 abhishekrb19 commented Feb 26, 2026

Currently, the Broker uses the same strategy configured by druid.broker.select.tier for both Historicals and realtime servers.

This patch allows operators to optionally override that behavior for realtime servers via the druid.broker.select.realtime.tier property. This is useful in environments where Historicals and realtime servers are configured differently.

  • If the new property druid.broker.select.realtime.tier is not configured (default behavior), realtime servers will continue to use the default strategy or the one configured via druid.broker.select.tier, for backward compatibility.
  • If druid.broker.select.realtime.tier is configured, all strategies currently supported by druid.broker.select.tier will also apply to the realtime strategy.

Approach:

  • Add a separate module BrokerRealtimeTierSelectorModule that's added to CliBroker
  • This module is essentially a named provider for the realtime servers' TierSelectorStrategy
  • By default, if this isn't configured, the BrokerServerView will continue to use the configured historical's tier strategy

While at it, I also added toString() and related helpers for TierSelectorStrategy implementations to improve debuggability and test verification.

I can document this configuration separately, since the relevant sections in the existing docs for druid.broker.select.tier could also use an update.

Release note:

Added druid.broker.select.realtime.tier on the Brokers to optionally override the Broker’s tier selection strategy for realtime servers. If unset, realtime servers continue to use the existing druid.broker.select.tier configuration that applies to both historical and realtime servers.

This PR has:

  • been self-reviewed.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • been tested in a test Druid cluster.

Currently the BrokerServerView shares the same strategy configured by
druid.broker.select.tier for both historicals and realtime servers.

This patch allows operators to optionally overide that behavior based on how
realtime servers are setup via druid.broker.select.realtime.tier property.

If this property isn't specified, the realtime servers' strategy will continue
to share the historical's strategy (backwards compatble).
@abhishekrb19 abhishekrb19 force-pushed the configurable_broker_realtime_tier_strategy branch from 5e5a322 to 441f48d Compare February 26, 2026 22:49
@abhishekrb19 abhishekrb19 force-pushed the configurable_broker_realtime_tier_strategy branch from 734a358 to fd405ba Compare February 27, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant