Skip to content

Provide contextual latency insights at both index and cluster level #38

@emirbelkahia

Description

@emirbelkahia

Context

In this (great) youtube video https://www.youtube.com/watch?v=UgCOLcDI9Lg we evaluate latency of Algolia based on a single-query sampling, which may be misleading due to environmental noise or outlier cases. While Algolia's Monitoring API provides latency metrics at the cluster level, clients typically do not know what cluster their index belongs to, and comparing isolated index latency to raw cluster-wide stats can create confusion.

From the field, there is a clear difference between the intention behind two questions:

  • "How fast is Algolia?"
  • "Why is my index slow?"

A client-facing tool must clearly separate these scopes to avoid misinterpretation, especially when latency metrics are used in internal reporting. Misreading one latency value can generate doubt and ultimately affect perceived platform performance.

Opportunity

MCP can enhance transparency and trust by:

  1. Measuring actual latency for a given query on a specific index.
  2. Retrieving average latency from the cluster that index belongs to.
  3. Displaying both values in context, with clear, human-readable interpretation.
  4. Suggesting next steps if index latency is significantly worse than cluster average (e.g. check query complexity, config size, data volume).

This helps customers ask the right questions, and protects Algolia’s brand from being judged unfairly on one outlier latency sample.

Proposed behavior

The MCP node should:

  • Run a controlled query against a specified index and measure actual latency.
  • Identify the cluster the index resides on.
  • Query the Monitoring API to retrieve average cluster latency over the past X minutes.
  • Compare the two and return:
    • A latency delta analysis.
    • A plain language explanation.
    • Optional next steps if discrepancies are observed.

Example prompt

Can you tell me if my production index (prod_products_fr) is performing slower than expected, and if yes, why?

Expected output

{
  "indexLatency": 120,
  "clusterAverageLatency": 78,
  "delta": "+42ms",
  "interpretation": "Your index is currently responding slower than the cluster average. This might be due to query complexity, data size, or config overhead.",
  "nextSteps": [
    "🔍 Check the number of replicas or query rules applied to this index.",
    "⚙️ Review indexing strategy and data volume.",
    "📘 Read: https://www.algolia.com/doc/guides/xyz"
  ]
}

Value

  • Improves understanding of latency sources and scopes (index vs infrastructure).
  • Helps clients ask better questions and avoid incorrect conclusions.
  • Protects Algolia from misinterpretation of single outlier latency values.

Notes

  • Latency data can shape perception at decision-maker level, accuracy and clarity matter.
  • Future versions could include trend graphs or time-series comparisons.

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