Repository navigation
Description
Split from #4201.
Problem or Motivation The cause of the SearXNG throttle is not proven: it is the query rate, or a flag on the cluster egress address. The 3-hour log of 2026-11-08 holds Too many request (suspended_time=180) for superuser, stackoverflow, askubuntu and arxiv, HTTP 400 from api.stackexchange.com for the three Stack Exchange engines, and a duckduckgo CAPTCHA with suspended_time=0 that no suspension follows. #4201 adds the per-engine OpenMetrics scrape and keeps the engine set as it is. This item reads the series and names the cause. #5595 chooses the engine set from the result of this item and stops the CAPTCHA repeat. #4094 forbids a retry loop. ## Why this part is deferred The analysis needs at least 3 days of real Service traffic in devops_cli_web_searches_total by backend and result, and in the per-engine series that #4201 adds. It also needs one person's query from another egress address, to tell the two causes apart. No code change supplies that time or that query. ## Acceptance Criteria - The issue holds the query rate for each backend and the share of each result, over at least 3 days. - The issue splits that traffic into Service traffic and check or manual traffic, or states why the current labels cannot. - The issue holds the per-engine request, error and reliability series of SearXNG over the same period. - The issue names the cause, the query rate or the cluster egress address, with the evidence that rules the other out. - The issue records one query from another egress address and the engine results that it got.
Proposed design
Problem statement
The cause of the SearXNG throttle is not proven. It is the query rate, or a flag on the cluster egress address. The change reads at least 3 days of devops_cli_web_searches_total and of the per-engine series that ServiceMonitor searxng scrapes. It adds one query from another egress address and records the cause in docs/CLUSTER.md. #5595 chooses the engine set from that result.
Acceptance criteria
Requirement: Query rate by backend
The change SHALL record in docs/CLUSTER.md the query rate of each backend and the share of each result of devops_cli_web_searches_total over at least 3 days.
Scenario: Three days of the web search counter
- WHEN A person runs
sum by (backend, result) (increase(devops_cli_web_searches_total[3d]))on the cluster Prometheus. - THEN The query returns one line for each
backendandresultthat emitted a search in the window, and the recorded table holds each line with its share of the total.
Requirement: Service traffic apart from check and manual traffic
The change SHALL split the measured traffic into Service traffic and check or manual traffic by the job label, or MUST state why the labels cannot.
Scenario: The job label of the scrape
- WHEN A person runs
sum by (job, result) (increase(devops_cli_web_searches_total{backend="searxng"}[3d]))on the cluster Prometheus. - THEN The recorded table holds one row for each
jobandresultthat the query returned, and a line that names the split basis.
Requirement: Per-engine series of SearXNG
The change SHALL record the per-engine request, error and reliability series of SearXNG over the same 3 days.
Scenario: The series of ServiceMonitor searxng
- WHEN A person queries the per-engine series that ServiceMonitor
searxngscrapes from/metricsover the same 3 days. - THEN The recorded table holds the request, error and reliability series of each engine of
keep_only.
Requirement: The named cause
The change SHALL name the cause of the throttle, the query rate or the cluster egress address, with the evidence that rules the other cause out.
Scenario: Cause and excluded cause
- WHEN The recorded table holds the query rate and the per-engine error series of the same 3 days.
- THEN The recorded text names one cause, cites the values of the two series, and states the observation that rules out the other cause.
Requirement: One query from another egress address
The change SHALL record one query from another egress address with the engine results that it got.
Scenario: A query from a second address
- WHEN A person sends one
general,it,sciencequery through the SearXNG service from an egress address other than the cluster address. - THEN The recorded text holds the date, the engines that answered and each engine result, including a CAPTCHA or a suspension.
Requirement: The engine set and the settings stay as they are
The change SHALL leave keep_only and the SearXNG settings as they are, with no retry loop.
Scenario: The live check of the running service
- WHEN A person runs
uv run devops k8s searxng-checkafter the change. - THEN The command passes, and
keep_onlyholds the nine engines that it held before the change.
Existing Tool Considered
No alternatives check has run. Prometheus and Grafana, already deployed with the cluster monitoring stack, cover the need: PromQL gives the rate of devops_cli_web_searches_total by backend and result and the per-engine series that ServiceMonitor searxng scrapes, over any window, and Grafana draws them. They lack a caller label on the counter, so the change splits Service traffic from check and manual traffic by the job label. The change builds no code.
Key questions
- Where does the change record the analysis?: In the engines bullet of
docs/CLUSTER.md, beside the engine facts that it explains. (best practice) [sources: docs/CLUSTER.md:258, docs/CLUSTER.md:259]- Chosen: The engines bullet of
docs/CLUSTER.md. It already holds the engine facts and the open rate question, and it names feat(k8s): Name the SearXNG throttle cause from 3 days of metrics #6753 as the reader of the series. - Rejected: A comment on the issue. The fact is durable, and the next item reads the repository, not a comment.
- Rejected: A new document under
docs/. A new document adds a class to the docs inventory for one analysis.
- Chosen: The engines bullet of
- How does the analysis split Service traffic from check and manual traffic?: By the
joblabel of the scrape: the Service series carryjob=roadmap-service. (best practice) [sources: docs/TELEMETRY.md:130, k8s/devops/monitoring/prometheus-rules-values.yaml:298, src/devops_cli/telemetry/instruments.py]- Chosen: The
joblabel. The counter carries onlybackendandresult, and the Service rules already selectjob=roadmap-service. - Rejected: A caller label on
devops_cli_web_searches_total. It is a code change with a deploy of its own, and thejoblabel already separates the Service. - Rejected: No split, with a stated reason. The
joblabel gives the split with no code change.
- Chosen: The
- Which window does the analysis read?: 3 days that end at the query time, with
increase()over[3d]and a 1 h step. (best practice) [sources: docs/CLUSTER.md:258, docs/CLUSTER.md:259]- Chosen: 3 days. The issue sets 3 days as the floor, and the 15 s scrape keeps the read small.
- Rejected: 1 day. A CAPTCHA suspension lasts 86400 s, so one day can hold a whole suspension and hide the rate.
- Rejected: 7 days. It adds no evidence of the cause and doubles the read.
- Which observation tells the query rate from the egress address flag?: One query from another egress address: the same refusals at the same rate show that the address is not the cause, and clean results there show that the cluster address is. (best practice) [sources: docs/CLUSTER.md:258]
- Chosen: One query from another egress address. The 2026-11-08 log holds no request rate, so only a second address separates the two causes.
- Rejected: The 2026-11-08 log alone. The log holds the suspensions but no rate, and the issue states that the cause is not proven.
- Rejected: The per-engine series alone. It shows which engine refuses, not whether the address or the rate causes the refusal.
- Does the per-engine series exist for the analysis?: Yes. ServiceMonitor
searxngscrapes/metricsof the Service every 15 s with basic auth from Secretsearxng-metrics-auth, and therender-settingsinit container writes the password into the settings. [sources: docs/CLUSTER.md:259] - Does the change alter the engine set or add a retry?: No. fix(k8s): Choose the SearXNG engine set by reliability #5595 chooses the engine set from the result, and the settings add no retry loop. [sources: docs/CLUSTER.md:258, k8s/devops/searxng/configmap.yaml]
Fit
Fits in one pull request.
Suspected block
3 days of Service traffic in devops_cli_web_searches_total and in the per-engine series, and one person's query from another egress address.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 22, 2026
Both work on the SearXNG throttle; #4201 adds the per-engine OpenMetrics scrape, the candidate reads those series over 3 days to name the cause.[-]feat(k8s): Name the SearXNG throttle cause from 3 days of engine metrics[/-][+]feat(k8s): Name the SearXNG throttle cause from 3 days of metrics[/+]devops-cli-service commentedon Nov 22, 2026
The job shortened the title of this item. The summary had 61 characters, and the limit is 60. The type and the scope stay.
feat(k8s): Name the SearXNG throttle cause from 3 days of engine metricsfeat(k8s): Name the SearXNG throttle cause from 3 days of metricsdevops-cli-service commentedon Nov 23, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Nov 26, 2026
Evidence of 2026-11-26, 21:40Z to 21:50Z, for the cause of the throttle. It points at a flag on the cluster egress address, not only at the query rate of the Service.
GET /search?q=debian&format=jsonon the SearXNG Service gives HTTP 200 with"results": []and"unresponsive_engines": [["duckduckgo", "Suspended: timeout"]]. A second, different query gives["duckduckgo", "timeout"]. So a general query gives no result today.searxng, 6 hours: 101 linesERROR:searx.engines.duckduckgo: engine timeout, and HTTP errors ofsuperuser,stackoverflowandaskubuntu(47 each),github(12),docker hub(9) andmdn(8).html.duckduckgo.comandlite.duckduckgo.comtime out after 12 s,search.brave.comanswers 429, the Wikipedia API answers 429 ("We suspect this request is automated"),mojeek.comanswers with a captcha page, andstartpage.comanswers 200.wikipediagives an infobox and no entry ofresults, soduckduckgois the only engine of the set that fills the result list.A second client now depends on the result: Open WebUI uses this Service for its web search (dan-petty/homelab#401), and its search gives "No results found" until the engine set works.