Files
warmbly/internal/models
Matthew Meszaros 73cabf6f5e worker: WorkerHealth event, capacity view, smarter SelectSharedWorker
Workers emit a WorkerHealth event every 30s with assigned mailbox count,
IMAP IDLE connections, memory, goroutines, and rolling 1h send/bounce/
complaint/auth-error/rate-limit counters. Consumer writes them to
worker_health_samples.

Schema additions on workers: egress_kind (cold_smtp / oauth_api /
warmup_only), health_state (healthy / watch / throttled / quarantined /
blocked), load_score (weighted utilization).

worker_capacity_view aggregates the latest hour of samples into a
per-worker capacity row used by the assignment loop. Effective capacity
= base_ceiling(egress_kind) × health_multiplier × age_ramp_multiplier
so a fresh worker earns its way up to base capacity over 72h, and a
worker with rising bounces or complaints automatically gets less load.

MailboxWeight returns 1.0 for cold_smtp, 0.05 for Gmail/Graph API
(worker IP doesn't matter), 0.4 for warmup-only. AssignWorkerToEmail
resolves the mailbox's weight and SelectSharedWorker filters by
headroom + sorts by utilization, so a 200-mailbox OAuth worker and a
16-mailbox cold worker balance fairly.

UnassignWorkerFromEmail refunds the load_score symmetrically.
2026-05-27 15:56:01 +00:00
..
2026-01-29 05:59:04 +01:00
2026-05-25 10:23:32 +00:00
2026-01-17 14:11:14 +00:00
2026-01-29 05:59:04 +01:00
2026-01-29 05:59:04 +01:00
2026-05-24 04:42:43 +00:00
2026-01-17 14:11:14 +00:00
2026-01-17 14:11:14 +00:00
2026-01-17 14:11:14 +00:00
2026-01-17 14:11:14 +00:00
2026-01-17 14:11:14 +00:00
2026-01-17 14:11:14 +00:00