Blog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2025 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/Microservices
Microserviceshard

How to handle data consistency in microservices (saga, outbox)?

Tags
#saga#outbox#consistency#eventual-consistency
Back to categoryPractice quiz

Answer

Consistency across microservices is usually eventual. Sagas coordinate a series of local transactions with compensating actions on failure. The outbox pattern stores events in the same DB transaction as state changes, then publishes them reliably to a broker.

Related questions

Microservices
In a saga, what is a compensating action and why is it tricky?
#microservices#saga#compensation
Microservices
Saga orchestration vs choreography — what’s the difference?
#saga#orchestration#choreography
Microservices
What is the Outbox pattern and what problem does it solve?
#outbox#events#consistency
Microservices
Synchronous vs asynchronous communication — what’s the trade-off?
#communication#http#messaging
MongoDB
Read preference in replica sets: what does `primary` vs `secondary` mean?
#mongo#replica-set#read-preference
MongoDB
Read concern vs write concern: what do they control?
#mongo#consistency#read-concern