Skip to content

The advantages of aggregating metrics directly on the application side #145

Open

Description

@niceblex33

Good day,

I would like to discuss the advantages of aggregating metrics directly on the application side. As someone who has limited experience with metric systems, the reasons for preferring this method over using a push gateway in Prometheus are not entirely clear to me. One apparent advantage of the push gateway is the absence of a need for additional dependencies like Redis. I would appreciate any clarification on this matter.

Activity

  1. consolibyte commented on Jan 23, 2024

    @consolibyte

    There's some discussion around disadvantages of the push gateway in the Prom documentation. It's worth reading:
    https://prometheus.io/docs/practices/pushing/

    The two ones that stand out here to me are:

    1. By using a push gateway, you lose the health monitoring provided by the up metric (application-side metrics built by this lib will give you an automatic up=1|0 metric which you can use to monitor if the target/remote server is up or not; you don't get this with the push gateway)
    2. By using a push gateway, you introduce a single point of failure and potential bottleneck (your application needs to always be pushing data to a single instance of the push gateway, and if the push gateway fails or becomes overloaded, you will lose metrics)

    RE: "apparent advantage of the push gateway is the absence of a need for additional dependencies"

    Aren't you just trading one dependency, for another? You're trading a dependency on Redis, for a dependency on the PushGateway instead.

  2. niceblex33 commented on Jan 28, 2024

    @niceblex33
    Author

    Thank you for the very detailed answer. I also did some research and already changed my mind towards its better to use pull strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions