Skip to content

fix(druid): set the historicals' HTTP threads under the key Druid reads - #303

Open
stxkxs wants to merge 1 commit into
mainfrom
claude/druid-historical-http-threads
Open

stxkxs wants to merge 1 commit into
mainfrom
claude/druid-historical-http-threads

Conversation

@stxkxs

@stxkxs stxkxs commented Nov 29, 2026

Copy link
Copy Markdown
Member

The historicals' runtime properties in catalog/druid/values.yaml set druid.server.http.numThread=42. Druid reads druid.server.http.numThreads. This renames the one key and changes nothing else.

What changes at runtime

Today, Druid ignores the misspelled line, so each historical runs Druid's default HTTP thread count.

  • Druid 39.0.0 binds numThreads under druid.server.http in ServerConfig, and getNumThreadsFromProperties looks up druid.server.http.numThreads by name.
  • When that key is absent, the count is max(10, P * 17 / 16 + 2) + 30, where P is Runtime.availableProcessors().
  • P is the smaller of the node's vCPUs and the container's CPU limit of 14, because nothing in the chart sets the processor count.
  • A historical requests 40Gi and is scheduled onto i3 nodes:
Node vCPUs the JVM sees HTTP threads today After this change
i3.2xlarge, the smallest i3 that holds the 40Gi request 8 40 42
i3.4xlarge or larger 14 (the CPU limit) 46 42

After, every historical runs 42 HTTP threads, whichever node it lands on.

Why the count matters: the two brokers each open druid.broker.http.numConnections=20 to every historical, 40 connections in all. Druid's tuning guide sets a historical's numThreads slightly above that sum, because each query connection holds one server thread. On an i3.2xlarge today, a historical has no thread to spare once both brokers' pools are full. At 42 it keeps two spare on every node, and on a node of 16 vCPUs or more that is four fewer than today's default.

Only the historical's runtime properties change. The ConfigMap the chart renders differs in that one line, so the historicals pick it up on their next rollout.

Checks run on this branch

At this head (51e72ed, on 27f1230):

  • The chart renders through scripts/catalog.py for development, staging, production and hub. Each render carries druid.server.http.numThreads=42 once, and none carries the misspelled key.
  • check-serviceaccount-bindings.py passes.
  • test_catalog and test_serviceaccount_bindings pass: 33 tests.
  • yamllint (repo config) and the zero-placeholder gate pass.

Generated by Claude Code

The historicals' runtime properties set druid.server.http.numThread=42.
Druid 39.0.0 reads druid.server.http.numThreads: ServerConfig binds it under
druid.server.http, and getNumThreadsFromProperties looks up that exact key.
Nothing reads numThread, so every historical has run Druid's default,
max(10, P * 17 / 16 + 2) + 30 threads, where P is the processor count its
JVM sees.

The JVM sees the smaller of the node's vCPUs and the container's CPU limit,
14, since nothing in the chart sets the count. A historical requests 40Gi
and runs on i3 nodes. On an i3.2xlarge, the smallest i3 that holds that
request, with 8 vCPUs, the default is 40. On an i3.4xlarge or larger it is
46.

The two brokers each open druid.broker.http.numConnections=20 to every
historical, 40 in all, and Druid's tuning guide puts a historical's
numThreads above the sum of those. At the default on an i3.2xlarge, a
historical has no thread spare once both brokers' pools are full.

With the key spelled as Druid reads it, every historical runs 42 threads,
whichever node it lands on. That is two more than today on an i3.2xlarge,
and four fewer on an i3.4xlarge or larger.

Co-authored-by: stxkxsbot <275011021+stxkxsbot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

CI Results

Check Status
Zero-placeholder gate ✅ success
Pinned chart archives ✅ success
YAML Lint ✅ success
Dashboard gate (live grafana.com ids + AMG-saveable) ✅ success
Kyverno policy tests (+ verify-images contract) ✅ success
Admission pins a verified tag to its digest (kind) ✅ success
Fork-safety gate (no hardcoded org, blocking) ✅ success
Account ids read as secrets and masked first ✅ success
Helm-render (every addon × every env) ✅ success
Rendered images carry no unacknowledged CRITICAL ✅ success
Policy-admission (Enforce-tier Kyverno vs the fleet) ✅ success
ApplicationSet schema + sync waves ✅ success
Appset render (ApplicationSet template strings) ✅ success
Secret scan (gitleaks) ✅ success
Render + assert + schema + misconfig (all environments) ✅ success
Renovate manager coverage ✅ success
Loki volume warns before cutoff ✅ success
Falco loads every rule set it installs ✅ success
Gate scripts pass lint, typecheck and shellcheck ✅ success
Policy validity (kustomize + kyverno) ✅ success
The gates themselves are tested ✅ success
Pods name ServiceAccounts that exist ✅ success
Catalog CRs admissible against the operator chart ✅ success
Catalog source reads its revision ✅ success

All checks passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant