Patterns
Patterns and best practices
Architectural patterns for building reliable systems on npayload
These are proven architectural patterns that leverage npayload's messaging primitives to solve common distributed systems challenges. Each pattern includes full SDK examples, scaling guidance, and anti-patterns to avoid.
Fan-out
Deliver one message to multiple independent consumers with isolated delivery and error handling
Saga orchestration
Coordinate multi-step distributed transactions with compensating actions for reliable rollback
Event sourcing
Use streams as the source of truth and rebuild state by replaying domain events
CQRS
Separate read and write paths using channels, streams, and compacted state for optimized performance
Was this page helpful?