Patterns
Proven answers to problems every distributed system meets: failing dependencies, overload, duplicate messages, stale caches and lost events. Each pattern covers when to use it, how it works, production code in C# and TypeScript, and the trade-offs.
10 shown
Resilience
Keep a service useful when its dependencies are slow, failing or overloaded.

Circuit Breaker
Stop calling a dependency that keeps failing, fail fast for a cool-down period, then probe carefully before sending full traffic again.
C# · TypeScript

Retry with Backoff and Jitter
Repeat a failed call that is likely to succeed next time, waiting longer and randomly between attempts so retries do not overload the system.
C# · TypeScript

Timeout
Give every remote call a deadline so a slow dependency costs a bounded amount of time and resources instead of hanging the caller.
C# · TypeScript
Scalability
Protect capacity and share it fairly between clients.
Data
Read and write data correctly and quickly across caches, databases and services.

Cache-Aside
The application checks the cache first, loads from the database on a miss, stores the result with a TTL, and invalidates it on writes.
C# · TypeScript

Transactional Outbox
Write the business change and the event that announces it in one database transaction, then publish the event from the outbox table.
C# · TypeScript

Idempotency Key
Make a repeated request or message produce the same effect as the first one by deduplicating on a unique key and returning the stored result.
C# · TypeScript
Messaging
Move work through queues reliably, at the pace consumers can handle.

Competing Consumers
Several consumer instances read from the same queue, each message going to exactly one of them, so throughput scales by adding consumers.
C# · TypeScript

Dead Letter Queue
Move messages that repeatedly fail processing to a separate queue, so they stop blocking healthy traffic and can be inspected and replayed.
C# · TypeScript
Integration
Put a stable edge in front of many services.
No patterns match. Try a broader word such as "failure", "queue" or "cache".

