docs: document druid.broker.realtime.balancer.type and select.tier#19591
docs: document druid.broker.realtime.balancer.type and select.tier#19591Adithya-Shetty100 wants to merge 1 commit into
Conversation
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
left a comment
There was a problem hiding this comment.
| 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`| |
There was a problem hiding this comment.
[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`| |
There was a problem hiding this comment.
[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.
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.typedruid.broker.realtime.select.tierThese 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 valuesrandom,connectionCount; overridesdruid.broker.balancer.typefor realtime servers only; falls back todruid.broker.balancer.typewhen unset.druid.broker.realtime.select.tier— possible valueshighestPriority,lowestPriority,custom,preferred; overridesdruid.broker.select.tierfor realtime servers only; falls back todruid.broker.select.tierwhen unset. The description also notes that the correspondingdruid.broker.realtime.select.tier.*sub-configs behave the same as theirdruid.broker.select.tier.*counterparts.The behavior documented here is taken directly from
BrokerRealtimeSelectorModule.Release note
Documented the
druid.broker.realtime.balancer.typeanddruid.broker.realtime.select.tierBroker properties introduced in #19062.This PR has: