What does Private-Channel Rate Shaping conclude, in numbers, about “Leaky Buckets, Token Buckets and Two Limits at Once: Per-Minute Shaping and Distinct Recipients in 24 Hours”?
Answer: Chapter 4 puts per-minute shaping and a moving 24-hour limit on people into one plan.
Scope of the numbers: An illustrative plan averaging 10.0 messages a minute still has 420 refused when sent in batches, and none once a token bucket of depth 20 shapes it. Parameters are illustrative, platform figures carry the document and the date read, and all numbers come from the book's programs, which read and write no file and use no network.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 24
| tier L | per day | days for 12000 | binding limit |
| 250 | 250 | 48 | tier |
| 2000 | 2000 | 6 | tier |
| 10000 | 6020 | 2 | shaper |
| 100000 | 6020 | 2 | shaper |
| tier 2000, same daily total, worst moving 24 h count: | |||
| even pacing 10:00-20:00 every day : 2000 | |||
| day 1 in its last hour, day 2 in its first hour : 4000 |
Show the full program
# Chapter 4. p42: two limits at once, a per-minute shaper and a 24 h cap.
# Model (illustrative list and hours; tier steps as Meta publishes them:
# 250, 2,000, 10,000 and 100,000 unique recipients per moving 24 h).
# 12,000 consented contacts get one campaign message each. Sending is
# allowed 10:00 to 20:00 local time (600 minutes; a quiet-hours rule of
# the shop). The shaper gives at most b + r t in t minutes, r = 10,
# b = 20, so at most 6,020 a day. The platform caps unique recipients
# in any moving 24 h at the tier limit L. Meta's default throughput of
# 80 a second (4,800 a minute) never binds here. Second part: the same
# daily total can break a moving 24 h cap if the send time drifts.
import math
LIST, MINUTES, R, B = 12000, 600, 10, 20
SHAPER_DAY = B + R * MINUTES
print("tier L per day days for 12000 binding limit")
for L in (250, 2000, 10000, 100000):
day = min(L, SHAPER_DAY)
print("%6d %8d %14d %s"
% (L, day, math.ceil(LIST / day),
"tier" if L < SHAPER_DAY else "shaper"))
def worst_24h(per_minute):
best, run = 0, 0
for i, x in enumerate(per_minute):
run += x
if i >= 1440:
run -= per_minute[i - 1440]
best = max(best, run)
return best
L = 2000
even, drift = [0] * (3 * 1440), [0] * (3 * 1440)
for d in range(3):
for k in range(L):
even[d * 1440 + 600 + (k * MINUTES) // L] += 1
late = [1440 * 0 + 600 + 540 + (k * 60) // L for k in range(L)]
early = [1440 * 1 + 600 + (k * 60) // L for k in range(L)]
for t in late + early:
drift[t] += 1
print("tier 2000, same daily total, worst moving 24 h count:")
print(" even pacing 10:00-20:00 every day : %d" % worst_24h(even))
print(" day 1 in its last hour, day 2 in its first hour : %d"
% worst_24h(drift))Single source and citation
Fan, Y. (2026). Rate Control for Private Messaging Channels without Account Bans: Token-Bucket Shaping, Platform-Published Limits and Consent-Based Reach Throughput (Version 1.0.0), Chapter 4: Leaky Buckets, Token Buckets and Two Limits at Once: Per-Minute Shaping and Distinct Recipients in 24 Hours. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-271 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026271,
author = {Fan, Yafu},
title = {Rate Control for Private Messaging Channels without Account Bans: Token-Bucket Shaping, Platform-Published Limits and Consent-Based Reach Throughput},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Bursts That Are Compliant on Average: Sliding-Window Caps and the b + rW Bound of the Token Bucket
- Chapter 2 · Who Decides Account Quality: Consent Rates, Negative Feedback and a Markov Chain of Tiers
- Chapter 3 · Overflow under Poisson Arrivals: the Bucket Depth Only Shifts the Tail of the Leaky-Bucket Queue
- Chapter 5 · Slowing Down on Feedback: Additive Increase, Multiplicative Decrease and Wald's Sequential Test
- Chapter 6 · Red Lines outside the Model: Stop Means Stop, Quiet Hours, Vulnerable Readers to a Person, and No Pretending
- Chapter 7 · Pulling Up Shoots and Telephone Traffic: Mencius's Parable and Erlang's Paper of 1909
- Chapter 8 · Closing the Loop: a Weekly Review, the Rate Shaper and a Pre-Registered Test