Implement reliability patterns for fault-tolerant Customer.io integrations including circuit breakers, retries with jitter, fallback queues, and idempotency.
Build a circuit breaker with CLOSED/OPEN/HALF_OPEN states, configurable failure/success thresholds, and automatic recovery timeout.
Create exponential backoff with configurable jitter (0-30%) to prevent thundering herd. Skip retries on client errors (4xx except 429).
Use BullMQ to queue operations when the circuit breaker is open, with exponential backoff retries starting at 1 minute.
Wrap the Customer.io client with circuit breaker and fallback queue integration for automatic failover.
Create a health check endpoint that tests API connectivity, reports circuit state, queue depth, and last success/failure times.
Use SHA-256 content hashing with LRU cache to prevent duplicate operations within a configurable window.
For detailed implementation code and configurations, load the reference guide:
Read(${CLAUDE_SKILL_DIR}/references/implementation-guide.md)
| Pattern | When to Use |
|---|---|
| Circuit Breaker | Prevent cascade failures |
| Retry | Transient errors (5xx, 429) |
| Fallback Queue | Extended outages |
| Idempotency | Duplicate prevention |
After reliability patterns, proceed to customerio-load-scale for scaling.
See Customerio Reliability Patterns implementation details for output format specifications.
Basic usage: Apply customerio reliability patterns to a standard project setup with default configuration options.
Advanced scenario: Customize customerio reliability patterns for production environments with multiple constraints and team-specific requirements.