# QnA: Successfully Working with Microservices Architectures

- Speaker: 
- Event: [Reversim Summit 2020](/wiki/years/2020.md)
- Video: https://www.youtube.com/watch?v=xcI06LHG1k4
- Transcript: [/transcripts/2020/16-xcI06LHG1k4.md](/transcripts/2020/16-xcI06LHG1k4.md)
- Language: Hebrew · Type: panel · Level: advanced
- Topics: [Distributed Systems](/wiki/topics/distributed-systems.md), [Microservices](/wiki/topics/microservices.md), [Software Engineering](/wiki/topics/software-engineering.md), [Databases](/wiki/topics/databases.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

This talk features a Q&A session discussing the real-world challenges of working with microservices architectures, specifically focusing on event sourcing and sagas. The speaker and participants examine issues like eventual consistency, message ordering, and state management across distributed systems. Ultimately, the audience learns to critically evaluate architectural patterns and avoid overcomplicating systems with heavy frameworks.

## Key points

- [1:09](https://www.youtube.com/watch?v=xcI06LHG1k4&t=69s) Event sourcing can lead to snapshot consistency issues when high-traffic events arrive out of order from a message queue.
- [3:12](https://www.youtube.com/watch?v=xcI06LHG1k4&t=192s) Event sourcing is not a silver bullet and works well for specific domains like payments, but introduces consistency challenges in complex systems.
- [5:40](https://www.youtube.com/watch?v=xcI06LHG1k4&t=340s) E-commerce workflows often require managing distributed processes across different bounded contexts, prompting discussions around sagas versus event-driven flows.
- [7:52](https://www.youtube.com/watch?v=xcI06LHG1k4&t=472s) Data reconciliation between operational microservices and analytical data warehouses helps catch anomalies caused by eventual consistency.
- [10:53](https://www.youtube.com/watch?v=xcI06LHG1k4&t=653s) A saga often represents a complex business process or bounded context, acting as a technical mechanism to handle orchestration rather than business logic.
- [14:07](https://www.youtube.com/watch?v=xcI06LHG1k4&t=847s) The need for a saga is typically an indicator of an underlying domain modeling problem that should be addressed first.
- [18:11](https://www.youtube.com/watch?v=xcI06LHG1k4&t=1091s) Sagas and event sourcing do not always require heavy infrastructure and can often be implemented simply with a relational database and minimal code.

## Takeaways

- Treat event sourcing and sagas as technical tools rather than default solutions for every architectural problem.
- Use data reconciliation processes in analytical systems to handle eventual consistency anomalies safely.
- Ensure proper domain modeling and bounded context definitions before introducing complex orchestration patterns.

## Questions this talk answers

- How do you handle out-of-order events in an event-sourced architecture under high traffic?
- When should you use a saga pattern versus pure event-driven choreography?
- How do you deal with eventual consistency and state discrepancies between different microservices?

## Technologies

Kafka, MySQL, PostgreSQL, BigQuery

## Tags

distributed systems, domain driven design, event sourcing, eventual consistency, microservices, sagas
