Skip to content

docs: document druid.broker.realtime.balancer.type and select.tier#19591

Open
Adithya-Shetty100 wants to merge 1 commit into
apache:masterfrom
Adithya-Shetty100:docs-broker-realtime-selector
Open

docs: document druid.broker.realtime.balancer.type and select.tier#19591
Adithya-Shetty100 wants to merge 1 commit into
apache:masterfrom
Adithya-Shetty100:docs-broker-realtime-selector

Conversation

@Adithya-Shetty100

Copy link
Copy Markdown

Description

#19062 added two new Broker configuration properties that let operators override the Broker's balancer and tier selection strategies for realtime servers:

  • druid.broker.realtime.balancer.type
  • druid.broker.realtime.select.tier

These properties were merged without documentation (the author noted they could be documented separately). This PR documents them in the Broker query configuration table.

What changed

Added two rows to the Broker query configuration table:

  • druid.broker.realtime.balancer.type — possible values random, connectionCount; overrides druid.broker.balancer.type for realtime servers only; falls back to druid.broker.balancer.type when unset.
  • druid.broker.realtime.select.tier — possible values highestPriority, lowestPriority, custom, preferred; overrides druid.broker.select.tier for realtime servers only; falls back to druid.broker.select.tier when unset. The description also notes that the corresponding druid.broker.realtime.select.tier.* sub-configs behave the same as their druid.broker.select.tier.* counterparts.

The behavior documented here is taken directly from BrokerRealtimeSelectorModule.

Release note

Documented the druid.broker.realtime.balancer.type and druid.broker.realtime.select.tier Broker properties introduced in #19062.


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.

PR apache#19062 added druid.broker.realtime.balancer.type and
druid.broker.realtime.select.tier to let operators override the Broker
balancer and tier selection strategies for realtime servers, but these
properties were not documented. Add them to the Broker query configuration
table, noting that they override the corresponding Historical-oriented
properties for realtime servers only and fall back to those when unset.

Co-authored-by: Cursor <cursoragent@cursor.com>

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Severity Findings
P0 0
P1 0
P2 1
P3 1
Total 2
Severity Findings
P0 0
P1 0
P2 1
P3 1
Total 2

Reviewed 1 of 1 changed files.


This is an automated review by Codex GPT-5.5

|`druid.broker.select.tier.custom.priorities`|An array of integer priorities, such as `[-1, 0, 1, 2]`|Select servers in tiers with a custom priority list.|The config only has effect if `druid.broker.select.tier` is set to `custom`. If `druid.broker.select.tier` is set to `custom` but this config is not specified, the effect is the same as `druid.broker.select.tier` set to `highestPriority`. Any of the integers in this config can be ignored if there's no corresponding tiers with such priorities. Tiers with priorities explicitly specified in this config always have higher priority than those not and those not specified fall back to use `highestPriority` strategy among themselves.|
|`druid.broker.select.tier.preferred.tier`| The preferred tier name. E.g., `_default_tier` | A non-empty value that specifies the preferred tier in which historical servers will be picked up for queries. If there are not enough historical servers from the preferred tier, servers from other tiers (if there are any) will be selected. This config only has effect if `druid.broker.select.tier` is set to `preferred` | null |
|`druid.broker.select.tier.preferred.priority`| `highest`, `lowest` | If there are multiple candidates in a preferred tier, specifies the priority to pick up candidates. By default, the higher priority a historical, the higher chances it will be picked up. This config only has effect if `druid.broker.select.tier` is set to `preferred`| `highest` |
|`druid.broker.realtime.balancer.type`|`random`, `connectionCount`|Determines how the broker balances connections to realtime processes. This overrides `druid.broker.balancer.type` for realtime servers only; Historical processes are unaffected. If not set, realtime servers use the strategy configured by `druid.broker.balancer.type`.|Value of `druid.broker.balancer.type`|

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] Realtime balancer override is documented as standalone

This row says druid.broker.realtime.balancer.type overrides the historical balancer for realtime servers, but RealtimeTierSelectorStrategyProvider only constructs a realtime tier selector with the realtime ServerSelectorStrategy when druid.broker.realtime.select.tier is set. If only the balancer override is configured, it returns the default historical TierSelectorStrategy, so realtime server picking still uses the default balancer. Either fix that implementation path or document the dependency so operators do not configure a no-op override.

|`druid.broker.select.tier.preferred.tier`| The preferred tier name. E.g., `_default_tier` | A non-empty value that specifies the preferred tier in which historical servers will be picked up for queries. If there are not enough historical servers from the preferred tier, servers from other tiers (if there are any) will be selected. This config only has effect if `druid.broker.select.tier` is set to `preferred` | null |
|`druid.broker.select.tier.preferred.priority`| `highest`, `lowest` | If there are multiple candidates in a preferred tier, specifies the priority to pick up candidates. By default, the higher priority a historical, the higher chances it will be picked up. This config only has effect if `druid.broker.select.tier` is set to `preferred`| `highest` |
|`druid.broker.realtime.balancer.type`|`random`, `connectionCount`|Determines how the broker balances connections to realtime processes. This overrides `druid.broker.balancer.type` for realtime servers only; Historical processes are unaffected. If not set, realtime servers use the strategy configured by `druid.broker.balancer.type`.|Value of `druid.broker.balancer.type`|
|`druid.broker.realtime.select.tier`|`highestPriority`, `lowestPriority`, `custom`, `preferred`|Tier selection strategy for realtime processes. This overrides `druid.broker.select.tier` for realtime servers only; Historical processes are unaffected. If not set, realtime servers use the strategy configured by `druid.broker.select.tier`. The corresponding sub-configs `druid.broker.realtime.select.tier.custom.priorities`, `druid.broker.realtime.select.tier.preferred.tier`, and `druid.broker.realtime.select.tier.preferred.priority` behave the same as their `druid.broker.select.tier.*` counterparts.|Value of `druid.broker.select.tier`|

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P3] Supported realtime tier strategies are omitted

BrokerRealtimeSelectorModule and TierSelectorStrategy also support strict and pooled for druid.broker.realtime.select.tier, and the tests exercise druid.broker.realtime.select.tier.strict.priorities and druid.broker.realtime.select.tier.pooled.priorities. The new docs row lists only highestPriority, lowestPriority, custom, and preferred, and only mentions the custom/preferred sub-configs, so valid realtime selector configurations remain undocumented.

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.

2 participants