{
  "schemaVersion": 1,
  "slug": "cloudflare-r2",
  "locale": "zh",
  "pageClass": "entity",
  "entityType": "SoftwareApplication",
  "field": "technology",
  "title": "Cloudflare R2",
  "subtitle": "Cloudflare 提供的兼容 S3、免出站流量费的托管对象存储服务",
  "aliases": [
    "R2",
    "Cloudflare R2 存储"
  ],
  "lead": {
    "definition": "Cloudflare R2 是一项托管式分布式对象存储服务，将非结构化数据存放在存储桶中，提供兼容 Amazon S3 的 API 和 Cloudflare Workers 绑定，且不收取互联网出站流量费。",
    "answerSummary": "Cloudflare R2 是 Cloudflare 于 2021 年 9 月 28 日公布、2022 年 9 月 21 日正式推出的托管对象存储服务。对象存放在存储桶中，可通过兼容 Amazon S3 的 API 或 Cloudflare Workers 原生绑定访问，互联网出站流量免费。服务按存储量及 A 类和 B 类操作次数计费，低频访问存储另收数据检索费。直接对 R2 对象执行的操作在全球范围内具有强一致性。",
    "keyFacts": [
      {
        "label": "服务提供商",
        "value": "Cloudflare",
        "ref": "s1"
      },
      {
        "label": "公布日期／正式上线日期",
        "value": "2021 年 9 月 28 日／2022 年 9 月 21 日",
        "ref": "s2"
      },
      {
        "label": "出站流量费",
        "value": "免费（0 美元）",
        "ref": "s4"
      },
      {
        "label": "标准存储费率",
        "value": "每 GB 每月 0.015 美元",
        "ref": "s4"
      },
      {
        "label": "低频访问存储费率",
        "value": "每 GB 每月 0.01 美元，另收每 GB 0.01 美元的数据检索费",
        "ref": "s4"
      },
      {
        "label": "一致性模型",
        "value": "直接操作在全球范围内具有强一致性",
        "ref": "s7"
      }
    ]
  },
  "infobox": [
    {
      "label": "类别",
      "value": "云对象存储",
      "ref": "s3"
    },
    {
      "label": "开发商",
      "value": "Cloudflare, Inc.",
      "ref": "s1"
    },
    {
      "label": "接口",
      "value": "兼容 S3 的 API、Workers R2 绑定",
      "ref": "s5"
    },
    {
      "label": "A 类操作（标准存储）",
      "value": "每百万次请求 4.50 美元（状态变更类）",
      "ref": "s4"
    },
    {
      "label": "B 类操作（标准存储）",
      "value": "每百万次请求 0.36 美元（读取类）",
      "ref": "s4"
    },
    {
      "label": "存储类别",
      "value": "标准存储和低频访问存储",
      "ref": "s9"
    }
  ],
  "sections": [
    {
      "id": "overview-and-launch",
      "heading": "概述与产品沿革",
      "bodyMd": "Cloudflare 于 2021 年 9 月 28 日公布 R2 对象存储，作为收取较高出站数据传输费用的云对象存储服务的替代方案，并于 2022 年 9 月 21 日正式推出该服务。[^s1][^s2]\n\nR2 以存储桶和对象组织非结构化数据，并与 Cloudflare 的全球网络直接集成。应用程序可以通过 R2 提供资源文件、备份、数据集和应用文件，无需按 GB 支付互联网出站流量费。[^s3][^s4]"
    },
    {
      "id": "pricing-and-storage-classes",
      "heading": "计费方式与存储类别",
      "bodyMd": "Cloudflare R2 的所有存储类别均免收互联网出站流量费。R2 按每月存储量以及两类请求的次数计费：A 类操作（上传、列举等状态变更类操作）和 B 类操作（读取操作）。[^s4]\n\n根据 Cloudflare 于 2026 年 10 月 30 日更新的定价文档，**标准存储**每 GB 每月收费 0.015 美元，A 类操作每百万次收费 4.50 美元，B 类操作每百万次收费 0.36 美元，免收数据检索费。**低频访问存储**的存储费降至每 GB 每月 0.01 美元，A 类操作每百万次收费 9.00 美元，B 类操作每百万次收费 0.90 美元，另收每 GB 0.01 美元的数据检索处理费。[^s4][^s9] 每个账户的前 10 万个存储桶已包含在内，超出部分按每个存储桶每月 0.10 美元计费。[^s4]"
    },
    {
      "id": "api-and-workers",
      "heading": "S3 API 兼容性与 Workers 绑定",
      "bodyMd": "开发者既可使用现有的 S3 SDK 和工具，通过兼容 Amazon S3 的 HTTP API 访问 R2，也可通过原生 R2 存储桶绑定在 Cloudflare Workers 中直接访问。[^s3][^s5][^s6]\n\nCloudflare 的 S3 兼容性表显示，支持情况因具体的 S3 操作和请求头而异，因此从 AWS S3 迁移应用时，应逐项确认所需功能是否受支持。[^s5] Workers 绑定提供 get、put、delete、head 和 list 等低延迟方法，可在无服务器代码中直接调用。[^s6]"
    },
    {
      "id": "consistency-and-caching",
      "heading": "强一致性与公开存储桶缓存",
      "bodyMd": "直接对 R2 存储桶和对象执行的操作在全球范围内具有强一致性。写入、更新或删除成功后，全球各地后续发起的直接读取都会立即看到最新状态，避免读到最终一致性模型下可能暂时返回的旧数据。[^s7]\n\n如果通过自定义域名公开访问存储桶，并在 R2 前面启用了 Cloudflare 缓存，边缘缓存可能会继续返回先前缓存的响应，直到缓存过期或被清除。[^s7][^s8] 实际账单总额和迁移成本取决于工作负载所用的存储类别、各类请求的比例，以及外部服务提供商收取的出站流量费。[^s4][^s9]"
    }
  ],
  "faqs": [
    {
      "q": "Cloudflare R2 免收出站流量费，哪些用量仍需付费？",
      "a": "R2 按存储的数据量、A 类状态变更请求和 B 类读取请求收费。标准存储每 GB 每月 0.015 美元，低频访问存储每 GB 每月 0.01 美元，后者另收每 GB 0.01 美元的数据检索费。",
      "refs": [
        "s4",
        "s9"
      ]
    },
    {
      "q": "Cloudflare R2 是否兼容 Amazon S3 API 的全部功能？",
      "a": "否。R2 提供兼容 S3 的 API，支持常见的存储桶和对象操作。各项操作和请求头的具体差异见 Cloudflare 的兼容性表。",
      "refs": [
        "s5"
      ]
    },
    {
      "q": "使用公开存储桶时，R2 的一致性如何体现？",
      "a": "直接读写 R2 在全球范围内具有强一致性。如果通过自定义域名访问公开存储桶且启用了缓存，缓存响应可能持续返回，直至缓存过期或被清除。",
      "refs": [
        "s7",
        "s8"
      ]
    },
    {
      "q": "Cloudflare Workers 如何连接到 R2？",
      "a": "Workers 可通过原生 R2 绑定直接访问存储桶，调用 get、put、delete、head 和 list 等方法，无需经过 S3 HTTP 请求签名层。",
      "refs": [
        "s6"
      ]
    }
  ],
  "claims": [
    {
      "text": "Cloudflare 于 2021 年 9 月 28 日公布 R2，并于 2022 年 9 月 21 日正式推出该服务。",
      "refs": [
        "s1",
        "s2"
      ]
    },
    {
      "text": "Cloudflare R2 免收互联网出站流量费，按存储量和 A 类、B 类操作次数计费。标准存储每 GB 每月 0.015 美元，低频访问存储每 GB 每月 0.01 美元，后者另收每 GB 0.01 美元的数据检索费。",
      "refs": [
        "s4",
        "s9"
      ]
    },
    {
      "text": "R2 提供兼容 Amazon S3 的 API 和原生 Cloudflare Workers 存储桶绑定。S3 API 的兼容范围因具体操作和请求头而异。",
      "refs": [
        "s5",
        "s6"
      ]
    },
    {
      "text": "直接对 R2 对象执行的操作在全球范围内具有强一致性。如果在公开存储桶前启用 CDN 缓存，则可能继续返回缓存响应，直至缓存过期或被清除。",
      "refs": [
        "s7",
        "s8"
      ]
    }
  ],
  "timeline": [
    {
      "date": "2021-09-28",
      "text": "Cloudflare 公布免收出站流量费的 R2 对象存储服务。",
      "refs": [
        "s1"
      ]
    },
    {
      "date": "2022-09-21",
      "text": "Cloudflare R2 正式上线。",
      "refs": [
        "s2"
      ]
    },
    {
      "date": "2026-04-21",
      "text": "Cloudflare 更新存储类别文档，涵盖标准存储和低频访问存储。",
      "refs": [
        "s9"
      ]
    },
    {
      "date": "2026-10-30",
      "text": "Cloudflare 更新 R2 定价文档（标准存储每 GB 每月 0.015 美元，低频访问存储每 GB 每月 0.01 美元，出站流量免费）。",
      "refs": [
        "s4"
      ]
    }
  ],
  "sources": [
    {
      "key": "s1",
      "url": "https://blog.cloudflare.com/introducing-r2-object-storage/",
      "tier": 3,
      "title": "Introducing Cloudflare R2 Storage: Rapid and Reliable Object Storage, Minus the Egress Fees",
      "publisher": "Cloudflare Blog",
      "publishedAt": "2021-09-28",
      "accessedAt": "2026-12-04"
    },
    {
      "key": "s2",
      "url": "https://blog.cloudflare.com/r2-ga/",
      "tier": 3,
      "title": "Cloudflare R2 Storage is Now Generally Available",
      "publisher": "Cloudflare Blog",
      "publishedAt": "2022-09-21",
      "accessedAt": "2026-12-04"
    },
    {
      "key": "s3",
      "url": "https://developers.cloudflare.com/r2/",
      "tier": 3,
      "title": "Cloudflare R2 Overview",
      "publisher": "Cloudflare Docs",
      "publishedAt": "2026-10-01",
      "accessedAt": "2026-12-04"
    },
    {
      "key": "s4",
      "url": "https://developers.cloudflare.com/r2/pricing/",
      "tier": 3,
      "title": "Cloudflare R2 Pricing",
      "publisher": "Cloudflare Docs",
      "publishedAt": "2026-10-30",
      "accessedAt": "2026-12-04"
    },
    {
      "key": "s5",
      "url": "https://developers.cloudflare.com/r2/api/s3/api/",
      "tier": 3,
      "title": "S3 API Compatibility",
      "publisher": "Cloudflare Docs",
      "publishedAt": "2026-11-10",
      "accessedAt": "2026-12-04"
    },
    {
      "key": "s6",
      "url": "https://developers.cloudflare.com/r2/api/workers/workers-api-reference/",
      "tier": 3,
      "title": "Workers API Reference for R2",
      "publisher": "Cloudflare Docs",
      "publishedAt": "2026-11-30",
      "accessedAt": "2026-12-04"
    },
    {
      "key": "s7",
      "url": "https://developers.cloudflare.com/r2/reference/consistency/",
      "tier": 3,
      "title": "R2 Consistency Model",
      "publisher": "Cloudflare Docs",
      "publishedAt": "2026-11-10",
      "accessedAt": "2026-12-04"
    },
    {
      "key": "s8",
      "url": "https://developers.cloudflare.com/r2/buckets/public-buckets/",
      "tier": 3,
      "title": "Public Buckets",
      "publisher": "Cloudflare Docs",
      "publishedAt": "2026-11-12",
      "accessedAt": "2026-12-04"
    },
    {
      "key": "s9",
      "url": "https://developers.cloudflare.com/r2/buckets/storage-classes/",
      "tier": 3,
      "title": "Storage Classes (Standard and Infrequent Access)",
      "publisher": "Cloudflare Docs",
      "publishedAt": "2026-04-21",
      "accessedAt": "2026-12-04"
    }
  ],
  "links": [
    {
      "predicate": "developed_by",
      "toSlug": "cloudflare",
      "label": "Cloudflare"
    },
    {
      "predicate": "integrates_with",
      "toSlug": "cloudflare-workers",
      "label": "Cloudflare Workers"
    }
  ],
  "sameAs": [
    "https://developers.cloudflare.com/r2/"
  ],
  "disclaimer": null,
  "status": {
    "review": "awaiting_review",
    "provenance": "prefill",
    "autoWritten": true
  },
  "dateCreated": "2026-12-04",
  "dateModified": "2026-12-04",
  "_meta": {
    "canonicalUrl": "https://mimirwiki.com/zh/wiki/cloudflare-r2",
    "revision": {
      "sha256": "4faeb7932102eff66c33b2d60d1eca080843bdd955a45ea7f2641443521f5169",
      "short": "4faeb793",
      "hashedFields": "all fields except status and _meta, RFC 8785 canonical form"
    },
    "formats": {
      "md": "https://mimirwiki.com/zh/wiki/cloudflare-r2.md",
      "txt": "https://mimirwiki.com/zh/wiki/cloudflare-r2.txt",
      "json": "https://mimirwiki.com/zh/wiki/cloudflare-r2.json",
      "jsonld": "https://mimirwiki.com/zh/wiki/cloudflare-r2.jsonld"
    },
    "translations": {
      "en": "https://mimirwiki.com/wiki/cloudflare-r2",
      "ko": "https://mimirwiki.com/ko/wiki/cloudflare-r2",
      "ja": "https://mimirwiki.com/ja/wiki/cloudflare-r2",
      "zh": "https://mimirwiki.com/zh/wiki/cloudflare-r2",
      "es": "https://mimirwiki.com/es/wiki/cloudflare-r2",
      "de": "https://mimirwiki.com/de/wiki/cloudflare-r2",
      "fr": "https://mimirwiki.com/fr/wiki/cloudflare-r2",
      "pt": "https://mimirwiki.com/pt/wiki/cloudflare-r2",
      "ru": "https://mimirwiki.com/ru/wiki/cloudflare-r2",
      "it": "https://mimirwiki.com/it/wiki/cloudflare-r2",
      "hi": "https://mimirwiki.com/hi/wiki/cloudflare-r2",
      "ar": "https://mimirwiki.com/ar/wiki/cloudflare-r2"
    }
  }
}
