What is the difference between an instant query and a range query?

BeginnerConceptPromQL & Recording Rules
Answer
  • Instant query (/api/v1/query): evaluates the expression at one timestamp. Used by alert rules, recording rules and Grafana stat panels.
  • Range query (/api/v1/query_range): evaluates the same expression at every step between start and end. Used by graphs.

Range queries are many instant evaluations, so a dashboard with a 30-day range at a 15s step is expensive. Grafana's $__rate_interval and step settings control this.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on PromQL & Recording Rules