SEO
AuraScore 89/100

Server-Side Rendering Crawl Log Anomaly Detector Script

Build a Go or Python log analysis script to detect search bot rendering bottlenecks, crawl budget waste, and 5xx SSR exceptions in real time.

Use this template when managing high-traffic server-side rendered platforms (such as Next.js, Remix, or Nuxt) where search bot crawling strains backend services. It yields a high-throughput streaming script that isolates search engine bots, correlates latency, and reports anomalies.

Template

Role: Principal Site Reliability and Search Systems Infrastructure Engineer.

Context

  • Web server access log path or stream: {{server_log_source}}
  • Verified search bot IP/CIDR list: {{bot_verification_source}}
  • Target HTTP status monitoring matrix: {{monitored_status_codes}}
  • Maximum acceptable TTFB threshold in milliseconds: {{latency_threshold_ms}}
  • Crawl spike anomaly threshold percentage: {{spike_sensitivity_pct}}
  • Diagnostic output destination: {{incident_report_path}}

Task

Develop a high-throughput log analysis script that parses server-side rendering web logs, verifies authentic search engine crawlers, detects crawl budget anomalies and rendering latency spikes, and outputs actionable telemetry reports for engineering and SEO teams.

Method

  1. Establish a streaming parser capable of reading standard Combined Log Format, JSON logs, or piped inputs from {{server_log_source}}.
  2. Implement a reverse-DNS and CIDR lookup mechanism using {{bot_verification_source}} to separate legitimate search engine bots from spoofed user agents.
  3. Filter and bucket requests by bot type (Googlebot, Bingbot, YandexBot, custom web crawlers), HTTP method, and requested path.
  4. Calculate rolling percentiles (p50, p95, p99) for time-to-first-byte (TTFB) and flag routes exceeding {{latency_threshold_ms}}.
  5. Monitor and aggregate response codes specified in {{monitored_status_codes}}, categorizing 5xx SSR render timeouts, 4xx broken routes, and 3xx redirect loops.
  6. Compute crawl volume velocity over rolling time windows, triggering anomaly flags when traffic deviates beyond {{spike_sensitivity_pct}}.
  7. Correlate slow dynamic SSR routes with specific URL query parameters causing un-cached rendering loops.
  8. Generate a consolidated diagnostic JSON/Markdown artifact written directly to {{incident_report_path}}.

Constraints

  • The script MUST operate in a single-pass streaming mode to avoid out-of-memory errors on log files exceeding 50GB.
  • The script MUST NOT perform blocking network lookups synchronously; cache DNS/CIDR evaluations in memory.
  • DNS verification must implement strict forward-confirmed reverse DNS (FCrDNS) standards.
  • Execution overhead must remain below 5% CPU usage when attached to live server log streams.

Output format

Format the response with the following sections:

  1. Systems Architecture (100-150 words describing stream handling and FCrDNS verification).
  2. Standalone Log Parser Script (complete executable Python or Go script with zero placeholder sections).
  3. Sample Telemetry Output (valid JSON structure showing detected anomalies, latency percentiles, and crawler breakdowns).

Self-review

  • Verify that all 6 context variables are used in script configuration flags or data structures.
  • Ensure FCrDNS verification logic correctly handles negative caching to prevent socket starvation.
  • Confirm that streaming buffer logic properly handles incomplete lines and truncated log rotation transitions.
AuraScore breakdown
89/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification14/14 · Strong

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

marketing
marketing-seo
software-engineering-debugging
crawl-budget
ssr
log-analysis