How do rule groups evaluate, and what happens if evaluation is slow?
AdvancedConceptPromQL & Recording Rules
Answer
Rules within a group run sequentially in file order at the group's interval, so a later rule can use an earlier rule's output from the same evaluation. Different groups run in parallel.
If a group takes longer than its interval, iterations are skipped: watch prometheus_rule_group_iterations_missed_total and prometheus_rule_group_last_duration_seconds. Fix by splitting groups, simplifying expressions, or reducing cardinality. Prometheus 3.x can run independent rules within a group concurrently (--enable-feature=concurrent-rule-eval).
More on PromQL & Recording Rules
What are the PromQL data types?BeginnerWhat label matchers does PromQL support?BeginnerExplain `rate()`.Beginner`rate()` vs `irate()`: what is the difference?IntermediateWhat does `increase()` return and why is it sometimes a non-integer?IntermediateWhy must you `rate()` before `sum()`, never the reverse?Intermediate