Cloudflare

How Waiting Room makes queueing decisions on Cloudflare's highly distributed network

Sep 20, 2023George Thomas
How Waiting Room makes queueing decisions on Cloudflare's highly distributed network
SummaryAI, from the source post

This post details the evolution of Cloudflare Waiting Room's queuing decision algorithm. It explains how the system now makes decisions at the worker level, distributing available slots based on historical traffic patterns ('trafficHistory') and active workers ('globalWorkersActive', 'dataCenterWorkersActive'). The algorithm aims to balance admitting users to the origin with queuing excess traffic, using configured limits ('total active users', 'new users per minute') and session duration to manage user sessions. The use of Durable Objects for state aggregation and encrypted cookies for tracking admitted users is also highlighted.

More from the Website Security & Threat Management trail