Solution Architecture28 December 20266 min read

Architecture That Survives Reality — Part 6 of 8

Failure is part of the architecture

Most architecture diagrams show the path where everything works. Part 6 of Architecture That Survives Reality designs the other paths: pending, retry, idempotency, rollback, timeout and escalation, each with an explicit contract. It adds the state teams most often forget, outcome unknown, and gives a Failure-State Blueprint to complete for every step that changes something.

#Solution Architecture#Production Readiness#Resilience#Platform Engineering#Service Design

Consider an illustrative inspection service. Inspectors visit sites, many with poor or no mobile coverage, and record findings and photographs on a tablet. The app syncs when a connection returns, and the findings feed a permit system that decides whether work may continue. The design review shows a clean arrow from tablet to permit system, labelled "sync".

In operation, the arrow hides at least six different situations. The record is on the device and has not been sent. It was sent, and the connection dropped before any reply. The server received it but the permit system was unavailable. The permit system rejected it because a required field was missing. Two inspectors edited the same site record offline. The record was accepted, and the inspector's screen still says "pending". Each one needs a different response, and each one, unhandled, becomes a phone call, a duplicate or a permit decision made on incomplete information.

Failure states are part of the design, not exceptions to it, so every step that changes something needs an explicit contract for pending, timeout, retry, idempotency, rollback and escalation, and the record must say honestly which state it is in.

The happy path is the smallest part

A step that calls another system can end in more ways than success or failure.

  • Succeeded. The change happened and the caller knows it.
  • Failed, safe to retry. The change did not happen, and trying again may work: the service was briefly unavailable.
  • Failed, do not retry. The change did not happen, and trying again will not help: invalid input, not permitted.
  • Pending. The request was accepted, and the change will finish later. CloudNala's The API call succeeded. The cloud change did not. shows why "accepted" is not "done".
  • Outcome unknown. The caller timed out or lost the connection, and does not know whether the change happened.

The last state is the one designs most often leave out, and it is the most dangerous. Treat it as failure and retry, and the change may happen twice. Treat it as success and move on, and it may not have happened at all. The only safe responses are to make the retry harmless, or to ask the receiving system what actually happened before doing anything else.

The Failure-State Blueprint

The failure-state sequence for one step that changes something. A request is sent with an idempotency key generated when the record was captured. It can end in five ways: succeeded; pending, meaning accepted but not finished; failed and safe to retry; failed and not to be retried; or outcome unknown, after a timeout or a lost connection. Pending and unknown both go to reconciliation, which asks the system of record what actually happened. Retries are made by one owner and carry the same idempotency key, so a repeat is harmless. Failed requests that should not be retried go to correction. Any record that stays pending or unknown beyond its time limit escalates to a named role. Beneath, the honest record states shown to the user in an illustrative offline inspection app: saved on device, sending, received, accepted, needs correction and check needed.STEP THAT CHANGES SOMETHINGSend with idempotency keySucceededPending(accepted, not done)Failed:do not retryFailed:safe to retryOutcomeunknownCORRECTReason shownto the userRETRY, ONE OWNERSame key: repeatis harmlessRECONCILEAsk the systemof record firstpending too longPending or unknown past its time limit: escalate to a named role, within a stated timeHONEST RECORD STATES SHOWN TO THE USERSaved on deviceSendingReceivedAcceptedNeeds correctionCheck neededOne “synced” tick moves the uncertainty from the system to the people who rely on it.
Design every ending, not only the first one. The unknown outcome is the state most often left out, and the one that creates duplicates and missing records. CloudNala analysis.

The decision tool for this part is a blueprint with one row per step that changes something: writes a record, sends money, submits a decision, sends a message, changes a configuration. Complete it during design, before build estimates are final, because each column is work.

FieldQuestion it answers
Step and system of recordWhat changes, and which system is authoritative for whether it happened
Expected durationHow long the step normally takes, and whether it completes synchronously or later
TimeoutHow long the caller waits, and which state it records when the wait ends
Retry owner and policyExactly one component that retries, which errors it retries, how often and with what back-off
IdempotencyThe key that makes a repeated request harmless, who generates it and how long the receiver remembers it
Rollback or compensationHow to undo or offset the change if a later step fails, and who may trigger it
ReconciliationHow and how often the caller's records are compared with the system of record, and who resolves differences
EscalationWhich named role is told when a record stays pending or unknown too long, and within what time
What the person seesThe status shown to the user at each state, in plain words

Three of these deserve more attention.

Idempotency is decided by the sender, enforced by the receiver. The inspector's app should generate a unique key for each finding when it is captured, not when it is sent. Every send, including retries after an unknown outcome, carries the same key. The receiver stores the key with the result and returns the stored result for a repeat. Without this, the safe response to "outcome unknown" does not exist. Why a successful payment can still end in a failed order explains the pattern for multi-step transactions.

Retries need one owner. If the app, the sync service and the integration layer each retry three times, one failure becomes many calls against a system that is already struggling. Who owns the retry? works through this for model calls; the same rule applies to every integration.

Reconciliation is the safety net under everything else. Even with good idempotency and retries, records drift. A scheduled comparison between what the app believes and what the permit system holds, with a named person resolving differences, is what turns silent drift into a short daily list.

Honest record states

For offline-first and asynchronous designs, the state the user sees must match what is actually known. The inspection app should not show one "synced" tick. It should distinguish:

State shownMeaning
Saved on this deviceCaptured, not yet sent
SendingA send is in progress
Received by the officeThe server has it; the permit system has not confirmed
AcceptedThe permit system has recorded it
Needs correctionThe permit system rejected it, with the reason
Check neededOutcome unknown, or a conflicting edit; a named person will resolve it

Each label is a promise about where the record is. An inspector who sees "Saved on this device" knows not to leave the site assuming the office has the finding. A supervisor who sees "Check needed" knows that someone must act. A single tick that means "something happened" moves the uncertainty from the system to the people who rely on it.

Escalation is a contract with a person

Every pending and unknown state needs a time limit and a named role. "The system will retry" is not an escalation path. A useful contract reads: if a finding stays in Received or Check needed for more than four working hours, the duty supervisor is notified and contacts the inspector the same day. The time and the role are illustrative; the shape is the point. Escalation without a person and a time is a log entry that nobody reads.

What this means for South Africa

Intermittent connectivity and power interruptions are design conditions for many South African services, not edge cases. Field work in rural areas, clinics, depots and municipal service points regularly runs with patchy coverage or on backup power. A design that assumes the call will complete, or that only shows "done" and "failed", will generate duplicates and missing records precisely where support is hardest to reach. Honest record states, idempotent sends and daily reconciliation cost little to design and a great deal to retrofit.

Next in the series: A label is not a control. Previous: Part 5, Architecture promises expire. All parts are on the series page.

Sources and limits: this part is CloudNala analysis of widely used integration patterns. The inspection scenario, its states and its escalation times are composite and illustrative. The Failure-State Blueprint is an original CloudNala framework. Prepared on 24 November 2026.

How CloudNala can help

CloudNala designs failure states before build. We list every step in your design that changes something, complete the Failure-State Blueprint with your system owners, specify idempotency keys, a single retry owner, compensation and reconciliation, and design the record states and escalation contracts your users and supervisors will rely on when a call does not complete.


Work with CloudNala

CloudNala helps organisations move from technology ambition to practical execution across cloud, AI, data, platform engineering and digital services.

Whether you are exploring AI, modernising your cloud environment, building a public-sector digital service, or turning an idea into a working MVP, we can help you shape the roadmap and deliver the next step.

Book an Architecture Reality Review or write to us at consult@cloudnala.co.za

Found this useful?

Share