Durability Tiers & Capacity Sizing
AetherMQ decouples logical queue durability from physical WAL pools, allowing ultra-fast transient streams and RPO=0 banking ledgers to coexist safely on one cluster.
Durability Tier Matrix
| Tier / Mode | Mechanism | Crash RPO | Typical P50 | Recommended Use Case |
|---|---|---|---|---|
| transient | Pure shard RAM, zero disk I/O | Volatile | < 0.10 ms | Market ticks, heartbeats, cache invalidation |
| durable_async | Sequential WAL + PageCache + Cold Spill | Process crash ≈ 0 | 0.10–0.30 ms | Microservices, IoT telemetry, audit pipelines |
| durable_sync | Group Commit fdatasync / io_uring O_DIRECT | Strict RPO = 0 | 0.30–2.0 ms | Payments, settlement, financial ledgers |
| Multi-Raft quorum-ram | 3-node cross-AZ memory quorum | Cross-node RPO = 0 | 0.20–0.60 ms | High-throughput mission-critical HA |
| Multi-Raft quorum-disk | 3-node cross-AZ fsync/FUA quorum | DC power-loss RPO = 0 | 1.0–4.0 ms | Core banking & regulatory systems |
Production Multi-Tier aether.json Template
Isolate slow/DLQ queues onto a separate storage_profile so their unacked messages never pin high-throughput WAL segments on disk, and enforce min_durability on financial prefixes to block accidental transient publishes.
/etc/aethermq/aether.json
{
"shards": 4,
"memory_mb": 2048,
"data_dir": "/var/lib/aethermq",
"default_durability": "durable_async",
"storage_profiles": [
{ "name": "wal-async", "data_dir": "/var/lib/aethermq/async", "sync_mode": "async", "wal_io": "posix", "direct_io": "off", "segment_size_mb": 64, "hot_cache_mb": 64 },
{ "name": "wal-nvme-sync", "data_dir": "/mnt/nvme/aethermq/sync", "sync_mode": "sync", "wal_io": "auto", "direct_io": "auto", "segment_size_mb": 64, "hot_cache_mb": 32 },
{ "name": "wal-dlq", "data_dir": "/var/lib/aethermq/dlq", "sync_mode": "async", "wal_io": "posix", "direct_io": "off", "segment_size_mb": 64, "hot_cache_mb": 16 }
],
"policies": [
{ "scope": "vhost", "pattern": "*", "durability": "durable_async", "storage_profile": "wal-async" },
{ "scope": "group", "pattern": "PAY.*", "durability": "durable_sync", "min_durability": "durable_sync", "storage_profile": "wal-nvme-sync" },
{ "scope": "group", "pattern": "SYSTEM.DEAD.*", "durability": "durable_async", "storage_profile": "wal-dlq" }
]
} Capacity Sizing Formulas
- CPU Shards (--shards): Match physical vCPUs (leave 1–2 cores for OS/NIC interrupts on 16+ core hosts).
- Memory Budget (--memory-mb): Set to 70–80% of container memory limit. Keep shards × hot_cache_mb ≤ 40% of memory_mb.
- Disk Capacity: Peak MB/s × Max Consumer Outage Seconds × 1.5 + active segment headroom.
- Disk Watermark (--min-free-disk-mb): Reserve 5–10% of volume (min 1024–4096 MiB) so HTTP 507 protection triggers safely before disk exhaustion.