Scrivio Interview library
ScenarioIntermediate6 min read · updated 13 November 2026

Product wants to promise 99.95 percent availability for checkout. Checkout calls six internal services synchronously, each running at about 99.9 percent, plus an external payment provider with a 99.9 percent SLA.

Can the promise be kept with this design, and what would you change to make it achievable?

Not with this design. When serial dependencies fail independently, their availabilities multiply: six services at 99.9 percent plus a 99.9 percent payment provider gives 0.999^7, about 99.3 percent, or roughly 5 hours of failed checkout a month against about 22 minutes allowed. We make 99.95 percent reachable by taking notifications, loyalty and analytics off the critical path, adding a second payment provider with careful failover, and raising the remaining services towards 99.99 percent, while remembering that correlated failures make the formula optimistic, so we measure checkout availability end to end.

Why this question is asked

Availability targets are often set per service, and everyone is surprised when the user-facing flow is much less available than any single service. The reason is simple arithmetic: a flow that needs seven things to work fails when any of them fails. Interviewers ask this to see whether we can do that arithmetic, and whether we know the design moves that change it. In this answer, we will compute the availability of the current checkout, then take services off the critical path, add redundancy for payment, raise the availability of what must remain, and finally check the independence assumption behind all of the arithmetic.

1Why Serial Dependencies Multiply

Checkout calls six internal services synchronously and then the payment provider. If any one of them fails, the checkout fails. When failures are independent, the probability that all seven work is the product of their individual availabilities.

Java
one service = 0.999
seven in series = 0.999^7 = 0.99302 -> about 99.3 percent
failure share = 1 - 0.99302 = 0.70 percent
per 30-day month = 0.0070 x 43,200 min = about 302 min (5 hours)
target 99.95 percent = 0.0005 x 43,200 min = about 22 min
Step throughCheckout today: every call must succeed
  1. Cart service99.9 percent
  2. Pricing service99.9 percent
  3. Inventory service99.9 percent
  4. Order service99.9 percent
  5. Loyalty service99.9 percent
  6. Notification service99.9 percent
  7. Payment provider99.9 percent SLA

7 steps in order. Play them, or step through them one at a time.

In series, availabilities multiply: 0.999^7 is about 99.3 percent.

So the current design delivers roughly 5 hours of failed checkout a month, against a promise of 22 minutes. It is not a matter of tuning; the structure cannot reach the target. Even if every service were improved to 99.99 percent, seven in series would give about 99.93 percent, still short.

2Take Services Off the Critical Path

The cheapest improvement is to stop requiring services that are not needed to accept the order. To accept an order, we need the cart contents, a price, a stock reservation, a durable order record and a successful payment. We do not need to award loyalty points, send a confirmation email or update analytics before telling the customer the order is placed.

So those become asynchronous. The order service writes the order and an event in the same database transaction, using the outbox pattern, and a relay publishes the event to Kafka. Loyalty, notifications and analytics consume it whenever they are healthy. If the notification service is down for an hour, emails arrive an hour late, but no checkout fails. Some calls can also become optional with a fallback: if the pricing service is briefly unavailable, we might use a cached price that is less than a minute old, if the business accepts that.

3Add Redundancy Where a Dependency Is Unavoidable

Payment cannot be made asynchronous; the customer needs to know whether they paid. But we can avoid depending on a single provider. With two independent providers and automatic failover, the payment step fails only when both fail at the same time. With independent 99.9 percent providers, that is 1 - (0.001 x 0.001) = 99.9999 percent in theory.

Failover needs care. We switch to the second provider only when the first fails clearly, such as a connection error or a 5xx before the charge was accepted, and we use idempotency keys with each provider so retries never charge twice. Where the outcome is unknown, for example a timeout after sending the request, we must not simply retry with the other provider, which leads to the follow-up question below.

Availability of the checkout path
DesignCritical pathAvailability (independent)
Today6 services + 1 providerabout 99.3 percent
Async loyalty, notifications, analytics4 services + 1 providerabout 99.5 percent
Plus two payment providers4 services + payment pairabout 99.6 percent
Plus 4 services raised to 99.994 services at 99.99 + pairabout 99.96 percent

4Raise the Availability of What Stays Critical

The table shows that removing dependencies and doubling the provider still leaves us short while the four remaining services sit at 99.9 percent. So those four must become more available. The usual moves are running each service across three availability zones with enough capacity to lose one, safe deploys (canaries, automatic rollback on error-rate increase, deploying one zone at a time), strict timeouts so a slow dependency fails fast instead of holding threads, and retries with backoff for idempotent calls, which turn brief failures into successes. A brief network blip that would fail one call in 10,000 becomes invisible with a single retry.

Raising four services to about 99.99 percent each gives 0.9999^4 times 0.999999, about 99.96 percent for the path, just above the target. That is achievable but not trivial, and it tells product what the promise costs.

5Be Careful With the Independence Assumption

All of this arithmetic assumes failures are independent. In practice they are often correlated. Services that share a database fail together when it fails. Services deployed by the same pipeline can all receive a bad configuration at once. A network partition or a regional outage takes down everything in that region. Two payment providers that both run on the same cloud region may fail together.

Correlation makes the real gain from redundancy smaller than the formula suggests, and the real loss from serial dependencies sometimes smaller too, because correlated failures overlap. So we treat the arithmetic as a guide, look explicitly for shared causes, and measure end-to-end checkout availability, from the user's request to the confirmed order, rather than adding up per-service numbers. That end-to-end measure is the one the promise is about.

6Follow-up questions

How would you handle an order whose payment status is unknown after a failover?

We never charge with the second provider while the first charge might have succeeded. The order is stored as payment pending with the idempotency key used. We then ask the first provider for the status of that key, retrying the status query, and also listen for its webhooks. If it confirms success, the order proceeds; if it confirms failure, we can charge through the second provider. If it stays unknown, we tell the customer the payment is being confirmed rather than asking them to pay again, and a reconciliation job matches provider records against pending orders, refunding any duplicate.

Is 99.95 percent the right promise for checkout at all?

It is a business choice. Each nine costs engineering effort and money, so product should see the price of 99.95 against, say, 99.9, and the revenue lost per minute of failed checkout.

Should retries happen in every layer?

No. Retries in several layers multiply: three layers that each retry three times can send 27 requests. Retry in one layer, usually the one closest to the caller that knows the call is idempotent, with a retry budget.

7Conclusion

In this answer, we computed that seven serial dependencies at 99.9 percent give about 99.3 percent, roughly 5 hours of failed checkout a month, so the promise cannot be kept as designed. We took loyalty, notifications and analytics off the critical path with an outbox and Kafka, added a second payment provider with careful failover, raised the remaining services towards 99.99 percent with multiple zones, safe deploys, timeouts and retries, and noted that correlated failures make the formula optimistic, so end-to-end checkout availability is the number to measure.

What to say in the interviewAbout 90 seconds aloud

Open with

No, not as designed. If checkout needs all seven dependencies and their failures are independent, the availabilities multiply: 0.999 to the seventh is about 99.3 percent, which is roughly five hours of failed checkout a month, against about twenty-two minutes for 99.95.

Then, if they want more

To make it achievable, first I would take off the critical path everything not needed to accept the order. Loyalty, notifications and analytics can consume an order-placed event published through an outbox, so if they are down, emails are late but checkout works.

Second, for payment, which cannot be asynchronous, I would add a second independent provider with failover, so payment fails only when both fail, in theory around six nines, with idempotency keys so we never charge twice.

Third, the remaining services, say cart, pricing, inventory and orders, need to get closer to 99.99 each, through multiple zones, safe canary deploys with automatic rollback, tight timeouts, and retries with backoff on idempotent calls. That gets the path to around 99.96.

And I would be careful with the independence assumption, because shared databases, deploy pipelines and regions make failures correlated, so I would measure end-to-end checkout availability rather than trust the multiplication. If a failover leaves payment status unknown, the order stays pending and we reconcile with the first provider before charging again.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Can the promise be kept with this design, and what would you change to make it achievable?": https://scrivio-interview-library.netlify.app/architecture/sd-fundamentals/55812acc91/