Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Cloudflare: purges are now queued, paced and retried (template #115)

クローズ 初心者向け
#142 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
90/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
markdown
領域
documentation

調査の方向性

content/6.deployment/6.cloudflare.md(Rate limits、purge失敗時のログメッセージ、新しい設定テーブル)と content/6.deployment/3.ci-cd.md の CDN Purging テーブルを更新し、リンクされたテンプレートコミット 37afcb1 を、新しいキュー/リトライ挙動と4つの CLOUDFLARE_PURGE_* 変数の出典として用いる。古い「no retry」の記述が消え、4つの新しいログメッセージが正確に引用され、両ページが共有アカウントに関する注意とともに変数を列挙した時点で完了。

索引モデルが issue の本文から書いたものです。

説明

Template commit 37afcb1 (components-web-app#115) changes how the patched Souin sends purges to Cloudflare. Several statements in the docs are now out of date.

What changed

  • Purges are queued in one sender per zone instead of sent straight away. Tags are deduplicated and sent up to 100 per request (previously 30), paced by a token bucket sized for the Cloudflare plan.
  • A 429 is retried after Retry-After. 5xx and network errors are retried too. Other failures, such as a bad token (401/403), are logged and dropped.
  • A backlog that can't be sent within a minute is replaced by one purge everything. A full flush replaces anything queued.
  • New optional settings (php container env; GitLab/GitHub variables reach helm through k8s.sh, and compose passes them through when set):
Variable Default Notes
CLOUDFLARE_PURGE_PLAN free free, pro, business or enterprise: sets the rate and burst to that plan's purge limits
CLOUDFLARE_PURGE_REQUESTS from the plan Requests per CLOUDFLARE_PURGE_WINDOW
CLOUDFLARE_PURGE_WINDOW from the plan A Go duration, e.g. 1m, 1s
CLOUDFLARE_PURGE_BURST from the plan Requests that can be sent at once

Each php process has its own bucket, but the limit is per account. When staging and production, or several sites, share an account, set a lower rate on each (e.g. on Free, CLOUDFLARE_PURGE_REQUESTS=2, CLOUDFLARE_PURGE_BURST=10 for each of two sites). A 429 from a neighbour is still retried, so going over costs a delay, not a stale page.

Limits: the queue is in memory, so a pod crash loses purges still queued (a deploy purges everything anyway). Edge purges can arrive later than the save while the bucket refills.

Pages to update

  • content/6.deployment/6.cloudflare.md
    • Rate limits: "Souin doesn't retry, so each refused purge leaves its pages stale" is no longer true. Describe the queue, the retry and the coalescing into purge everything.
    • The Pro-or-above recommendation can soften: Free no longer loses purges. It still delays them under heavy editing, and coalescing turns them into whole-zone purges, which costs edge hit rate.
    • Purge failures are logged: the messages are now Cloudflare purge of N tags rate limited, will retry in …, … failed with status N, will retry: … (5xx), … failed with status N: … [tags] (dropped), and Cloudflare purge: N tags queued, more than the purge limit can send soon, so purging everything instead.
    • Add the settings above, with the advice for shared accounts.
  • content/6.deployment/3.ci-cd.md, CDN Purging table: add the four variables.
主要言語
Vue
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

components-web-app/docs のほかの issue

components-web-app/docs の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。