Cloudflare: purges are now queued, paced and retried (template #115)
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 90/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- markdown
调研方向
更新 content/6.deployment/6.cloudflare.md(Rate limits、purge 失败日志消息、新的设置表)以及 content/6.deployment/3.ci-cd.md 中的 CDN Purging 表格,使用链接的模板提交 37afcb1 作为新的队列/重试行为和四个 CLOUDFLARE_PURGE_* 变量的事实来源。完成标准是:过时的 ‘no retry’ 说法已移除,四个新日志消息被准确引用,并且两个页面都列出了这些变量及共享账户的建议。
由索引模型根据 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
429is retried afterRetry-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), andCloudflare 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,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
components-web-app/docs 的其他 Issue
-
Website: the docs site's own service worker can't install (navigateFallback "/" isn't precached)未关闭bug
难度 2/5 1-3 小时 新手友好度 70/100
components-web-app/docs#173 ·
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
components-web-app/docs#169 ·
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
components-web-app/docs#152 ·
-
难度 3/5 1-2 天 新手友好度 58/100
components-web-app/docs#180 · 1 条评论 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 55/100
components-web-app/docs#179 ·
查看 components-web-app/docs 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 76/100
ethereum/execution-apis#935 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
infinispan/langchain-infinispan#34 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
oxfordcontrol/COSMO.jl#211 ·
-
难度 1/5 1 小时以内 新手友好度 85/100
carpentries/workshop-template#918 ·