---
name: Cloudflare Pages + R2 actual limits + hybrid pattern reference
description: ★★★ 2026-05-01 chat Claude correction. 私の earlier「25 GB total」は確認不足の誤情報. 実際は per-file 25 MiB + per-deployment file count limit (Free 20,000 / Paid 100,000). Aggregate total cap は明記なし. R2 hybrid が Cloudflare 公式推奨の大容量 pattern.
type: reference
originSessionId: 4ff4b965-234a-4258-b31d-a8bcf83f071b
---
## Cloudflare Pages 実際の制限 (2026-02 公式 doc 確認時点)

| 項目 | Free | Paid (Pro/Business/Enterprise) |
|------|------|------------------------------|
| 1 file 最大 size | **25 MiB** (約 26 MB) | 25 MiB (同じ) |
| Deployment あたり file 数 | **20,000 files** | **100,000 files** (env `PAGES_WRANGLER_MAJOR_VERSION=4` 必要) |
| Build 回数 | 月 500 回 | プランによる増加 |
| Build time | 20 分 timeout | 同じ |
| Project 数 (account) | 100 (soft limit) | 同じ |
| **Aggregate total cap** | **明記なし** (理論上 20,000 × 25 MiB ≈ 500 GB) | **明記なし** (理論上 100,000 × 25 MiB ≈ 2.5 TB) |

★ **私の earlier「25 GB / deployment total」claim は誤り**. 引用していたソース不明で確認失敗. 実際の hard cap は per-file size と file count のみ.

## Limit Increase Form

公式: https://forms.gle/ukpeZVLWLnKeixDu7
- 個別判断 (use case 説明必須)
- 「OUKC commons project for academic publishing」 文脈なら好意的検討の可能性高 (Cloudflare は研究/OSS に寛容)

## R2 hybrid pattern (Cloudflare 公式推奨, 大容量配信)

```
rei-aios.pages.dev          ← Cloudflare Pages (UI/SPA、軽量)
  ├ Charter, Policy 等       (HTML/CSS/JS, ~数 MB)
  └ Paper metadata (JSON)    (~数十 MB)
      ↓ links to
static.rei-aios.org          ← Cloudflare R2 (大容量 binary)
  ├ Paper PDFs               (各 5-数十 MB)
  ├ Lean 4 corpus tarballs   (大型)
  ├ Dataset archives
  └ Video/audio              (動画あれば)
```

## R2 料金 (2026-05-01)

- Storage: **$0.015 / GB / month** (1 TB で月 $15, 10 TB で $150)
- ★ **Egress 料金 無料** (S3 vs R2 の決定的差別化)
- Class A operations (write): $4.50 / 1M
- Class B operations (read): $0.36 / 1M

## When to migrate to R2

**Trigger**: 個別 file が 25 MiB を超える時 のみ
- ★ Video / 大型 dataset / Lean 4 build cache 配信 / 大容量 ML model checkpoint 等
- それ以外は Pages のままで OK (per-file 25 MiB と 20,000 files で OUKC scale は十分)

**OUKC 現状**: 全 file が 25 MiB 以下 → R2 必要なし. 当面 Pages 単独で運用.

## How to use this memory

- 「Cloudflare の容量制限は?」 question 時: per-file 25 MiB + file count limit を first-principles として参照
- 「Pages では足りない、R2 必要?」 question 時: trigger (個別 file > 25 MiB) を確認してから判断
- 私が「X GB total」系の数字を出す前に、必ず公式 doc または本 memory で確認
- 自己訂正: aggregate total cap を語る時は **「明記なし」** と honest に書く

## 関連 memory

- `feedback_oukc_storage_honest_scale.md` — OUKC 5 年 realistic ceiling (~50-100 GB) と「支払可能でも accumulative 思考は避ける」原則
- `project_open_problems_storage_strategy.md` — META-DB hybrid 戦略 (~1K: GitHub / ~100K: +Cloudflare / ~1M: +IPFS pin)
- `project_oukc_seo_static_pages_plan.md` — SSG 1,544 pages 計画 (75 MB raw, Pages で fit)

## 永久参照価値

★★★ — Cloudflare 数字を語る前に必読. 自己訂正の reminder 兼 standard pattern reference.
