High Throughput Real-time Alerting System using Apache Kafka, MySQL, and Redis

An overview of how I made a scalable alert messaging service for sending consistent sub-minute email and SMS notifications for outlier sensor data.

Tom Wade

7/17/20241 min read

One of the primary challenges faced by real-time monitoring systems is ensuring that alerts are generated and delivered with minimal delay. In this project, I built a high-throughput alerting system capable of processing millions of data points per day using Apache Kafka as the messaging backbone. Kafka’s ability to handle large streams of data in real-time makes it ideal for applications where immediate action is required based on incoming data, such as in structural health monitoring or environmental hazard detection.

MySQL was used as the central storage system for key event data, which is then queried for generating alerts. However, to improve the system’s responsiveness, Redis was implemented as a caching layer, allowing for faster data access. By combining Kafka, MySQL, and Redis, I was able to reduce alerting times to under a minute, a crucial improvement for real-time systems where quick response times can make a significant difference in safety and maintenance decisions.

The real-time alerting system sends out notifications via email and SMS, ensuring that key personnel are immediately informed of potential issues. This project not only improved the speed and reliability of alerts but also allowed for scalability, making it capable of handling larger datasets as the monitoring system expands. This solution is crucial for industries such as structural health monitoring, where immediate notifications are vital for preventing costly or even dangerous failures.