-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Problem
The early-access-data KV key stores the entire waitlist CSV as a single blob. It grows with every signup and has:
- No TTL — never expires
- No size cap — KV values max at 25 MB, will silently fail at the limit
- No cleanup — old entries are never pruned
Written by functions/api/early-access.js and functions/api/clean-csv.js, read by functions/api/early-access-csv.js.
Risk
Low velocity (signups are infrequent) but unbounded by design. If this ever becomes higher-volume, it'll hit the 25 MB KV value limit with no warning.
Fix Options
- Add a TTL (e.g., 90 days) — but this is the canonical store, losing it would be bad
- Move to D1 or R2 for structured storage (proper solution for growing data)
- At minimum, add a size check/warning log when the blob exceeds a threshold (e.g., 1 MB)
Files
functions/api/early-access.js(line ~764/787)functions/api/clean-csv.js(line ~83)functions/api/early-access-csv.js(read-only)
Reactions are currently unavailable