2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Cloudflare Waiting Room の挙動について整理

Last updated at Posted at 2023-06-20

目的

Waiting Room の挙動について、図解があると助かるということで、例によって mermeid でフローを書いてみます。

こちらの全体像を頭に入れておけば、使い始める際にスムーズに設定項目を理解できるはずです。

First In First Out (FIFO) のフロー

以下、解説です。

  • Cloudflare Waiting Room は Cookie を活用したソリューションです。具体的には、リクエストは __cfwaitingroom Cookie によって、順番やセッション時間が管理されます。
    • Cookies · Cloudflare Waiting Room docs
      • Cloudflare Waiting Room requires the __cfwaitingroom cookie.
    • Waiting Room にいる間、Cookie の有効期限は常に 5 分に設定され、ブラウザタブを閉じない限り、20 秒ごとに自動更新されます。
      • While a visitor stays in a waiting room, __cfwaitingroom cookie expiration is always set to five minutes, but renews every 20 seconds automatically as long as the visitor does not close the tab or leaves your application.
    • Web アプリにいる間、Cookie の有効期限は Session Duration の値に基づき、設定されます。Session Renewal 無効時には、入場時からの絶対時間となり、Session Renewal 有効時には、最終リクエスト時刻からの相対時間となります。
      • When the visitor accesses the application, the __cfwaitingroom cookie expires after an interval (specified by session_duration).
  • 入場判定では、以下の2つの閾値がそれぞれ機能するため、どちらかが Threshold に達すれば Waiting Room に入ります
    • 最大アクティブセッション数 (Total active users)
    • 1分あたりの最大新規入場ユーザ数 (New users per minute)
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?