← CodeClarityLab Home
Browse by Category
+ added · updated 7d
← Back to glossary

Uptime Monitoring

observability PHP 5.0+ Intermediate

Also Known As

Pingdom UptimeRobot synthetic monitoring RUM health check monitoring

TL;DR

Continuously checking that your application is reachable and responding correctly — synthetic monitoring (scripted checks from external locations) vs real user monitoring (RUM from actual traffic).

Explanation

Synthetic monitoring: external agents (Pingdom, UptimeRobot, Checkly, AWS CloudWatch Synthetics) send HTTP requests on a schedule and alert on downtime or degradation. Checks: simple HTTP ping, multi-step flows (login, checkout), API endpoint verification. Real User Monitoring (RUM): instruments actual user traffic — measures real-world performance, captures Core Web Vitals, detects regional issues. Both complement each other: synthetic catches outages quickly (1-minute intervals), RUM shows real user experience. PHP health endpoint: respond 200 only if DB, cache, and critical services are all healthy.

Common Misconception

HTTP 200 response means the application is working — a health check that returns 200 even when the database is down provides false assurance; health endpoints must verify actual dependencies.

Why It Matters

Without uptime monitoring, you learn about downtime from customer support tickets — with monitoring, you know within 60 seconds and can respond before most users notice.

Common Mistakes

  • Health endpoint that always returns 200 regardless of dependencies.
  • Monitoring only from one geographic location — regional DNS or CDN issues go undetected.
  • No alert escalation — single point of contact for 3am alerts causes burnout.
  • Checking homepage only — deep application functionality (checkout, API) may be broken while the homepage serves from cache.

Code Examples

✗ Vulnerable
// Shallow health check — always 200:
// GET /health
echo json_encode(['status' => 'ok']); // Returns 200 even when DB is down
http_response_code(200);
// Uptime monitor: all green
// Reality: every user request is failing with 500
✓ Fixed
// Deep health check:
GET /health → 200 if all healthy, 503 if any dependency down:

$checks = [
    'database' => fn() => $pdo->query('SELECT 1'),
    'cache'    => fn() => $redis->ping(),
    'queue'    => fn() => $horizon->isRunning(),
];
$failed = [];
foreach ($checks as $name => $check) {
    try { $check(); } catch (\Throwable) { $failed[] = $name; }
}
$healthy = empty($failed);
http_response_code($healthy ? 200 : 503);
echo json_encode(['status' => $healthy ? 'ok' : 'degraded', 'failed' => $failed]);

Added 16 Mar 2026
Edited 22 Mar 2026
Views 15
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 1 ping S 0 pings S 0 pings M 0 pings T 1 ping W 0 pings T 0 pings F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 0 pings S
No pings yet today
No pings yesterday
Amazonbot 6 Perplexity 2 Ahrefs 2 Google 1
crawler 11
DEV INTEL Tools & Severity
🟠 High ⚙ Fix effort: Low
⚡ Quick Fix
Set up external uptime monitoring (UptimeRobot, Pingdom) that checks from outside your network — internal health checks miss DNS, CDN, and ISP failures
📦 Applies To
PHP 5.0+ web
🔗 Prerequisites
🔍 Detection Hints
No external uptime monitoring; status page not configured; no alert when site is down from external perspective
Auto-detectable: ✓ Yes uptimerobot pingdom statuspage betterstack
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: Medium ✗ Manual fix Fix: Medium Context: File

✓ schema.org compliant