Developer Reference & Specifications

PingPup Documentation

Technical architecture, distributed quorum consensus, multi-vector synthetic probes, and cryptographic webhook integration.

Distributed Edge Mesh

1. Multi-Region Architecture

PingPup executes synthetic health checks from 4 geographically isolated physical edge points of presence. Rather than relying on single-point probes that produce transient route blips, all downtime determinations require distributed quorum consensus across our fleet.

🇺🇸Ashburn, VAiad
Dedicated probe agent with socket-level TLS, DNS, and HTTP engines.
🇩🇪Frankfurtfra
Dedicated probe agent with socket-level TLS, DNS, and HTTP engines.
🇸🇬Singaporesin
Dedicated probe agent with socket-level TLS, DNS, and HTTP engines.
🇧🇷São Paulogru
Dedicated probe agent with socket-level TLS, DNS, and HTTP engines.
Consensus Engine

2. 3-of-4 Quorum Rules & Recovery

Our quorum state machine evaluates every round against deterministic consensus formulas to protect against false positive alerts:

Down Confirmation Rule:

When 4 healthy regions are online, an outage is confirmed if and only if at least 3 regions (3 of 4) report reachability failure. If only 1 or 2 regions fail, the sentinel transitions to SUSPECT without dispatching false-alarm customer alerts.

3-Pass Recovery Lifecycle:

To transition from DOWN back to UP, a sentinel must pass 3 consecutive voting rounds cleanly. A split or failing round resets consecutive passes to 0. Upon the 3rd successful pass, the incident resolution timestamp is backdated to the timestamp of Pass #1.

Flap Damping:

If an unstable target undergoes 4 state transitions within a 30-minute rolling window, the sentinel enters flapping suppression mode to prevent notification storms until 30 continuous minutes of stability are recorded.

Probe Vectors

3. Health Vectors Monitored

HTTP / Network Reachability

Evaluates HTTP response status codes (2xx/3xx healthy, 401/403/429 treated as reachable). HTTP 5xx errors, TCP connection refused, and timeouts (>10s) trigger confirmation rounds.

Socket-Level TLS Inspection

Direct raw socket TLS handshake extracting true certificate issuer, SANs, and expiry dates. Automatic warning notifications dispatched at 30, 14, 7, 3, and 1 days prior to certificate expiration.

Dual-DoH DNS Drift Detection

Queries authoritative records across 8 types (A, AAAA, CNAME, MX, TXT, NS, SOA, CAA) via dual DoH (Cloudflare 1.1.1.1 and Google 8.8.8.8). Requires 2 consecutive checks in agreement before firing high-severity drift alerts.

RDAP & WHOIS Expiry

Queries official IANA registry RDAP endpoints with port-43 socket fallback for domain registration dates, alerting at 60, 30, 14, 7, 3, and 1 days before domain expiration.

Zero-Trust Security

4. Cryptographic Webhook Signatures

Every custom HTTPS webhook dispatched by PingPup includes cryptographic signature headers so your API endpoints can verify authenticity and protect against replay attacks.

HTTP HeaderFormat / ExampleDescription
X-PingPup-Signaturet=1730390400,v1=5e8f4...UNIX timestamp and hex-encoded HMAC-SHA256 signature
X-PingPup-Timestamp1730390400UNIX epoch seconds when the webhook was generated
Signature Payload Computation

The signature is computed over {timestamp}.{rawBody} using your channel signing secret (whsec_...). Always enforce a 300-second (5 minute) anti-replay tolerance window.

Node.js / TypeScript Verification
import crypto from 'node:crypto';
import type { IncomingMessage, ServerResponse } from 'node:http';

/**
 * Verify a PingPup incoming webhook signature in Node.js / TypeScript.
 *
 * @param secret - Your channel signing secret (starts with whsec_...)
 * @param rawBody - Exact UTF-8 string payload received in HTTP request body
 * @param signatureHeader - Value of 'X-PingPup-Signature' header (format: t=<unix>,v1=<hex>)
 * @param toleranceSec - Maximum clock drift tolerance in seconds (default: 300s)
 */
export function verifyPingPupWebhook(
  secret: string,
  rawBody: string,
  signatureHeader?: string | null,
  toleranceSec = 300
): { valid: boolean; reason?: string } {
  if (!secret) return { valid: false, reason: 'missing_secret' };
  if (!signatureHeader) return { valid: false, reason: 'missing_signature_header' };

  // 1. Parse t=<unix> and v1=<hex>
  const match = signatureHeader.match(/t=(\d+),v1=([a-f0-9]+)/i);
  if (!match) return { valid: false, reason: 'invalid_signature_format' };

  const timestamp = parseInt(match[1], 10);
  const signatureHex = match[2].toLowerCase();

  // 2. Enforce 300s anti-replay window
  const now = Math.floor(Date.now() / 1000);
  if (Math.abs(now - timestamp) > toleranceSec) {
    return { valid: false, reason: 'timestamp_out_of_window' };
  }

  // 3. Compute HMAC-SHA256 over `${timestamp}.${rawBody}`
  const hmac = crypto.createHmac('sha256', secret);
  hmac.update(`${timestamp}.${rawBody}`, 'utf8');
  const expectedHex = hmac.digest('hex');

  // 4. Constant-time comparison to prevent timing attacks
  const expectedBuf = Buffer.from(expectedHex, 'utf8');
  const actualBuf = Buffer.from(signatureHex, 'utf8');

  if (expectedBuf.length !== actualBuf.length || !crypto.timingSafeEqual(expectedBuf, actualBuf)) {
    return { valid: false, reason: 'signature_mismatch' };
  }

  return { valid: true };
}
Python Verification
import hmac
import hashlib
import time
import re

def verify_pingpup_webhook(secret: str, raw_body: str, signature_header: str, tolerance_sec: int = 300) -> bool:
    """
    Verify incoming PingPup webhook signature in Python.
    Header format: X-PingPup-Signature: t=<unix_seconds>,v1=<hex_hmac_sha256>
    """
    if not secret or not signature_header:
        return False

    # 1. Parse timestamp and signature
    match = re.search(r't=(\d+),v1=([a-f0-9]+)', signature_header, re.IGNORECASE)
    if not match:
        return False

    timestamp = int(match.group(1))
    actual_sig = match.group(2).lower()

    # 2. Check 300-second anti-replay window
    now = int(time.time())
    if abs(now - timestamp) > tolerance_sec:
        return False

    # 3. Compute HMAC-SHA256 over f"{timestamp}.{raw_body}"
    payload_to_sign = f"{timestamp}.{raw_body}".encode('utf-8')
    expected_sig = hmac.new(
        secret.encode('utf-8'),
        payload_to_sign,
        hashlib.sha256
    ).hexdigest().lower()

    # 4. Constant-time comparison
    return hmac.compare_digest(expected_sig, actual_sig)
Delivery Guarantees

5. Notification Channels & Retry Schedule

PingPup supports dispatch across Email (Resend), Slack, Discord, Telegram, custom HTTPS webhooks, and PagerDuty. Webhooks and external notification endpoints follow an automatic 3-step exponential retry schedule:

Attempt 1
10 Seconds
Immediate retry on network blip
Attempt 2
60 Seconds
Secondary retry window
Attempt 3
5 Minutes
Final backoff attempt

After 3 unsuccessful delivery attempts, the delivery is marked as “Delivery failed” in the alert history ledger with full diagnostic error details.