liveBook · Manning

Availability

As explained in Grokking Software Architecture

The duration or proportion of time a system remains operational.

Availability means a system keeps responding to requests. In a distributed system, a network partition may force a choice: keep serving possibly stale data, or wait for consistency and risk leaving users stuck. section 2.9

The last ticket

If New York cannot reach London, a ticket site can refuse a sale until it confirms the ticket is available—or sell it and risk selling the same ticket twice. The first choice favors consistency; the second favors availability. section 2.9

The right choice depends on the cost of delay versus stale data. A bank transfer should favor a correct balance; a social feed can favor fast responses, even if a new connection takes a few seconds to appear. Friendster’s slow pages illustrate the business cost of prioritizing perfect consistency over availability. section 2.9.1 section 1.7.3

Availability can also suffer when services depend on one another. If an order waits synchronously for inventory, payment, and shipping, a shipping outage can block the order. Queueing noncritical work, such as printing a label, breaks that fragile chain. section 6.8.4

Figure 6.14 Avoiding the Distributed Monolith: Breaking a fragile synchronous chain with an asynchronous queue ensures critical tasks succeed even if non-critical services fail.

See how an asynchronous queue breaks a fragile chain of service dependencies. section 6.8.4

How Grokking Software Architecture covers it

How deep it goes
Defines responsiveness and traces partition and API-chain consequences through practical scenarios.
Examples
Uses ticket sales, bank transfers, social feeds, Friendster, and chained order APIs to show availability tradeoffs.
What you can do after
Evaluate availability-versus-consistency choices by asking whether stale data is acceptable for a given user need.
How it connects
Connects availability to consistency, the CAP theorem, network partitions, synchronous APIs, and asynchronous queues.

Also explained in

Compare how 25 books explain availability →

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.