Home / Docs / Durability Tiers & Capacity Sizing

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 / ModeMechanismCrash RPOTypical P50Recommended Use Case
transientPure shard RAM, zero disk I/OVolatile< 0.10 msMarket ticks, heartbeats, cache invalidation
durable_asyncSequential WAL + PageCache + Cold SpillProcess crash ≈ 00.10–0.30 msMicroservices, IoT telemetry, audit pipelines
durable_syncGroup Commit fdatasync / io_uring O_DIRECTStrict RPO = 00.30–2.0 msPayments, settlement, financial ledgers
Multi-Raft quorum-ram3-node cross-AZ memory quorumCross-node RPO = 00.20–0.60 msHigh-throughput mission-critical HA
Multi-Raft quorum-disk3-node cross-AZ fsync/FUA quorumDC power-loss RPO = 01.0–4.0 msCore 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.