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: the query rate, or a flag on the cluster egress address. Evidence of 2026-11-26 shows that six requests with no query rate from a second pod got timeouts, HTTP 429 answers and a captcha page. So the cause is the cluster egress address. The change records the query rate, the per-engine series and that evidence in docs/CLUSTER.md. #5595 chooses the engine set from the result.

Acceptance criteria

Requirement: Query rate by backend and result

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 the last 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])) in Grafana Explore.
  • THEN The recorded table holds one row for each backend and result that the query returned, with its count, its share of the total and the window start and end.

Requirement: Service traffic apart from check and manual traffic

The change SHALL split the measured traffic by the job label, and MUST state that a run outside the cluster is never scraped.

Scenario: The job label of the scrape

  • WHEN A person runs sum by (job, result) (increase(devops_cli_web_searches_total{backend="searxng"}[3d])) in Grafana Explore.
  • THEN The recorded table holds one row for each job and result that the query returned, and a line that states the limit of the split.

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 cluster egress address as the cause of the throttle, with the evidence that rules the query rate out.

Scenario: Cause and excluded cause

  • WHEN A person compares the per-engine error series with the six requests that a second pod sent with no query rate.
  • THEN The recorded text names the cluster egress address, cites the values of the series, and states that a refusal at one request each rules the query rate out.

Requirement: One request each from a second pod

The change SHALL record the date, the six requests that a second pod sent with a browser User-Agent, and the answer of each one.

Scenario: The answers of the second source

  • WHEN A person checks the recorded text against the evidence of 2026-11-26, 21:40Z.
  • THEN The recorded text holds a timeout after 12 s from html.duckduckgo.com and lite.duckduckgo.com, HTTP 429 from search.brave.com and the Wikipedia API, a captcha page from mojeek.com and HTTP 200 from startpage.com.

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, and Grafana Explore draws them. They lack a label that tells a manual run outside the cluster from the Service, so the change states that limit. The change builds no code and keeps no code of its own.

Key questions

  • What causes the SearXNG throttle, and which observation shows it?: The cluster egress address. Six requests with a browser User-Agent and no query rate from a second pod got two timeouts, two HTTP 429 answers and a captcha page, and only startpage.com answered 200. (best practice) [sources: k8s/devops/searxng/configmap.yaml]
    • Chosen: The cluster egress address. A refusal at one request each shows that the rate is not the cause.
    • Rejected: The query rate of the Service. The second pod sent one request each and got the same refusals.
    • Rejected: The engine set. The set stays as it is, and fix(k8s): Choose the SearXNG engine set by reliability #5595 chooses it from this result.
  • 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 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.
    • 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, with a stated limit: a run outside the cluster is never scraped. (best practice) [sources: src/devops_cli/telemetry/instruments.py, docs/TELEMETRY.md:130, k8s/devops/monitoring/prometheus-rules-values.yaml:298]
    • Chosen: The job label, with its limit stated. The counter carries only backend and result, so the job label is the only split with no code change.
    • Rejected: A caller label on devops_cli_web_searches_total. It is a code change with a deploy of its own, and this item is an analysis.
    • Rejected: No split. The body asks for a split or for the reason that the labels cannot give it.
  • 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 body 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.
  • Does the per-engine series exist for the analysis?: Yes. ServiceMonitor searxng scrapes /metrics of the Service every 15 s, and the log of Deployment searxng holds the per-engine error lines. [sources: docs/CLUSTER.md:259]
  • Which engines does keep_only hold, and does the change alter them?: Nine engines: superuser, stackoverflow, askubuntu, arxiv, duckduckgo, github, docker hub, mdn and wikipedia. The change alters none of them and adds no retry loop. [sources: k8s/devops/searxng/configmap.yaml, docs/CLUSTER.md:258]

Fit

Fits in one pull request.

Suspected block

None.

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.

  8. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

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