liveBook · Manning

Network tax

As explained in Grokking Software Architecture

The network tax is the added latency, failure exposure, security burden, consistency difficulty, and observability cost caused by communication across distributed boundaries.

The network tax is the extra performance, reliability, and operational overhead of replacing local, in-memory calls with remote network communication. A call that once used local RAM now serializes a payload, crosses the network, and waits for a response. section 12.6

Splitting a monolith into microservices brings costs that local calls avoid:

  • Latency: network calls take longer than local calls. section 12.6.2
  • Reliability and consistency: calls can drop or fail mid-transaction, leaving data inconsistent. section 12.11
  • Security, serialization, and observability: distributed communication adds burdens in each area. section 12.11

A microservice Monday

After Shop-Zilla splits into 15 microservices, the application slows down—and a customer is charged without inventory being deducted. The new service boundaries bring network delay and make consistency harder to maintain. section 12.6

Table 12.2 The 8 Fallacies & The Network Tax
The Fallacy (The Myth)
The Architectural Reality (The Tax)
The Technical Solution
1. The network is reliable.
The Reliability & Consistency Tax: Network calls will randomly drop, and servers will crash mid-transaction, leaving corrupted data.
Timeouts, Circuit Breakers, Exponential Backoff, and the Saga Pattern.
2. Latency is zero.
The Latency Tax: A blazing-fast 5ms local database query turns into a slow 150ms HTTP network chain.
Asynchronous workflows, Event-Driven Architecture, and aggressive Caching.
3. Bandwidth is infinite.
The Serialization Tax: Sending massive "God Objects" across the wire hogs memory and chokes the network pipeline.
Pagination, GraphQL (fetching only what you need), and efficient binary serialization (like gRPC/Protobuf).
4. The network is secure.
The Security Tax: Internal microservice traffic traveling across cloud infrastructure can be easily intercepted by bad actors.
Zero Trust Architecture, Mutual TLS (mTLS), and Service Meshes.
5. Topology doesn't change.
The Discovery Tax: Server IP addresses change constantly as auto-scalers spin up and then spin down cloud containers.
API Gateways, dynamic Service Discovery (e.g., Consul), and Load Balancers.
6. There is one administrator.
The Versioning Tax: Autonomous teams deploy updates at different times, accidentally breaking API contracts.
Strict API Versioning strategies and Consumer-Driven Contract Testing.
7. Transport cost is zero.
The Financial Tax: Cloud providers charge real money for network egress (data leaving the server) and CPU cycles spent parsing JSON.
Payload compression, Local L1 caching, and minimizing unnecessary cross-region network calls.
8. The network is homogeneous.
The Interoperability Tax: Different services will inevitably be written in different languages and run on different hardware.
Standardized communication protocols (REST/JSON) and language-agnostic Message Brokers.

Use the table to connect distributed-computing assumptions with the taxes they incur and the listed technical responses. section 12.6.2

Treat each new service boundary as a cost to justify, not a free performance upgrade. Distributed systems can manage these costs with patterns such as Sagas and Transactional Outboxes for consistency, and Circuit Breakers and Exponential Backoff for failures and retries. section 12.10 section 12.11

How Grokking Software Architecture covers it

How deep it goes
Defines the added overhead, contrasts local and remote calls, and names key costs without developing their underlying physics or mathematics.
Examples
Uses Shop-Zilla’s inconsistent order outcome and contrasts a local call with a network request.
What you can do after
Evaluate proposed service boundaries by listing their communication costs and checking whether the team is prepared to address them.
How it connects
Connects distributed computing with microservices, Sagas, Transactional Outboxes, Circuit Breakers, and Exponential Backoff.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.