Menu
Back to Discussions

dont use the saga pattern unless you really have to, ok.

Qymbat Zhumanova
Qymbat Zhumanova
·3026 views
lately, ive been thinking about how to manage transactions that span multiple services. we all know the pain of distributed transactions. ive read up on the saga pattern as a way to handle this by breaking down a large transaction into a sequence of smaller, local transactions. each local transaction updates data and publishes a message or event to trigger the next local transaction in the sequence. if any local transaction fails, the saga executes compensating transactions to undo the preceding operations. what are your thoughts on when this pattern is truly necessary versus when simpler approaches might suffice? any war stories or examples of where it worked really well or caused unexpected complexity?
23 comments

Comments

Loading comments...