What happens when Payment gets slow?
Same shop, same slow service. Look at where the pile forms, and who else gets hurt.
API GATEWAY
A normal day. Order workflow asks, the gateway passes it on, answers come straight back.
Payment slows down. Each request to it now takes ten times as long.
Order workflow is stuck holding open requests. It sends customers away, and the healthy services sit idle.
Payment recovers and work flows again. The customers who were sent away are gone.
customers ordering
sent away
Order workflow
taking orders
full, cannot take orders
red = a request held open,
waiting for Payment to answer
API GATEWAY
Paymentslow today
Inventoryhealthy, but idle
Emailhealthy, but idle
customers sent away
0
4
where the pile sits
inside Order workflow,
blocking it
STRENGTHThe customer hears yes or no on the payment right away.
WEAKNESSOne slow service blocks the caller, and the healthy ones stand still with it.
MESSAGE BUS
A normal day. Order workflow writes each order onto the bus, the others pick up at their own pace.
Payment slows down. It simply reads its orders more slowly.
Order workflow keeps selling, Inventory and Email keep working. Only Payment's pile grows, parked on the bus.
Payment recovers and works through its pile. No order was lost, some payments were late.
customers ordering
Order workflow
taking orders
nothing is held open: it writes
the order down and lets go
MESSAGE BUS
waiting for Payment
waiting for Inventory
waiting for Email
Paymentslow today
Inventoryworking as usual
Emailworking as usual
customers sent away
0
where the pile sits
on the bus, in front
of Payment only
STRENGTHOnly the slow service falls behind. Selling and the healthy services carry on.
WEAKNESSThe customer's payment is confirmed later, and somebody has to watch the pile.