← все видео

Why your microservices can't use database transactions — and what to do instead

CloudMeatAndBones · 2026-05-01 · 12м 41с · 23 просмотров · YouTube ↗

Топики: durable-execution

Аудио ещё не скачано.

📝 Summary

Summary ещё не сгенерён.

📜 Transcript

Transcript ещё не сделан.

⚙️ Pipeline jobs

Нет job'ов в очереди.

📄 Описание YouTube

Показать
In a monolith, you get transactions for free. Begin, commit, rollback — the database handles it. In microservices, each service owns its own database, and that safety net is gone. A booking that spans three services can succeed in two of them and fail in the third, leaving your system in a partially consistent state with no automatic way back.

The solution is the Saga pattern — and this video explains how to build it on AWS using Step Functions as the orchestrator.

What you'll learn:

- Why two-phase commit doesn't work in distributed systems and what goes wrong at scale
- What a saga actually is: local transactions + compensating transactions
- The difference between choreography and orchestration — and why Step Functions is almost always the right choice on AWS
- How to structure the happy path and compensation path in a Step Functions state machine
- The pivot transaction — your point of no return — and why non-compensable steps must come last
- Three things that break sagas in production: failed compensations, non-compensable operations, and silent failures
- When NOT to use a saga — and when redesigning your service boundaries is the better answer

Chapters:
00:00 Half Booking Nightmare
02:02 Why Two Phase Commit Fails
03:34 Saga Pattern Explained
04:32 Travel Booking Walkthrough
05:41 Pivot Point of No Return
06:14 Choreography vs Orchestration
07:20 AWS Step Functions Blueprint
08:45 Build Tips and Pitfalls
09:58 When Not to Use Sagas

This is video 3 of the System Architecture Patterns series. The previous two videos covered retry strategies and idempotency — both are prerequisites for building sagas correctly. Links below.
🔗 Links:
→ Video 1 — Retry Strategies & Exponential Backoff with Jitter: https://www.youtube.com/watch?v=cED530Oawaw
→ Video 2 — Idempotency with DynamoDB conditional writes: https://www.youtube.com/watch?v=MdYIGlVaOXc
→ AWS Prescriptive Guidance — Saga pattern: https://docs.aws.amazon.com/prescriptive-guidance/latest/modernization-data-persistence/saga-pattern.html
→ AWS Compute Blog — Building a serverless saga: https://aws.amazon.com/blogs/compute/building-a-serverless-distributed-application-using-a-saga-orchestration-pattern/
→ Sample code (CDK): https://serverlessland.com/workflows/saga-pattern-cdk

Part of the System Architecture Patterns series.