Menu
Back to Discussions

So, when do you pick a Saga pattern instead of just using simple compensating transactions?

Hey everyone, I've been struggling a bit trying to get workflows to work across all our different microservices. We're putting together a new order fulfillment system, and it has a few stages: checking inventory, handling payments, starting shipping, and sending notifications. Each one of those is a separate service. I know compensating transactions are a normal way to keep things atomic in distributed systems, but I'm starting to wonder if it's getting too complicated and if a Saga pattern would actually be better. When do you really decide to use a full-blown Saga (either choreography or orchestration) instead of just setting up simple compensating actions for each step? Are there clear signs or system qualities that make you lean towards a Saga, or is it just about how many services you're dealing with?
4 comments

Comments

Loading comments...
So, when do you pick a Saga pattern instead of just using simple compensating transactions? | SysDesAi