Skip to content

fix(k8s): Size crawl4ai liveness probe from /health latency #6320

Open

Description

@devops-cli-service

Split from #6108.

ProblemnItem #6108 gives the Deployment devops/crawl4ai a liveness probe with first values. Nobody measured the latency of /health while Chromium renders a slow page. A timeout below that latency starts the pod again during a render.nn## Why deferrednThe measurement needs the running pod in the cluster and a slow page that it renders. The runner of the implement job holds no Kubernetes token, so it can make no render and read no latency. A person with cluster access does the measurement. The alternatives check of #6108 found that prometheus/blackbox_exporter records the latency of /health with the response time, and needs Prometheus to store and query it.nn## Acceptance criterian- A render of a slow page runs against the pod, and the p99 latency of /health during that render is recorded in the section Crawl4AI of docs/CLUSTER.md with the date and the command.n- The liveness probe of k8s/devops/crawl4ai/deployment.yaml sets periodSeconds, timeoutSeconds and failureThreshold so that its failure window stays above the recorded p99 latency.n- uv run devops ci --check --only kube-linter exits 0 after the change.n- uv run devops k8s lint exits 0 after the change.

Proposed design

Problem statement

No person measured the latency of /health during a slow-page render. A timeout below that latency restarts the Crawl4AI pod during a render. The change records the p99 latency and sizes the liveness probe from it. The runner holds no Kubernetes token, so a person with cluster access must do the measurement.

Acceptance criteria

Requirement: Pending a person after the merge

The change SHALL record the p99 latency of /health during a slow-page render in the Crawl4AI section of docs/CLUSTER.md with the date and the command.

Scenario: The measurement is recorded

  • WHEN A person with cluster access renders a slow page against the Crawl4AI pod and records the p99 latency of /health, the date and the command.
  • THEN The Crawl4AI section of docs/CLUSTER.md holds the p99 latency, the date and the command.

Requirement: Probe failure window exceeds the recorded p99

The liveness probe of k8s/devops/crawl4ai/deployment.yaml MUST set timeoutSeconds above the recorded p99 and MUST keep periodSeconds multiplied by failureThreshold above that latency.

Scenario: The live probe covers the recorded p99

  • WHEN A person applies the Deployment and runs kubectl -n devops get deploy crawl4ai -o jsonpath='{.spec.template.spec.containers[0].livenessProbe}'.
  • THEN The command shows timeoutSeconds above the recorded p99 and periodSeconds multiplied by failureThreshold above the recorded p99.

Requirement: Kube-linter passes

The change MUST pass the kube-linter check.

Scenario: Kube-linter runs

  • WHEN uv run devops ci --check --only kube-linter runs after the deployment change.
  • THEN The command exits 0.

Requirement: K8s lint passes

The change MUST pass the K8s lint check.

Scenario: K8s lint runs

  • WHEN uv run devops k8s lint runs after the deployment change.
  • THEN The command exits 0.

Existing Tool Considered

No alternatives check has run on this issue. The open, maintained tool that covers the measurement is prometheus/blackbox_exporter. It records the response time of /health as a Prometheus series and computes the p99, but it lacks a slow-page renderer and a Kubernetes token in the runner. The cluster Prometheus stores and queries the series (k8s/devops/monitoring/prometheus-rules-values.yaml). The change builds no code. It edits one manifest and one document, so the build cost is zero tokens and zero elapsed time.

Key questions

  • Can the implement runner measure the latency of /health?: No. The runner Job holds no Kubernetes API token. It reaches only DNS, the gateway, the OpenTelemetry collector, public HTTPS and the MCP server. A person with cluster access must do the measurement. [sources: docs/CLUSTER.md, CONTEXT.md]
  • How must the p99 latency of /health be measured?: Use the cluster Prometheus with prometheus/blackbox_exporter. It records the response time of /health as a series and computes the p99 over the slow-render window. Record the query, the date and the result in docs/CLUSTER.md. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml, docs/CLUSTER.md]
    • Chosen: Prometheus with blackbox_exporter. It stores the response time as a series and computes the p99. The cluster holds Prometheus rule values.
    • Rejected: Manual curl loop. It gives no stored series and no repeatable query.
    • Rejected: Kubelet probe history. It records probe success or failure, not the response time.
    • Rejected: Single request to /health. One sample gives no p99.
  • Which probe values change, and to what?: Set timeoutSeconds above the p99 recorded in docs/CLUSTER.md. Keep periodSeconds multiplied by failureThreshold above that p99. Keep the probe a liveness probe. The exact values come from the measurement. (best practice) [sources: k8s/devops/crawl4ai/deployment.yaml, docs/guidelines/kubernetes.md]
    • Chosen: Raise timeoutSeconds and keep the failure window above the p99. A slow answer at the p99 does not time out. One transient failure does not restart the pod.
    • Rejected: Raise only failureThreshold. Each probe can still time out below the p99 latency.
    • Rejected: Add a startup probe. The problem occurs during a render, not at startup.
    • Rejected: Remove the liveness probe. The kubelet then never restarts a stuck pod.
  • Where must the measurement be recorded?: In the Crawl4AI section of docs/CLUSTER.md, with the date and the command. (best practice) [sources: docs/CLUSTER.md, k8s/README.md]
    • Chosen: The Crawl4AI section of docs/CLUSTER.md. The document holds the decisions of the cluster. The issue names this section.
    • Rejected: A comment on the issue. A comment is no durable record of the cluster.
    • Rejected: k8s/README.md. It tells the cluster setup, not the probe values of one workload.

Fit

Fits in one pull request.

Suspected block

A person with cluster access must render a slow page against the Crawl4AI pod and provide the p99 latency of /health, the date and the command; the runner holds no Kubernetes token.

Dependencies

#6108

Activity

  1. added
    type/bug
    scope/k8s
    source/agent
    status/new
    value/medium
    effort/low
    on Nov 18, 2026
  2. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor
    • Related: fix(k8s): Give crawl4ai a liveness probe #6108, which asks for a different change. Both target the crawl4ai liveness probe in deployment.yaml, but #6108 adds the probe with first values while the candidate adjusts its timing from a measured p99 latency.
  3. changed the title [-]fix(k8s): Size the crawl4ai liveness probe from a measured `/health` latency[/-] [+]fix(k8s): Size crawl4ai liveness probe from /health latency[/+] on Nov 18, 2026
  4. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor

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

    • Before: fix(k8s): Size the crawl4ai liveness probe from a measured /health latency
    • After: fix(k8s): Size crawl4ai liveness probe from /health latency
    • Source of the summary: the background model
  5. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block and Watched files 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

  6. devops-cli-service commented on Nov 19, 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. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.

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

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block and Watched files 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

  9. devops-cli-service commented on Nov 29, 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

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/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions