PharosPulse: Serverless Uptime Monitoring

PharosPulse: Serverless Uptime Monitoring

A high-performance, serverless uptime monitoring system deployed on Cloudflare Workers, featuring real-time Telegram alerts.

2 min read
Published April 2, 2026
JavaScript
Cloudflare Workers
KV Storage
Telegram API
Serverless

Migrating my home server architecture to a dedicated VPS infrastructure required a robust monitoring tool that ensures absolute reliability without consuming heavy server resources. I decided to build this monitoring system entirely from scratch to better fit my specific needs while operating completely within Cloudflare's free tier capabilities.

Project Overview

PharosPulse was born from the necessity to track the health of my VPS-hosted projects with a fully serverless approach. Traditional monitoring tools often require dedicated instances, but this project embraces edge computing to monitor services externally with ultra-low latency. It addresses several key challenges:

  • Cost-Efficiency: Engineered to stay well within Cloudflare’s free-tier limits, avoiding unnecessary cloud computing costs.
  • Historical Visibility: Maintaining long-term status data securely to demonstrate reliability over time.
  • Instant Alerting: Needing real-time notifications sent directly to my personal devices without delay when an incident occurs.
  • Independent Health Checks: Using edge workers guarantees that the monitoring system itself remains functional even if my primary VPS goes down.

Technologies

  • Edge Compute: Cloudflare Workers.
  • Data Persistence: Cloudflare KV Storage.
  • Alerting: Telegram Bot API.
  • Frontend Visualization: Custom HTML, Vanilla CSS, and JavaScript.
CloudflareJavaScriptHTML5CSSTelegram

How It Works

1. Automated Trigger

A Cloudflare Cron Trigger activates the edge worker periodically.

2. Async Probing

The worker executes concurrent HTTP probes to measure latency and verify status codes. Custom logic handles timeouts to identify hanging services.

Terminal Health Check Example This example demonstrates the core data collected by the worker. We use JavaScript within the Edge Worker to replicate this logic.

3. Optimized Persistence

Metrics are pulled from Cloudflare KV, updated, and saved in a single write. A 365-day rolling history is maintained with automated data pruning.

4. Instant Alerts

Downtime triggers immediate notifications to my personal device via the Telegram Bot API.

Telegram Alert Screenshot

5. SSR Dashboard

The UI is generated via Server-Side Rendering (SSR). Real-time KV data is injected into a lightweight HTML/CSS template for instant loading.