Skip to content

Commit ed0c468

Browse files
d-csclaude
andcommitted
chore(mollifier): refresh redis-worker changeset for buffer-side org tracking
The previous wording still described the in-memory env→org cache and the "uncached envs treated as their own pseudo-org for one tick" sentinel — both removed when the buffer started tracking `mollifier:orgs` and `mollifier:org-envs:${orgId}` atomically. Re-describe the drainer in terms of the current org-walk so the published changelog matches the shipped code. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c31eb22 commit ed0c468

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.changeset/mollifier-redis-worker-primitives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Add MollifierBuffer and MollifierDrainer primitives for trigger burst smoothing.
66

77
MollifierBuffer (`accept`, `pop`, `ack`, `requeue`, `fail`, `evaluateTrip`) is a per-env FIFO over Redis with atomic Lua transitions for status tracking. `evaluateTrip` is a sliding-window trip evaluator the webapp gate uses to detect per-env trigger bursts.
88

9-
MollifierDrainer pops entries through a polling loop with a user-supplied handler. The loop survives transient Redis errors via capped exponential backoff (up to 5s), and per-env pop failures don't poison the rest of the batch — one env's blip is logged and counted as failed for that tick. Rotation is two-level: orgs at the top, envs within each org. The `maxOrgsPerTick` option (default 500) caps how many orgs are scheduled per tick; for each picked org, one env is popped (rotating round-robin within the org). The drainer caches `envId → orgId` from popped entries; uncached envs at cold start are treated as their own pseudo-org for one tick, then merge into their real org bucket on subsequent ticks. An org with N envs gets the same per-tick scheduling slot as an org with 1 env, so tenant-level drainage throughput is determined by org count rather than env count.
9+
MollifierDrainer pops entries through a polling loop with a user-supplied handler. The loop survives transient Redis errors via capped exponential backoff (up to 5s), and per-env pop failures don't poison the rest of the batch — one env's blip is logged and counted as failed for that tick. Rotation is two-level: orgs at the top, envs within each org. The buffer maintains `mollifier:orgs` and `mollifier:org-envs:${orgId}` atomically with per-env queues, so the drainer walks orgs → envs directly without an in-memory cache. The `maxOrgsPerTick` option (default 500) caps how many orgs are scheduled per tick; for each picked org, one env is popped (rotating round-robin within the org). An org with N envs gets the same per-tick scheduling slot as an org with 1 env, so tenant-level drainage throughput is determined by org count rather than env count.

0 commit comments

Comments
 (0)