An open API service indexing awesome lists of open source software.

https://github.com/siimas/uptime

Distributed website uptime monitoring service built with Go, Kafka, Redis, and PostgreSQL. Event-driven, scalable, and optimized for performance.
https://github.com/siimas/uptime

go golang kafka monitoring-tool postgresql redis

Last synced: 1 day ago
JSON representation

Distributed website uptime monitoring service built with Go, Kafka, Redis, and PostgreSQL. Event-driven, scalable, and optimized for performance.

Awesome Lists containing this project

README

          

# ๐Ÿ–ฅ๏ธ Uptime - Distributed Website Monitoring Service

**Uptime** is a modular, event-driven website uptime monitoring service. It leverages Go's concurrency, Kafka for pub/sub event flow, Redis for fast cache access, and PostgreSQL for durable persistence. It is optimized for scale, performance, and modularity.

---

## ๐Ÿš€ Features

- ๐Ÿ•’ **Scheduled Monitoring** โ€“ Periodic HTTP pings to user-defined URLs.
- ๐Ÿ“ฌ **Event-Driven Architecture** โ€“ Kafka is used for distributing monitor results and scheduling tasks.
- ๐Ÿงต **Worker Pool** โ€“ Efficient concurrent message processing to handle thousands of events per minute.
- ๐Ÿง  **PostgreSQL Logging** โ€“ Durable persistence of monitor status over time.
- โšก **Redis Caching** โ€“ Real-time monitor status updates for quick reads.
- ๐ŸŒ **REST API** โ€“ Expose endpoints for CRUD operations on monitors.
- ๐Ÿ” **Environment-based Config** โ€“ Easy switching between local and cloud environments.

---

## ๐Ÿ› ๏ธ Tech Stack

- **Language**: Go 1.24.3+
- **Message Queue**: Kafka (Confluent v2 client)
- **Database**: PostgreSQL
- **Cache**: Redis
- **API**: Standard Go `net/http`
- **Others**: Docker (for deployment), systemd/graceful shutdown support

---

## ๐Ÿ“ Project Structure

```bash
.
โ”œโ”€โ”€ cmd/ # Application entry point
โ”œโ”€โ”€ internal/
โ”‚ โ”œโ”€โ”€ cache/ # Redis client and utilities
โ”‚ โ”œโ”€โ”€ config/ # Environment variable loading
โ”‚ โ”œโ”€โ”€ constants/ # Shared constant values
โ”‚ โ”œโ”€โ”€ events/ # Kafka consumer/producer wrapper
โ”‚ โ”œโ”€โ”€ http/ # HTTP server and handlers
โ”‚ โ”œโ”€โ”€ logger/ # Kafka consumer for log processing (with worker pool)
โ”‚ โ”œโ”€โ”€ models/ # Data models
โ”‚ โ”œโ”€โ”€ postgres/ # Postgres logic
โ”‚ โ”œโ”€โ”€ scheduler/ # Monitor scheduling engine
โ”‚ โ””โ”€โ”€ worker/ # Monitor runner and async job handler
โ”œโ”€โ”€ .env.example # Environment config template
โ”œโ”€โ”€ go.mod / go.sum # Go dependencies
โ””โ”€โ”€ README.md # Project documentation
```
---

**Built with โค๏ธ by Siimas.**