Course contentsShow
← System Design
Lesson 804 of 1,91921. Microservices ArchitectureFree lesson

Network Latency and Reliability

How inter-service communication adds latency and failure points compared to in-process calls in monoliths.

Network Latency and Reliability

You'll learn: How inter-service communication in microservices introduces latency and failure points that don't exist in monolithic in-process calls.

The Core Problem

In a monolith, when one module calls another, it's a simple in-process function call—typically measured in nanoseconds, executed in the same memory space, and almost never fails. In microservices, that same interaction becomes a network call (HTTP, gRPC, message queue), which is dramatically slower and inherently unreliable.

Why Network Calls Are Different

Latency: Network round-trips add milliseconds (thousands to millions of times slower than in-process calls). If Service A calls Service B, which calls Service C, these latencies compound. What was once a single method chain now involves multiple network hops, parsing payloads, and waiting for responses.

Reliability: Networks can fail in countless ways—packets drop, services timeout, connections reset, DNS fails. In a monolith, a method call either succeeds or throws an exception immediately. Over the network, you face partial failures, retries, duplicate requests, and uncertainty about whether the remote operation completed.

The Ripple Effect

Think of in-process calls like walking between rooms in your house—instant and predictable. Network calls are like sending letters between cities—slower, and they might get lost in transit. When you chain multiple microservice calls, you're multiplying both the latency and the probability of failure at each step.

This means microservices require careful attention to timeouts, retries, circuit breakers, and fallback strategies—complexity that simply doesn't exist in monoliths.

Key Takeaway: Microservices trade the speed and reliability of in-process calls for network communication, introducing measurable latency and multiple new failure modes that require sophisticated error handling and resilience patterns.