What is the difference between Prometheus's pull model and a push-based metrics system?
Prometheus pulls metrics by scraping each target's /metrics (or equivalent) HTTP endpoint on a configured interval, meaning the target just needs to expose current metric values; Prometheus controls timing and can detect a target going fully unreachable (a scrape failure is itself informative). Push-based systems (like StatsD) have applications actively send metrics to a collector, which can be simpler for ephemeral/batch jobs but doesn't give the same built-in 'is this target even alive' signal.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response