Follow-up · depth 2
What metrics prove Aggregation Pipeline is healthy in prod?
What metrics prove Aggregation Pipeline is healthy in prod?
Answers use simple, clear English.
Quick interview answer
Prove Aggregation Pipeline is healthy with latency (p50/p95/p99), error/saturation rates, and queue/event-loop lag — not just CPU. Context: Use Aggregation Pipeline as the core idea. Example shape: Monthly revenue by category: $match date range, $unwind items, $group by category sum price..
Detailed answer
Production health signals for Aggregation Pipeline: • Latency: p50/p95/p99 of the critical path that uses Aggregation Pipeline. • Errors: failure rate, timeouts, and retry storms. • Saturation: queue depth, event-loop delay, thread/pool utilization. • Business SLIs: request success and user-visible freshness where relevant. Trade-off lens: Pros: Powerful analytics in database; reduces app-side processing. Cons: $lookup expensive on large collections without indexes; memory limits on sort/group. Explain thresholds + alerts, then how you triage. Parent context: Use Aggregation Pipeline as the core idea. Example shape: Monthly revenue by category: $match date range, $unwind items, $group by category sum price..
Full explanation
Good answers name measurable signals and what “bad” looks like for Aggregation Pipeline. Stages: $match → $group → $sort → $lookup (join) → $project. Pipeline runs server-side; push filters early in $match for index use.
Follow-up questions
Only answered follow-ups are shown — click to open with full answers
Parent context — Aggregation Pipeline
Use Aggregation Pipeline as the core idea. Example shape: Monthly revenue by category: $match date range, $unwind items, $group by category sum price..
View full parent question →