keepcalculator

06 Numbers and Powers

Backend Metrics Triage: Which API & Cron Signals Need Action?

Card No. 06·65432 · Updated · Standard formula, shown below

Backend metrics triage tells you which API and cron job signals need action by separating noise from real problems: you act on signals that indicate user-facing errors, sustained latency breaches, or missed schedules, and you ignore transient spikes that self-resolve. This article explains how to set up a practical triage system that prioritizes alerts by impact, so you don’t wake up for a blip but do get paged for a broken checkout.

Why Triage Matters

Modern backend systems generate thousands of metrics per second. Without triage, every small blip creates an alert, and teams quickly develop alert fatigue – they ignore everything, including the one alert that matters. Triage is the process of ranking signals by severity and acting only on those that threaten availability, correctness, or user experience.

The core principle: act on symptoms users see, not on internal noise. A 200 ms latency increase for 30 seconds might be a garbage collection pause that nobody notices. A 5% error rate on the payment API for 10 minutes is a fire. The triage score helps you distinguish these.

Key API Signals That Need Action

Not all API metrics are equal. These are the ones that typically warrant immediate attention:

  • Error rate – the percentage of requests returning 5xx or 4xx (excluding expected 404s). A sudden jump above 1% for more than 5 minutes usually means a deployment bug or a downstream dependency failure.
  • Latency percentiles – p95 and p99 response times. If p99 exceeds your SLO (e.g., 500 ms) for 10+ minutes, users are feeling it, even if the average looks fine.
  • Throughput drop – a sudden decrease in requests per second can indicate a routing issue, a DNS failure, or a client-side problem. It’s often missed because it’s not an error.
  • Queue depth – if your API sits behind a message queue, a growing backlog means consumers are falling behind. This leads to timeouts and data staleness.

For each signal, ask: “Does this affect a user right now?” If yes, it’s actionable. If not, it’s a candidate for a lower-priority ticket.

Key Cron Job Signals That Need Action

Cron jobs (scheduled tasks) are the silent workers of a backend. They send emails, clean up databases, refresh caches, and generate reports. When they fail, the impact may not be immediate, but it compounds. Watch these:

  • Missed runs – a job that didn’t start at all. This is the most critical signal because it often means the scheduler is down or the job was deleted.
  • Failure rate – the percentage of runs that exit with a non-zero code. A job that fails once might be a transient network issue; failing 3 times in a row is a pattern.
  • Duration outliers – a job that usually takes 2 minutes but now takes 30. This can indicate a data growth problem or a deadlock.
  • Output size anomalies – a job that produces 0 rows when it normally produces 10,000. This can indicate missing data upstream.

For cron jobs, the triage question is: “Is this job critical to the business?” A nightly backup job failing is more urgent than a log rotation job failing.

How to Set Up a Triage System

You don’t need a fancy AI tool. A simple scoring system like the one above works. Here’s a practical approach:

  1. Define your SLOs – for each API endpoint and cron job, write down the acceptable error rate, latency, and success rate. Use these as thresholds.
  2. Collect metrics – use a monitoring tool (Prometheus, Datadog, CloudWatch, etc.) to record error rates, latencies, and cron run statuses.
  3. Create alert rules – for each signal, create an alert that fires when the threshold is breached for a sustained period (e.g., 5 minutes). Avoid alerting on single data points.
  4. Assign severity levels – use the score to route alerts: critical (page), warning (email/Slack), info (dashboard).
  5. Review and tune – once a month, look at which alerts fired and whether they led to action. Adjust thresholds and weights to reduce false positives.

The goal is to get to a place where every alert you receive requires a human decision or action. If you get alerts you ignore, they’re noise.

Common Mistakes in Triage

Even with a score, teams make the same errors. Avoid these:

  • Alerting on averages – averages hide outliers. Use percentiles (p95, p99) for latency.
  • Ignoring cron jobs until they break – a missed backup for 3 days might be unrecoverable. Monitor cron health proactively.
  • Not correlating signals – a spike in errors and a spike in latency might have the same root cause. Your triage system should group related alerts.
  • Setting thresholds too tight – if you alert on any 1% error rate for 1 minute, you’ll be paged for a single bad request. Use longer durations for lower severity.

Another common misconception: “If it’s not an error, it’s fine.” A cron job that succeeds but takes 10x longer than usual is a warning sign for capacity issues. Always compare against historical baselines.

Frequently Asked Questions

What’s the difference between an alert and a triage signal?

An alert is a notification that a threshold was crossed. A triage signal is the set of metrics you use to decide whether that alert requires action. Triage is the decision-making process; alerts are just the raw inputs.

How do I choose the right thresholds for my API?

Start with your SLOs. If your SLO says p99 latency under 500 ms, set your alert at 500 ms for 10 minutes. Then adjust based on real incidents: if you get too many false alarms, raise the duration; if you miss real issues, lower it.

Should I alert on every cron job failure?

No. Alert on the first failure of critical jobs (backup, billing, data sync), but for non-critical jobs (log cleanup), alert only if it fails 3 consecutive times. This reduces noise while still catching persistent problems.

What do I do when I get a triage score but no obvious cause?

Check recent deployments, dependency health (databases, external APIs), and infrastructure changes. Most incidents are caused by a change. If nothing changed, look at gradual trends – maybe your data has grown past a limit.

Can I use this triage score for real-time alerting?

Yes, but compute it on a rolling window (e.g., every 5 minutes) and only alert when the score crosses a threshold. This prevents alert storms from short spikes. For very critical systems, you might alert on the raw error rate immediately, but that’s the exception.

Comparison: API vs. Cron Triage Priorities

APIs and cron jobs fail differently, and your triage should reflect that. APIs are synchronous – users are waiting, so latency and errors are immediately visible. Cron jobs are asynchronous – failures are invisible until a downstream effect appears. Therefore:

  • For APIs, prioritize error rate and latency percentiles.
  • For cron jobs, prioritize missed runs and consecutive failures.
  • For both, correlate with business impact: a report cron job that fails might not matter until the end of the month.

A good triage system treats them with equal weight but different signals. The score formula above gives cron misses a higher multiplier because they are often silent.

Costs and Alternatives

Building a triage system doesn’t require expensive tools. Open-source monitoring stacks (Prometheus + Grafana + Alertmanager) can handle it. The main cost is engineering time to define thresholds and tune them. Commercial tools offer machine-learning anomaly detection that can auto-adjust baselines, but they’re not magic – you still need to define what “actionable” means.

Alternatives to a custom score include:

  • Simple static thresholds – works for small systems, but generates false positives.
  • Anomaly detection – uses historical data to flag deviations, but requires enough history and can miss sudden changes.
  • On-call rotation with manual review – the human brain is still the best triage tool, but it doesn’t scale.

Start with the simple score, then iterate. The goal is to make every alert meaningful.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →