System Design Atlas
LOCAL GUEST MODERead and practice without an account.

Your saved topics and reading progress stay in this browser. Sign in to sync supported profile and progress data.

Profile Service Dependency Outage

A stale-cache fallback starts hammering the database when the profile service is down.

○ EasyDrill 021 min1 prerequisite
My progress
Topic tools

Layout updated

Explore the design, then rehearse the decisions without looking.

Prompt

A stale-cache fallback starts hammering the database when the profile service is down.

A circuit breaker stops a queue of callers from following a failing dependency over the cliff. The fallback must also have limits.

Constraints

  • Limit waiting time, retries and calls to the failed service.
  • Never use old data for checks that require current permission.

Think first

Take five minutes to state the failure, the evidence you need and your first safe move.

5:00

Staged reveal

First move

The profile service owns current data; cached values are limited fallbacks.

What to check

Watch fallback , queue age, open circuits and caller concurrency.

Recovery

Cap fallback work, use approved stale data and shed excess requests; make recovery probes sparse and jittered so the dependency can recover.

What you give up

Some reads can stay available using old non-sensitive fields. Current permissions and consent cannot silently become stale for convenience.

Architecture and technical reference

High-level design

Profile Service Dependency Outage
G api->cb 1. Pass validated input cb->dep 2. healthy cb->cache 3. open / fallback cb->queue 4. async-only api Gateway / Caller edge cb Circuit Breaker compute dep Profile Service compute cache Redis / Last-Known Cache state · memory queue → Bounded In-process Queue messaging
  • Edge
  • Compute
  • State
  • Messaging

━━ Synchronous┄┄ Asynchronous···· Recovery / control▧ Fault

Select a component or follow a numbered connection.

Each arrow is one interaction. Request, background and recovery branches are not one linear transaction.

Read the 4 flow steps

Problem statement

Profile lookups start timing out and caller retries amplify the outage. Which user operations can continue?

Functional requirements

  • Fetch a user's profile.
  • Use approved cached fields during a profile-service outage.
  • Reject work that cannot finish safely in time.

Non-functional requirements

  • Limit waiting time, retries and calls to the failed service.
  • Never use old data for checks that require current permission.

Entities

Entity / logical owner
Authoritative state

API design

Operation / inputResponse and retry contract
Decision contractIdentify acceptance, retry identity, version/ and the response on uncertainty.

High-level design component walkthrough

Gateway / routing

Gateway / Caller

Needs profile

Why, tradeoff and connected operations

Centralize admission and routing while keeping business-state ownership downstream.

Tradeoff: Synchronous dependency adds latency

Connected operations: Pass validated input

Backend service

Circuit Breaker

Open on sustained errors

Why, tradeoff and connected operations

Isolate this operation so it can scale and fail independently from storage.

Tradeoff: Premature opening may block recovery

Connected operations: Pass validated input; healthy; open / fallback; async-only

External dependency

Profile Service

Primary dependency

Why, tradeoff and connected operations

Treat another system as a separate failure and retry domain with a documented contract.

Tradeoff: Failure cascades under retry storm

Connected operations: healthy

Cache / in-memory index

Redis / Last-Known Cache

Stale bounded fallback

Why, tradeoff and connected operations

Redis for shared ephemeral cache/index state; process-local caches remain local. Cache state is not the durable business authority. Keep frequently accessed derived state near the request path; rebuild it from its declared authority.

Tradeoff: Staleness vs availability

Connected operations: open / fallback

Queue / event stream

Bounded In-process Queue

Buffer async-safe operations

Why, tradeoff and connected operations

A bounded in-memory bulkhead, not Kafka/RabbitMQ/SQS. Reject overflow; do not imply durability for synchronous fallback. Buffer independent producers and consumers, with bounded and replay semantics.

Tradeoff: Buffer must be bounded

Connected operations: async-only

Engineering control room

Deep dives — decisions, failures and recovery

Open a deep dive to follow the steps, try an example and see how recovery works.

Deep dive 1

Choose which old profile fields are safe to use

The profile service owns current data; cached values are limited fallbacks.

Read the explanation and worked example
How it works

The profile service owns current profile facts. A last-known cache copy can satisfy only the fields and age allowed by policy; it cannot silently stand in for current authorization or a recently revoked privilege. Keep the fallback's owner and limits explicit.

Walk through an example

A customer display name can sometimes be stale during an outage, while an account-block flag may require a current authority check. Treating both as equivalent cache reads can introduce a security bug.

Failure and recovery

Mark stale responses where useful and reject requests whose required freshness cannot be met. Recovery should refresh copies without letting old fallback data overwrite newer source versions.

Why this helps

A stale display name and a stale account-block flag have different consequences.

What you give up

Some reads can stay available using old non-sensitive fields. Current permissions and consent cannot silently become stale for convenience.

Deep dive 2

Limit retries and recover gradually

Use deadlines, concurrency limits, a circuit breaker and approved fallback data.

Read the explanation and worked example
How it works

Give the dependency call a deadline shorter than the caller's overall deadline, cap concurrent calls and trip a circuit breaker after sustained failure. Allow only a small number of probes while open. Queue work only when it is actually safe to complete asynchronously.

Walk through an example

Every incoming request retries three times against a slow profile service. Without concurrency limits, retries multiply outstanding work until the caller itself becomes unavailable.

Failure and recovery

Apply jittered retry budgets, bounded fallback and load shedding. Reopen gradually after successful probes, and test that the fallback database or cache does not become the next unprotected dependency.

Why this helps

Unlimited waiting and retries can make a dependency failure take down its callers too.

What you give up

When service returns, allow a few probes before restoring full traffic. Releasing every queued request at once can cause another outage.

Deep dive 3

What happens if a region fails?

Check that the surviving region can handle both calls and fallback reads.

Read the explanation and worked example
How it works

A healthy failover region must have spare dependency and fallback capacity before receiving displaced calls. Keep security-sensitive freshness checks explicit when the profile authority is unreachable across the network.

Walk through an example

Traffic failover doubles calls and simultaneously makes every profile cache cold.

Failure and recovery

Limit admitted concurrency, approved fallback reads and use a slow recovery ramp. Return explicit failures for fields that require a current authority.

Why this helps

Routing away from one outage can create a second one unless capacity and fallback state are included.

What you give up

Extra warm capacity costs money; aggressive failover is cheaper in normal times but increases overload risk.

Deep dive 4

Recovery probes and retry budgets

A circuit breaker must recover without creating another traffic surge.

Read the explanation and worked example
How it works

While open, allow only a small bounded number of probe calls. Give each caller a limited retry budget with randomized delays, and prevent retries from extending beyond the original request deadline. Measure dependency health separately from fallback success.

Walk through an example

A dependency restarts and every gateway immediately sends its full queued backlog. The first successful probe can be followed by another overload before useful traffic stabilizes.

Failure and recovery

Ramp allowed concurrency gradually, cap queued work and keep probes separate from ordinary traffic. Reopen the breaker if latency/error thresholds deteriorate.

Why this helps

A fast fallback can hide continued dependency failure unless it is measured separately.

What you give up

Conservative probes delay full recovery; aggressive probes improve utilization only while the dependency has enough spare capacity.

Tradeoffs and alternatives

DecisionTradeoff / alternative and recovery implication
Choose which old profile fields are safe to useSome reads can stay available using old non-sensitive fields. Current permissions and consent cannot silently become stale for convenience.
Limit retries and recover graduallyWhen service returns, allow a few probes before restoring full traffic. Releasing every queued request at once can cause another outage.
What happens if a region fails?Extra warm capacity costs money; aggressive failover is cheaper in normal times but increases overload risk.
Recovery probes and retry budgetsConservative probes delay full recovery; aggressive probes improve utilization only while the dependency has enough spare capacity.

Production scars & failure modes

Failure investigation

A stale-cache fallback starts hammering the database when the profile service is down.

Look for: Watch fallback , queue age, open circuits and caller concurrency.

Recovery and invariant: Cap fallback work, use approved stale data and shed excess requests; make recovery probes sparse and jittered so the dependency can recover.

Component / failureImpactRecovery mechanismAlternative / tradeoff
Primary failure / raceProfile lookups start timing out and caller retries amplify the outage. Which user operations can continue?Set deadlines, cap concurrency, trip a breaker and serve permitted stale non-security fields. Queue only asynchronous-safe work with limits.Availability may trade against profile freshness, but authorization and consent checks cannot silently become stale.
Recovery follow-upThe dependency recovers while thousands of clients reconnect. Explain half-open probes and gradual ramp-up.Set deadlines, cap concurrency, trip a breaker and serve permitted stale non-security fields. Queue only asynchronous-safe work with limits.State the guarantee you relax and how you detect recovery.

90-second interview summary

For a profile-service outage, I would protect the caller as well as the dependency. Every remote call gets a deadline shorter than the overall request deadline, bounded concurrency and a limited retry budget. A circuit breaker stops sustained failure from consuming the whole caller pool.

Fallback is a product decision, not a generic cache switch. A last-known display name may be acceptable within an age limit, while a current account-block or authorization field may require explicit failure. The profile service remains the authority, and stale fallback must not overwrite newer source state.

When the breaker is open, only a small number of probes test recovery. I would randomize retry timing, cap queued work and queue only operations genuinely safe to complete asynchronously. A fast fallback must be measured separately so it does not conceal that the dependency is still broken.

Regional traffic shifting needs spare capacity and a warm, policy-compliant fallback path; otherwise failover creates a second outage. I would ramp concurrency gradually and monitor dependency latency, queue age, probe outcomes and fallback load. The tradeoff is controlled degradation and some rejected requests in exchange for preserving the rest of the service during a prolonged dependency failure.

Explain it without looking

Explain choose which old profile fields are safe to use

Reveal answer

The profile service owns current data; cached values are limited fallbacks.

A stale display name and a stale account-block flag have different consequences.

Some reads can stay available using old non-sensitive fields. Current permissions and consent cannot silently become stale for convenience.

Explain limit retries and recover gradually

Reveal answer

Use deadlines, concurrency limits, a circuit breaker and approved fallback data.

Unlimited waiting and retries can make a dependency failure take down its callers too.

When service returns, allow a few probes before restoring full traffic. Releasing every queued request at once can cause another outage.

Explain what happens if a region fails?

Reveal answer

Check that the surviving region can handle both calls and fallback reads.

Routing away from one outage can create a second one unless capacity and fallback state are included.

Extra warm capacity costs money; aggressive failover is cheaper in normal times but increases overload risk.

Explain recovery probes and retry budgets

Reveal answer

A circuit breaker must recover without creating another traffic surge.

A fast fallback can hide continued dependency failure unless it is measured separately.

Conservative probes delay full recovery; aggressive probes improve utilization only while the dependency has enough spare capacity.

Revision checklist

Revision checklist

  • Reconstruct choose which old profile fields are safe to use: The profile service owns current data; cached values are limited fallbacks.
  • Reconstruct limit retries and recover gradually: Use deadlines, concurrency limits, a circuit breaker and approved fallback data.
  • Reconstruct what happens if a region fails?: Check that the surviving region can handle both calls and fallback reads.
  • Reconstruct recovery probes and retry budgets: A circuit breaker must recover without creating another traffic surge.
  • Name the authoritative state, boundary, retry identity and failure-domain durability guarantee.
  • Explain one alternative and exactly which guarantee you would relax.
  • Redraw the request and recovery paths without looking; mark what required a hint.

On this page
  1. Prompt
  2. Constraints
  3. Think first
  4. Staged reveal
  5. High-level design
  6. Problem statement
  7. Functional requirements
  8. Non-functional requirements
  9. Entities
  10. API design
  11. High-level design component walkthrough
  12. Engineering control room
  13. Deep dives — decisions, failures and recovery
  14. Tradeoffs and alternatives
  15. Production scars & failure modes
  16. 90-second interview summary
  17. Explain it without looking
  18. Revision checklist

Save & sync your Atlas progress

Sync your profile and topic progress across browsers, then return to the same study desk.

Google sign-in will appear here after its Azure provider is configured.

Architecture diagram