A Spring Boot–based microservice that lets you define, schedule, and execute synthetic HTTP and ICMP tests, stream results to Kafka, persist them in PostgreSQL, and run containerized via Docker/Kubernetes. Ideal for showcasing Java, Kafka, Docker, and cloud-native skills.
- Overview
- Features
- Architecture
- Getting Started
- Usage
- Running with Docker Compose
- Testing
- Future Enhancements
- Contributing
- License
This microservice allows you to:
- Create & manage synthetic test configurations (HTTP or ICMP).
- Schedule periodic execution of these tests.
- Stream each test result to Kafka for real-time processing.
- Persist historical results in PostgreSQL for analysis.
- Expose REST APIs for configuration and (optionally) result retrieval.
- Containerize the entire stack with Docker and Kubernetes manifests.
- REST API for CRUD operations on test configurations
- Spring Scheduling to trigger tests at configurable intervals
- HTTP & ICMP measurement implementations
- Apache Kafka producer & consumer integration
- Spring Data JPA + PostgreSQL for storage
- Spring Boot Actuator for health checks & metrics
- Dockerfile and docker-compose.yml for local orchestration
- Kubernetes manifests for cloud-native deployment
flowchart TD
subgraph Client
A[User CLI / Dashboard]
end
subgraph Microservice
B[REST API]
C[TestExecutionService]
D[Kafka Producer]
E[Kafka Consumer]
F[PostgreSQL]
end
subgraph Message Bus
K[Apache Kafka]
end
A -->|Configure tests via HTTP| B
B --> C
C -->|HTTP/ICMP calls| Target[Network Targets]
C -->|produce| D
D --> K
K --> E
E --> F
A -- optional: View results via REST --> B
Planned and potential improvements for this microservice include:
-
Advanced Alerting & Notification
Integrate with email, Slack, or PagerDuty for real-time alerts on test failures or threshold breaches. -
Configurable Test Types
Support additional protocols (DNS, TCP, TLS, etc.) and custom test scripts. -
Historical Analytics Dashboard
Build a web dashboard for visualizing trends, uptime, and performance metrics over time. -
Role-Based Access Control (RBAC)
Add authentication and authorization for multi-user environments. -
Distributed Test Agents
Deploy lightweight agents in multiple regions or clouds for global network visibility. -
Self-Healing Automation
Integrate with orchestration tools to trigger automated remediation actions on failures. -
AI-Powered Anomaly Detection
Use machine learning to detect unusual latency, packet loss, or outage patterns in test results, and proactively surface incidents. -
Predictive Analytics
Leverage AI to forecast potential network degradations based on historical data and trends. -
Natural Language Interface
Allow users to configure and query tests using natural language (e.g., via a chatbot or voice assistant). -
Integration with Observability Platforms
Export metrics to Prometheus, Grafana, or OpenTelemetry for unified monitoring.
Feel free to contribute ideas or open issues for additional enhancements!