educative.io

Detailed Design of a Monitoring System - Grokking Modern System Design

When Service discoverer is getting which service to monitor from data collector, why not use data collector for this information ? Why do we need a separate entity like service discoverer just to understand which services we are monitoring ?


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Detailed Design of a Monitoring System

Hi Rahul.

We are glad that you reached out to us. The Service Discoverer facilitates the monitoring system by identifying and tracking the necessary services. While the Data Collector is responsible for obtaining metrics from monitored services, it doesn’t need to actively maintain a service list. Instead, it relies on the Service Discoverer to dynamically locate and maintain an updated list of services.

Here are a few reasons why a separate entity like Service Discoverer is beneficial:

  • Dynamic Discovery: The Service Discoverer allows the monitoring system to dynamically discover services as they come online or go offline. This dynamic discovery is particularly useful in environments where services are frequently added or removed, such as in cloud-based or containerized infrastructures.

  • Decoupling of Concerns: Separating the service discovery functionality from the Data Collector helps maintain a modular and loosely coupled system. The Data Collector can focus on its primary responsibility of collecting metrics without having to manage the complexity of service discovery logic.

  • Scalability: In large-scale systems with numerous services distributed across multiple nodes, a dedicated Service Discoverer helps efficiently manage the growing number of services. It becomes a centralized point for maintaining service information, making it easier to scale the monitoring system.
    In summary, the Service Discoverer is a specialized component that excels in managing and discovering services, allowing the Data Collector to focus on its core task of collecting metrics. This separation of concerns enhances the monitoring system’s flexibility, scalability, and maintainability.

I hope that clears up your concern. If you have any further queries, feel free to reach out to us.

Thank you.