Recipes
Production-ready implementations for common use cases. Each recipe includes complete code, failure handling, and monitoring setup.
Recipe Categories
Payment and Financial
| Recipe | Plugins Used | Key Challenge |
|---|---|---|
| Payment Processing | Idempotency + Locks | Prevent double charges |
| Webhook Delivery | Idempotency + Streams | Reliable delivery with retry |
API Protection
| Recipe | Plugins Used | Key Challenge |
|---|---|---|
| Login Throttling | Rate Limit | Brute force protection |
| API Protection | Rate Limit + Cache | Multi-tier defense |
Background Processing
| Recipe | Plugins Used | Key Challenge |
|---|---|---|
| Background Jobs | Streams + Locks | Reliable async processing |
| Scheduled Tasks | Locks | Prevent duplicate cron |
Caching Patterns
| Recipe | Plugins Used | Key Challenge |
|---|---|---|
| CQRS Invalidation | Cache + Tags | Event-driven cache updates |
| Session Management | Cache | Sliding expiration sessions |
Complete Example
| Recipe | Description |
|---|---|
| Example Application | Full working application with all patterns |
Choosing a Recipe
Common Combinations
E-commerce Platform
Payment Processing + CQRS Invalidation + API ProtectionSaaS API
API Protection + Login Throttling + Session ManagementEvent-Driven System
Background Jobs + Webhook Delivery + Scheduled TasksRecipe Template
Each recipe follows this structure:
- Problem Statement — What challenge does this solve?
- Solution Overview — Architecture diagram
- Non-Goals — What this does NOT solve
- Implementation — Step-by-step code
- Failure Scenarios — What happens when things go wrong
- Monitoring — Key metrics and alerts
Next Steps
Choose a recipe that matches your use case, or explore the Example Application to see all patterns working together.