Untitled Lesson
Skill Matrix
UNLOCK NODES BY LEARNING NEW TAGS.
What is the core question to ask when deciding whether an inter-service interaction should be synchronous or asynchronous?
💻 Code Challenge | +75 XP
Wrap a synchronous call to a downstream inventory service with a circuit breaker (using opossum or similar) that opens after repeated failures and falls back to a graceful default response.
A single slow downstream service is causing a chain of four other services above it to also become slow or time out. Reorder the steps to diagnose and mitigate using a circuit breaker.
Task: Reorder the blocks in logical sequence to solve the problem.
A.D.A. Interface
Adaptive Didactic Assistant

Pascual Vila
Frontend Instructor // Code Syllabus
The Error //
Chaining several synchronous calls deep across services with no circuit breaker or timeout protection
// Wrong: unprotected chain, one slow link degrades everything above it
const a = await callServiceA(); // calls B, which calls C, unprotected throughout
// Correct: circuit breaker prevents cascading failure
const breaker = new CircuitBreaker(callServiceA, { timeout: 3000 });The Solution //
A deep chain of synchronous calls is only as reliable as its weakest link — a single slow or failing service anywhere in the chain propagates its problem backward through every caller above it, potentially causing a cascading failure across the entire chain. Add circuit breakers and explicit timeouts to synchronous calls, especially in longer chains.
The Error //
Using synchronous communication for an interaction that doesn't actually need an immediate result
// Wrong: unnecessarily coupled to the email service being up NOW
await emailService.sendConfirmation(order); // order fails if this is down
// Correct: decoupled, email sent whenever the service is ready
await eventBus.publish("OrderPlaced", order);The Solution //
Making a synchronous call for something like "notify that an order was placed so an email can eventually be sent" unnecessarily couples the order-placing flow's success to the email service being available and responsive right now — if the email service is briefly down, the entire order placement fails, even though nothing about placing the order genuinely required the email to be sent immediately.