Skip to content

Commit ca0b8cd

Browse files
committed
[Waiting Room] Add architecture info
1 parent b9d5c19 commit ca0b8cd

File tree

2 files changed

+65
-41
lines changed

2 files changed

+65
-41
lines changed

src/content/docs/waiting-room/about.mdx

+21-32
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,45 @@ title: About
33
pcx_content_type: concept
44
sidebar:
55
order: 2
6-
head:
7-
- tag: title
8-
content: About Waiting Room
96

107
---
118

129
import { LinkButton, Render } from "~/components"
1310

14-
Cloudflare Waiting Room protects websites by queueing site visitors when a website experiences unmanageable surges in legitimate traffic that may otherwise bring an application down.
11+
Waiting Room queues visitors when your traffic approaches a previously defined threshold that might otherwise bring an application down.
1512

16-
<Render file="non-contract-enablement" product="fundamentals" />
13+
![Waiting Room process flow showing how a request is managed by Cloudflare and placed in a waiting room before reaching the origin website](~/assets/images/waiting-room/waiting-room-process-flow.png)
1714

18-
## Benefits
15+
## User flow
1916

20-
Waiting Room protects your origin server by preventing surges in legitimate traffic that may overload your origin.
17+
Once you have [created and activated a waiting room](/waiting-room/get-started/) for a specific application page:
2118

22-
Waiting Room also benefits your visitors by:
19+
- If a page is not experiencing heavy traffic, a visitor accesses the page directly.
20+
- If page traffic approaches a [user-defined threshold](/waiting-room/reference/configuration-settings/#session-duration), a visitor enters a virtual waiting room until it is their turn to access the page:
2321

24-
* Keeping your application online and preventing them from reaching error pages.
25-
* Showing estimated wait times that are continuously updated.
26-
* Opening up new spots more quickly by tracking dynamic inflow and [outflow](/waiting-room/reference/configuration-settings/#session-duration).
27-
* Remembering each visitor's status to prevent someone from losing their place in line or having to re-queue if they leave your site.
28-
* Appearing in your own [branding and style](/waiting-room/how-to/customize-waiting-room/), which enhances trust and lets you provide additional information as needed.
22+
- Each user receives a [cookie](/waiting-room/reference/waiting-room-cookie/) to manage the dynamic outflow of requests from the waiting room to the origin website in [First In First Out (FIFO)](/waiting-room/reference/queueing-methods/#first-in-first-out-fifo) order.
23+
- While in the waiting room, the user's browser automatically refreshes every 20 seconds to give them updated information about their estimated wait time.
24+
- When a user exits the waiting room and reaches your application, they can leave and re-enter without waiting for the length of time specified by the [session duration](/waiting-room/reference/configuration-settings/#session-duration).
25+
- Because waiting rooms support dynamic inflow and [outflow](/waiting-room/reference/configuration-settings/#session-duration), new spots appear more quickly and estimated wait times are lower and more accurate.
2926

30-
## How it works
27+
## Architecture
3128

32-
Once you have [created and activated a waiting room](/waiting-room/get-started/) for a specific application page:
29+
Waiting Room is built on [Workers](/workers/) that runs across a global network of Cloudflare data centers.
3330

34-
* If a page is not experiencing heavy traffic, a visitor accesses the page directly.
35-
* If page traffic crosses a [user-defined threshold](/waiting-room/reference/configuration-settings/#session-duration), a visitor enters a virtual waiting room until it is their turn to access the page:
36-
* Each user receives a [cookie](/waiting-room/reference/waiting-room-cookie/) to manage the dynamic outflow of requests from the waiting room to the origin website in [First In First Out (FIFO)](/waiting-room/reference/queueing-methods/#first-in-first-out-fifo) order.
37-
* While in the waiting room, the user's browser automatically refreshes every 20 seconds to give them updated information about their estimated wait time.
38-
* When a user exits the waiting room and reaches your application, they can leave and re-enter without waiting for the length of time specified by the [session duration](/waiting-room/reference/configuration-settings/#session-duration).
39-
* Because waiting rooms support dynamic inflow and [outflow](/waiting-room/reference/configuration-settings/#session-duration), new spots appear more quickly and estimated wait times are lower and more accurate.
31+
When a request comes to a host or path covered by a Waiting Room, that request goes to a Waiting Room Worker in the closest geographic data center. The Worker then needs to make a decision: whether to send users to the queue or the website.
4032

41-
![Waiting Room process flow showing how a request is managed by Cloudflare and placed in a waiting room before reaching the origin website](~/assets/images/waiting-room/waiting-room-process-flow.png)
33+
That decision itself depends on two factors: [admin-defined thresholds](/waiting-room/reference/configuration-settings/) and the Waiting Room state.
4234

43-
## Availability
35+
For admin-defined thresholds, the two measures that matter are `total active users` and `new users per minute`:
4436

45-
The following customers have access to Cloudflare Waiting Room:
37+
- `total active users` is a target threshold for how many simultaneous users you want to allow on the pages covered by your waiting room.
4638

47-
* Those qualified under [Project Fair Shot](https://www.cloudflare.com/fair-shot/)
48-
* Customers on a Business or Enterprise plan
39+
- `new users per minute` defines the target threshold for the maximum rate of user influx to your website per minute.
4940

50-
Access to certain features depends on a customer's [plan type](/waiting-room/plans/).
41+
A sharp spike in either of these values might result in queuing. Another configuration that affects how we calculate `the total active users` is `session duration`. A user is considered active for `session duration` minutes since the request is made to any page covered by a waiting room.
5142

52-
## Prerequisites
43+
The other factor is the Waiting Room state, which is maintained at the local data center level but then also changes continuously based on the traffic around the world. Each data center works with its own Waiting Room state. This state is a snapshot of the traffic pattern for the website around the world available at that point in time. The advantage of using this approach - making decisions at the Worker level - is that we can make decisions without any significant latency added to the request. The algorithm for Waiting Room dynamically allocates a certain number of slots available to each Worker based on the Waiting Room state. Queueing starts when the slots run out within the Worker. The lack of additional latency added enables the customers to turn on the waiting room all the time without worrying about extra latency to their users.
5344

54-
* [Cloudflare’s CDN](/cache/) is required to use the Waiting Room feature.
55-
* Configure a [proxied DNS record](/dns/manage-dns-records/how-to/create-dns-records/) or a [proxied load balancer](/load-balancing/understand-basics/proxy-modes/) for the waiting room’s hostname. A DNS record is not auto-configured after a waiting room is created.
56-
* Visitors must enable cookies. Refer to [Waiting Room cookies](/waiting-room/reference/waiting-room-cookie/) for information on how cookies are used in Cloudflare Waiting Room.
45+
The Waiting Room state is updated with global information every few seconds. We have a pipeline set up in Cloudflare [Durable Objects](/durable-objects/) that ensures changes in traffic get propagated around the world. This architecture ensures that we do not introduce additional latency, as well as that we are making decisions with as near-time accuracy as possible.
5746

58-
<LinkButton variant="primary" href="/waiting-room/get-started/">Get started</LinkButton>
47+
For even more details about the architecture and why we made these decisions, refer to our [deep-dive technical blog](https://blog.cloudflare.com/how-waiting-room-queues).

src/content/docs/waiting-room/index.mdx

+44-9
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ head:
99

1010
---
1111

12-
import { CardGrid, Description, Feature, LinkTitleCard, Plan, RelatedProduct } from "~/components"
12+
import { CardGrid, Description, Feature, LinkTitleCard, Plan, RelatedProduct, Render } from "~/components"
1313

1414
<Description>
1515

16-
A virtual waiting room to manage peak traffic.
16+
A virtual waiting room to manage peak traffic.
1717
</Description>
1818

1919
<Plan type="business" />
@@ -22,42 +22,77 @@ Cloudflare Waiting Room allows you to route excess users of your website to a cu
2222

2323
***
2424

25+
## Benefits
26+
27+
Waiting Room protects your origin server by preventing surges in legitimate traffic that may overload your origin.
28+
29+
Waiting Room also benefits your visitors by:
30+
31+
- Keeping your application online and preventing them from reaching error pages.
32+
- Showing estimated wait times that are continuously updated.
33+
- Opening up new spots more quickly by tracking dynamic inflow and [outflow](/waiting-room/reference/configuration-settings/#session-duration).
34+
- Remembering each visitor's status to prevent someone from losing their place in line or having to re-queue if they leave your site.
35+
- Appearing in your own [branding and style](/waiting-room/how-to/customize-waiting-room/), which enhances trust and lets you provide additional information as needed.
36+
37+
---
38+
2539
## Features
2640

2741
<Feature header="Scheduled Event" href="/waiting-room/additional-options/create-events/">
28-
Customize the behavior of a waiting room for a specific period of time.
42+
Customize the behavior of a waiting room for a specific period of time.
2943
</Feature>
3044

3145
<Feature header="Waiting Room Rules" href="/waiting-room/additional-options/waiting-room-rules/">
32-
Create rules to indicate specific traffic or areas of your site or application that you do not want a waiting room to apply to.
46+
Create rules to indicate specific traffic or areas of your site or application that you do not want a waiting room to apply to.
3347
</Feature>
3448

3549
<Feature header="Waiting Room Analytics" href="/waiting-room/waiting-room-analytics/">
36-
Get insights into the traffic going through your waiting room.
50+
Get insights into the traffic going through your waiting room.
3751
</Feature>
3852

3953
<Feature header="Additional hostname and path coverage" href="/waiting-room/how-to/place-waiting-room/">
40-
Apply a single waiting room to multiple hostnames and paths within the same zone.
54+
Apply a single waiting room to multiple hostnames and paths within the same zone.
4155
</Feature>
4256

4357
***
4458

4559
## Related products
4660

4761
<RelatedProduct header="Cloudflare for SaaS" href="/cloudflare-for-platforms/cloudflare-for-saas/" product="cloudflare-for-platforms">
48-
Cloudflare for SaaS allows you to extend the security and performance benefits of Cloudflare’s network to your customers via their own custom or vanity domains.
62+
Cloudflare for SaaS allows you to extend the security and performance benefits of Cloudflare’s network to your customers via their own custom or vanity domains.
4963
</RelatedProduct>
5064

5165
<RelatedProduct header="Rules" href="/rules/" product="rules">
52-
Cloudflare Rules allows you to make adjustments to requests and responses, configure Cloudflare settings, and trigger specific actions for matching requests.
66+
Cloudflare Rules allows you to make adjustments to requests and responses, configure Cloudflare settings, and trigger specific actions for matching requests.
5367
</RelatedProduct>
5468

5569
<RelatedProduct header="SSL/TLS" href="/ssl/" product="ssl">
56-
Cloudflare SSL/TLS encrypts your web traffic to prevent data theft and other tampering.
70+
Cloudflare SSL/TLS encrypts your web traffic to prevent data theft and other tampering.
5771
</RelatedProduct>
5872

5973
***
6074

75+
## Availability
76+
77+
The following customers have access to Cloudflare Waiting Room:
78+
79+
- Those qualified under [Project Fair Shot](https://www.cloudflare.com/fair-shot/)
80+
- Customers on a Business or Enterprise plan
81+
82+
Access to certain features depends on a customer's [plan type](/waiting-room/plans/).
83+
84+
<Render file= "non-contract-enablement" product="fundamentals" />
85+
86+
***
87+
88+
## Prerequisites
89+
90+
- [Cloudflare’s CDN](/cache/) is required to use the Waiting Room feature.
91+
- Configure a [proxied DNS record](/dns/manage-dns-records/how-to/create-dns-records/) or a [proxied load balancer](/load-balancing/understand-basics/proxy-modes/) for the waiting room’s hostname. A DNS record is not auto-configured after a waiting room is created.
92+
- Visitors must enable cookies. Refer to [Waiting Room cookies](/waiting-room/reference/waiting-room-cookie/) for information on how cookies are used in Cloudflare Waiting Room.
93+
94+
***
95+
6196
## More resources
6297

6398
<CardGrid>

0 commit comments

Comments
 (0)