Gradual Frontend Rollout Without Feature Flags: Just a Cookie and Random Number
arpit_bhayani · x · 2026-08-18
Presents a minimalist approach to gradual frontend rollouts without a dedicated Feature Flag service:
Core Mechanism
- On first visit, generate a random integer (1-100) and store it in a cookie.
- Define a rollout threshold on the server (e.g., 30). If the user's cookie value ≤ 30, serve the new version; otherwise, serve the old one.
Benefits
- Smooth Scaling: Increase the server-side threshold (e.g., 30 to 60) to expose the new version to more users without changing the experience for existing users.
- Instant Rollback: Decrease the threshold to revert users above the cutoff back to the old version.
- Zero Dependencies: No need for external flag services or session stores—just a cookie, a random number, and a single comparison.
More from coding & agent
- Cumora: Open-Source Team Chat Where AI Agents Are First-Class Teammates — aigclink · 2026-08-18
- Claude + Thrixel Build a Full 3D Game From One Prompt in ~2 Hours — RanaHanocka · 2026-08-18
- Permix: Lightweight Type-Safe TS Permissions Library Wins Developer Praise — jonathan_wilke · 2026-08-18
- Give agents a centralized source of truth before they hallucinate — eptwts · 2026-08-18
- Build a GTM agent machine to take a one-person business from 0 to $10k MRR — tomcrawshaw01 · 2026-08-18
- After letting her agents queue up commits, her GitHub daily streak exploded to 2026 — christine_hall · 2026-08-18