System Design Patterns: From Fundamentals to Real Systems

0% completed

Saga

1. The Incident

Checkout at the store now spans three services: inventory (reserve the items), payment (charge the card, via the external provider), and shipping (create the shipment). The code calls them in order, one after another. It works, mostly.

Then shipping has a bad deploy: down for twenty minutes on a busy evening. For every checkout in that window, inventory reserved, payment charged... and the third call failed. The code has a catch block that logs the error. That's all it has.

.....

.....

.....

Like the course? Get enrolled and start learning!