Skip to content

feat(k8s): Name the SearXNG throttle cause from 3 days of metrics #6753

Open

Description

@devops-cli-service

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 backend and result that 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 job and result that 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 searxng scrapes from /metrics over 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,science query 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-check after the change.
  • THEN The command passes, and keep_only holds 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.
  • How does the analysis split Service traffic from check and manual traffic?: By the job label of the scrape: the Service series carry job=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 job label. The counter carries only backend and result, and the Service rules already select job=roadmap-service.
    • Rejected: A caller label on devops_cli_web_searches_total. It is a code change with a deploy of its own, and the job label already separates the Service.
    • Rejected: No split, with a stated reason. The job label gives the split with no code change.
  • 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 searxng scrapes /metrics of the Service every 15 s with basic auth from Secret searxng-metrics-auth, and the render-settings init 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

  1. added
    type/feature
    scope/k8s
    source/agent
    status/new
    on Nov 22, 2026
  2. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    ContributorAuthor
  3. added
    value/medium
    effort/low
    priority/p2-medium
    on Nov 22, 2026
  4. changed the title [-]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[/+] on Nov 22, 2026
  5. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    ContributorAuthor

    The job shortened the title of this item. The summary had 61 characters, and the limit is 60. The type and the scope stay.

    • Before: feat(k8s): Name the SearXNG throttle cause from 3 days of engine metrics
    • After: feat(k8s): Name the SearXNG throttle cause from 3 days of metrics
    • Source of the summary: the background model
  6. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  7. dan-petty commented on Nov 26, 2026

    @dan-petty
    Owner

    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=json on 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.
    • Log of the Deployment searxng, 6 hours: 101 lines ERROR:searx.engines.duckduckgo: engine timeout, and HTTP errors of superuser, stackoverflow and askubuntu (47 each), github (12), docker hub (9) and mdn (8).
    • From another pod of the cluster with public egress, one request each with a browser User-Agent, so no query rate is in play: html.duckduckgo.com and lite.duckduckgo.com time out after 12 s, search.brave.com answers 429, the Wikipedia API answers 429 ("We suspect this request is automated"), mojeek.com answers with a captcha page, and startpage.com answers 200.
    • The engine wikipedia gives an infobox and no entry of results, so duckduckgo is 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/k8ssource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions