Queue Mode
Fair FIFO line
Visitors see position and estimated wait. Optional ahead / behind depth when you turn depth display on.
Open source · Fair queues
A fair waiting room for traffic surges. Visitors join a FIFO queue on the edge; your origin only sees the rate you admit.
TideGuard is a corridor, not a dashboard. Traffic enters, holds, and exits at the rate your origin can survive.
Every visitor enters the same FIFO line. No VIP cuts, no randomized order. Durable Objects keep that order strongly consistent for one named queue.
Heartbeats keep the line honest. Silent clients drop out. ETA stays pluggable so you can show a calm estimate without flooding your origin.
Admission is a controlled rate. Signed HMAC tokens prove a visitor earned their turn, then expire so capacity cannot leak past your policy.
Everything an operator needs for a surge: admission modes, signed access, branding, and the knobs that set capacity and cost.
Fair FIFO line
Visitors see position and estimated wait. Optional ahead / behind depth when you turn depth display on.
Equal-odds draw
Each admit picks uniformly among current waiters. The room shows odds in the pool instead of a hard line number.
Signed, time-limited access
Admitted visitors carry a token (cookie, Bearer, or query). No session database on your origin.
Brand, mode, depth
Password onboarding, live branding preview, admission mode, and waiting-count toggle before KV save. Then a live control room with metrics.
iframe-ready /wait
Ship ?embed=1 for a calm in-page line. Return path and showWaiting overrides are query-driven.
Token-gated pages
/demo redirects unauthenticated visitors into the queue, then lets them through with a valid admission token.
Ballpark before launch
Estimate Workers and Durable Objects spend for one surge. Defaults match real poll (15s) and heartbeat (30s) intervals.
Join through metrics
Typed routes for /join, /status, /leave, /heartbeat, /admit, /mode, /metrics, and /health for automation and ops.
Strong consistency
One QueueRoom DO per queue name owns order. KV holds branding and admin hash only. No KV writes on join, status, or heartbeat.
Defaults from a fresh deploy. Override in wrangler.jsonc, secrets, or the admin wizard.
20
How many admitted visitors the protected surface can hold at once.
2
Steady admit rate used for release pacing and wait ETA.
queue
queue (FIFO) or lottery. Switchable live from admin or POST /mode.
600
How long an admission token stays valid after admit.
60
Drop silent waiting tabs that stop proving they are still here.
1800
Maximum time a visitor may stay in the waiting pool.
15s / 30s
Waiting-room client intervals. Longer intervals cut Durable Object request volume.
default
Named queue used when the request does not specify one.
KV / admin
Colors, title, message, font, and showWaitingCount. Depth stats stay off until you enable them.
/demoFull page, widget, and API client (simulated)./costEstimate Cloudflare spend for your next drop./faqDeep answers for operators.
Clone the repo, set your admit rate, and put a fair queue in front of the origin that cannot take everyone at once.