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.
- Host: GitHub
- URL: https://github.com/siimas/uptime
- Owner: Siimas
- License: apache-2.0
- Created: 2025-05-14T16:58:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-29T20:50:42.000Z (about 1 year ago)
- Last Synced: 2025-07-19T11:44:24.522Z (12 months ago)
- Topics: go, golang, kafka, monitoring-tool, postgresql, redis
- Language: Go
- Homepage:
- Size: 240 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.**