Cloudflare: purges are now queued, paced and retried (template #115)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 90/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- markdown
- Lĩnh vực
- documentation
Hướng nghiên cứu
Cập nhật content/6.deployment/6.cloudflare.md (Rate limits, các thông điệp log thất bại purge, bảng cài đặt mới) và bảng CDN Purging trong content/6.deployment/3.ci-cd.md, sử dụng commit template được liên kết 37afcb1 làm nguồn chuẩn cho hành vi hàng đợi/retry mới và bốn biến CLOUDFLARE_PURGE_*. Hoàn thành khi các tuyên bố lỗi thời về 'no retry' đã biến mất, bốn thông điệp log mới được trích dẫn chính xác, và cả hai trang liệt kê các biến kèm lời khuyên về tài khoản dùng chung.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 0
- Merge trung bình
- 1 giờ 20 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của components-web-app/docs
-
Browser Tests page: the template's tests no longer use the sample content (components-web-app#177)Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
components-web-app/docs#267 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
components-web-app/docs#266 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
components-web-app/docs#265 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
components-web-app/docs#264 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
components-web-app/docs#263 · 1 bình luận ·
Tất cả issue của components-web-app/docs
Issue tương tự
-
e2e-failure ready-to-code
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(api): openapi.yaml still documents gif-tools optimize colors as 2-256 instead of 2, 4, 16, 256Đang mởarea: backend documentation priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
snapotter-hq/SnapOtter#2919 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
obsidianmd/pele#39 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
biomejs/biome#12475 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày