
The Saga Pattern for Distributed Transactions
How to implement the saga pattern for distributed transactions across microservices: orchestration versus choreography, in TypeScript, with compensation.
Tags
33 articles · Page 3 of 3

How to implement the saga pattern for distributed transactions across microservices: orchestration versus choreography, in TypeScript, with compensation.

A practical guide to database sharding: partitioning strategies, shard key selection, cross-shard queries and the operational cost of distributing data.

A practical guide to consensus algorithms: Raft, Paxos and leader election, with real examples of when and why distributed systems need them.

How to implement timeouts, retries, and backoff strategies that prevent cascading failures in distributed architectures.

A deep dive into rate limiting algorithms with implementations, trade-offs, and guidance on choosing the right approach for your API.

Network failures mean requests get retried — idempotent API design makes processing the same request twice produce one result, not duplicate charges.

When a downstream service is failing, continuing to send requests makes everything worse — the circuit breaker pattern stops the cascade by failing fast.

Event-driven systems decouple producers from consumers through async messaging — but eventual consistency, ordering and idempotency add real complexity.

RabbitMQ, Redis Streams, or Kafka — understanding the messaging patterns behind decoupled, resilient systems and when each tool fits.