Definition

What is latency?

Quick definition

The time delay between initiating a request and receiving a response. In systems, APIs, and networks, latency measures how long operations take to complete.

Latency is a critical performance metric that quantifies the delay experienced when data travels through a system, network, or API. It represents the time elapsed from when a request is sent until the response arrives at its destination. In distributed systems, cloud infrastructure, and AI agent workflows, latency directly impacts user experience and system efficiency. Lower latency means faster interactions and more responsive applications.

For developers building AI agents and MCP (Model Context Protocol) systems, latency matters significantly. When an agent calls a tool or when an MCP client communicates with an MCP server, network latency, processing time, and serialization/deserialization delays accumulate. High latency can make streaming responses choppy, delay agent decision-making, and create poor user experiences. Optimizing latency involves reducing network hops, caching results, using efficient protocols like Server-Sent Events (SSE), and minimizing context serialization overhead.

In Kanban workflows and task management systems, latency affects how quickly status updates propagate, how fast UI responses occur when moving cards between columns, and overall system responsiveness. For real-time collaboration tools, even milliseconds of latency impact perceived performance. Monitoring latency helps teams identify bottlenecks in their infrastructure and optimize their deployment architecture.

Example

How it shows up in practice

An MCP client sends a tool-call request at 10:00:00.000. The MCP server receives it, processes the request, and sends a response back. The response arrives at 10:00:00.250. The latency is 250 milliseconds. For optimal user experience in agentic workflows, aim for sub-100ms latency.

Frequently asked questions

How does latency differ from throughput?

Latency measures delay for a single operation, while throughput measures how many operations complete per unit time. You can have low latency with low throughput, or high throughput with high latency. Both matter for system performance.

What causes latency in MCP systems?

Sources include network transmission time, server processing time, database queries, serialization/deserialization, and context window operations. Identify bottlenecks using monitoring tools and optimize the slowest component.

How can AI agents minimize latency?

Use streaming responses, parallel tool calls, local caching, connection pooling, and efficient JSON-RPC implementations. Reduce context-window size and avoid unnecessary agent hops in orchestration.

Is sub-100ms latency necessary for all applications?

No. UI interactions need low latency for responsiveness. Background jobs can tolerate higher latency. Define SLAs based on user expectations and use-case requirements.

Related terms

Want to turn this concept into a board?

Browse templates that use this vocabulary in real workflows.