Designing graceful degradation for a paid SaaS feature.
Preserve a useful part of the paid feature while keeping correctness and authorization intact. Define allowed actions for each degraded state, expose freshness honestly, and test recovery capacity as well as failure.
Inside this article 5 sections +
Graceful degradation means preserving a useful, truthful part of a paid SaaS feature when a dependency fails. Define which results remain trustworthy, which actions must stop, and what customers can still do. A fallback that returns a misleading success is a correctness defect, even if it improves the availability chart.
For a paid reporting feature, opening a previously generated report may remain useful when the rendering service is unavailable. Producing a new report from incomplete financial data may be unacceptable. Both cases involve a failed dependency, but they need different user-visible states and recovery rules.
Define the promise that must survive
Start with the customer's reason for using the feature. In an illustrative procurement application, customers pay to prepare accurate approval packets and submit them for review. Document rendering improves presentation; permission checks and the integrity of approval decisions protect the central promise. These dependencies should not share one fallback policy.
Write the invariants first. A customer must never see another account's packet, a submitted approval must have a durable identity, and a packet must identify the data version it represents. Then define conveniences that can be temporarily reduced: previews, thumbnails, optional enrichment, and automatic notification delivery.
This separation changes the architecture. Optional enrichment can time out without blocking a saved draft. Authorization failure must block access. A delayed notification can remain queued, while a failed durable save must not be reported as an accepted submission. The design follows the consequence of missing information, not the relative importance of the vendor supplying it.
| Unavailable dependency | Permitted experience | Action that remains blocked |
|---|---|---|
| Thumbnail renderer | Open text details and download an existing valid packet | Promise a newly rendered preview |
| Optional supplier enrichment | Save a draft with the missing enrichment identified | Present absent enrichment as verified information |
| Authorization store | Explain that access cannot currently be verified | Reveal private packet content using an unchecked fallback |
| Submission database | Retain an editable local draft where appropriate | Claim that an approval was durably submitted |
Separate stale reads from new writes
A cached result can remain correct for a bounded purpose even when it is no longer current. Store its generation time, source version, account scope, and relevant permission context. The interface should say which version is available and whether a refresh is pending. “Last generated at 10:15” is more informative than a spinner that never completes.
Freshness and authorization are separate checks. A packet generated recently may no longer be accessible after a membership revocation. Do not reuse a cached permission decision indefinitely merely because the content cache has a generous lifetime. Choose whether access can be verified independently of the failed dependency; otherwise the private read must stop.
New writes require their own policy. A draft may be saved locally before durable submission, but its state should remain “not submitted.” If the backend accepts work asynchronously, return an operation identifier only after the acceptance record is durable. This makes later status lookup and recovery possible without inventing certainty during an outage.
Budget the fallback path as real capacity
A fallback can fail under the traffic redirected to it. If every cached response expires together, a dependency outage can drive the entire fleet into regeneration. Retain usable cache entries when refresh fails if the contract permits it, spread refresh timing, and limit concurrent refresh attempts.
Give optional dependencies a bounded slice of the request deadline. Their failure should leave enough time to assemble the reduced response. A circuit breaker may stop repeated calls after evidence of failure, but it needs a controlled recovery probe. Otherwise a recovered dependency can remain unused, or a fleet can reopen all requests simultaneously.
On AWS, consider the combined behavior of the application, load balancer, SDK retries, and downstream services. A local timeout does not establish that remote work stopped. Avoid launching a replacement write unless it has the same durable operation identity or a known-safe compensation rule. The tenant-aware idempotency guide explains that acceptance boundary.
Make the state machine visible to customers and operators
Use a small set of meaningful states such as current, stale-but-usable, pending, temporarily unavailable, and action-required. Tie each state to allowed actions. A pending packet can offer cancellation or status refresh; a stale packet can permit viewing while clearly distinguishing it from a new submission.
Preserve the reason for the state in structured telemetry. Operators need to distinguish a dependency timeout from a permission denial or invalid source data. The customer message can remain concise, while the operation record retains the error category, source version, and next retry time.
Measure degraded delivery separately from full delivery. A dashboard that treats every fallback response as an ordinary success can hide a paid capability that has been unavailable for hours. Define whether degraded responses satisfy the relevant service objective and track the unavailable sub-capability explicitly.
Test recovery as well as failure
Inject a rendering timeout while existing packets remain readable. Verify that new drafts still save, that no unverified packet is submitted, and that the interface identifies the reduced state. Then revoke a test user's access and confirm that the fallback does not reveal the cached packet.
Restore the renderer with a backlog of pending requests. Check concurrency limits, duplicate operation handling, and customer status updates. Recovery should not produce a burst that immediately takes the dependency down again. Test a packet whose source data changed while rendering was delayed; its eventual output must carry the correct version or be rejected as obsolete.
Keep these scenarios with the feature's acceptance tests. The dependency capacity guide helps size the recovery path. Architecture design can turn the paid feature's promise into explicit fallback states, request budgets, and a recovery plan that remains honest under failure.