# 云存储

**云存储**是一种[计算机数据存储](https://www.edgepedia.org/zh/computer-data-storage)模式，其中数字数据保存在由服务提供商管理的服务器上，并按需通过网络（通常是互联网）访问。它是云计算面向存储的应用；NIST 将云计算定义为一种模型，能够实现对可配置计算资源（包括存储）共享池的泛在、便捷、按需网络访问，这些资源可以以最少的管理工作或服务提供商交互被快速配置和释放。<sup>[1](https://csrc.nist.gov/glossary/term/cloud_computing)</sup> 最大的公共云提供商将存储以[对象存储](https://www.edgepedia.org/zh/object-storage)服务的形式提供，尤其是 [Amazon S3](https://www.edgepedia.org/zh/amazon-s3)、Google Cloud Storage 和 Azure Blob Storage，此外还有 Azure Files 等文件共享服务。<sup>[2](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)</sup><sup> • </sup><sup>[3](https://learn.microsoft.com/en-us/azure/storage/files/storage-files-faq)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义模型 | 对可配置资源共享池的按需网络访问，以最少的管理工作或提供商交互快速配置和释放（NIST SP 800-145）<sup>[1](https://csrc.nist.gov/glossary/term/cloud_computing)</sup> |
| 主导形式 | 对象存储：数据以对象（文件加元数据）形式存储在存储桶内，每个对象由键标识<sup>[2](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)</sup> |
| 持久性设计目标 | Amazon S3 在 AWS 区域内设计为 99.999999999%（11 个 9）的持久性；Google Cloud Storage 无论存储类别或位置类型如何，均设计为至少 11 个 9 的年度持久性<sup>[4](https://d1.awsstatic.com/product-marketing/S3/Amazon%20S3%20Security%20and%20Data%20Protection%20-%20Tools%20and%20Best%20Practices.pdf)</sup><sup> • </sup><sup>[5](https://docs.cloud.google.com/storage/docs/availability-durability)</sup> |
| 成本层级 | 访问频率驱动价格：Azure 热、冷（30 天最低）、寒（90 天最低）和归档（180 天最低，检索需数小时）；Google Standard、Nearline（30 天）、Coldline（90 天）和 Archive（365 天）<sup>[6](https://learn.microsoft.com/en-us/azure/storage/blobs/access-tiers-overview/)</sup><sup> • </sup><sup>[7](https://docs.cloud.google.com/storage/docs/storage-classes)</sup> |
| 一致性 | Amazon S3 在所有 AWS 区域为 PUT 和 DELETE 请求提供强读写后一致性；Google Cloud Storage 写入在成功响应后立即可读<sup>[2](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)</sup><sup> • </sup><sup>[8](https://docs.cloud.google.com/storage/docs/consistency)</sup> |
| 对象大小 | Amazon S3 的实际最大对象大小为 53.7 TB（48.8 TiB），尽管文档通常引用 50 TB<sup>[9](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingObjects.html)</sup> |
| 加密 | 上传到 S3 存储桶的所有新对象默认自动静态加密；Google Cloud Storage 默认使用 Google 管理的密钥对静态数据加密<sup>[10](https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html)</sup><sup> • </sup><sup>[11](https://docs.cloud.google.com/storage/docs/encryption)</sup> |

## 对象存储的工作原理

云存储的主导接口是对象存储，而非传统文件系统。在 Amazon S3 中，对象是文件加上描述它的元数据，存储桶是对象的容器；每个对象有一个键，在存储桶内唯一标识它。<sup>[2](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)</sup> Google Cloud Storage 的工作方式相同：对象有两个组成部分，数据本身（对服务不透明）和元数据（如对象名称和分配的世代号，这两项共同在存储桶内唯一标识该对象）。<sup>[12](https://docs.cloud.google.com/storage/docs/objects)</sup>

由于命名空间是扁平的，文件夹是一种模拟。工具将对象名称中的斜杠字符解释为分隔符，因此名为 `folder1/file.txt` 的对象看起来像文件夹中的文件，但 Cloud Storage 并不存储名为 `folder1` 的实际文件夹；字符串 `folder1/` 只是对象名称的一部分。<sup>[12](https://docs.cloud.google.com/storage/docs/objects)</sup> 这种设计以目录语义换取极大规模：存储桶中的对象数量没有限制，AWS 称 S3 具有几乎无限的可扩展性。<sup>[12](https://docs.cloud.google.com/storage/docs/objects)</sup><sup> • </sup><sup>[13](https://aws.amazon.com/s3/consistency/)</sup>

**一致性。** 两大服务现在都提供强一致性。Amazon S3 在所有 AWS 区域为 PUT 和 DELETE 请求提供强读写后一致性，对单个键的更新是原子的：并发读取者要么获得旧数据，要么获得新数据，绝不会是部分或损坏的数据。<sup>[2](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)</sup> 在 Google Cloud Storage 中，写入请求返回成功后，对象立即可供读取和元数据操作，上传是原子的，因此中断的上传不会在存储桶中留下部分数据。<sup>[8](https://docs.cloud.google.com/storage/docs/consistency)</sup>

## 持久性、可用性与冗余

持久性和可用性是不同的属性。可用性是应请求立即访问数据的能力；持久性是长期保护，确保数据保持完整且未损坏。<sup>[5](https://docs.cloud.google.com/storage/docs/availability-durability)</sup> 提供商通过冗余存储追求持久性。Google Cloud Storage 使用纠删码（将数据拆分为冗余片段，使得可以从较少的片段重建数据）并将数据片段冗余存储在多个设备上，仅在数据冗余存储后才确认写入，并重新验证校验和以检测损坏，从冗余数据自动纠正。<sup>[5](https://docs.cloud.google.com/storage/docs/availability-durability)</sup> Amazon S3 的 PUT 和 COPY 操作在返回成功之前将客户数据同步存储在多个设施中，服务在 AWS 数据中心内的多个服务器之间复制数据。<sup>[14](https://d1.awsstatic.com/whitepapers/Security/Security_Storage_Services_Whitepaper.pdf)</sup><sup> • </sup><sup>[2](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)</sup>

**位置类型**决定了冗余与价格的权衡。Google Cloud Storage 存储桶可以是区域性的，将数据冗余存储在至少两个可用区；双区域性的，将数据存储在两个选定区域；或多区域性的，将数据存储在广阔地理区域内，数据中心之间至少相隔 100 英里。<sup>[5](https://docs.cloud.google.com/storage/docs/availability-durability)</sup> 区域性存储桶的存储价格最低，双区域性最高，多区域性介于两者之间。<sup>[15](https://docs.cloud.google.com/storage/docs/bucket-locations)</sup> 对于双区域性存储桶，可选的 turbo 复制功能旨在 15 分钟恢复点目标内将 100% 新写入的对象复制到两个区域，无论对象大小；默认复制目标为一小时内复制 99.9% 的新对象，12 小时内复制 100%。<sup>[5](https://docs.cloud.google.com/storage/docs/availability-durability)</sup> Azure 提供类似的地理冗余，将数据复制到不同的数据中心，以便在单个数据中心故障时恢复数据。<sup>[16](https://download.microsoft.com/download/9/F/E/9FE59D31-20EC-440C-9005-F94A56EB8832/Azure_Developer_Guide_eBook_en-GB.pdf)</sup>

## 访问层级与存储类别

定价遵循访问频率。Azure Blob Storage 提供四个访问层级：热层级，针对频繁访问或修改的数据优化，存储成本最高但访问成本最低；冷层级，用于不频繁访问的数据，最低保留 30 天；寒层级，用于很少访问但仍需快速检索的数据，最低保留 90 天；离线归档层级，检索延迟约为数小时，最低保留 180 天。智能层级根据使用模式在在线层级之间自动移动数据。<sup>[6](https://learn.microsoft.com/en-us/azure/storage/blobs/access-tiers-overview/)</sup>

Google Cloud Storage 以存储类别表达同样的理念，这是附加到每个对象的元数据：Standard 无最低持续时间或检索费用，Nearline（30 天最低）、Coldline（90 天最低）和 Archive（365 天最低），后三者收取检索费用。<sup>[7](https://docs.cloud.google.com/storage/docs/storage-classes)</sup> Amazon S3 的归档类别遵循相同模式：S3 Standard-IA 和 One Zone-IA 的最低存储期限为 30 天，S3 Glacier Flexible Retrieval 和 Glacier Instant Retrieval 为 90 天，S3 Glacier Deep Archive 为 180 天；提前删除或转换对象会产生按比例计算的费用。<sup>[17](https://docs.aws.amazon.com/AmazonS3/latest/userguide/troubleshoot-lifecycle.html)</sup>

**生命周期自动化**在层级之间移动数据，无需手动重写。Google 的对象生命周期管理支持设置对象生存时间、保留非当前版本以及降级存储类别以管理成本等用例；默认情况下，删除的活动对象变为软删除并保留七天，在此期间可以恢复。<sup>[18](https://docs.cloud.google.com/storage/docs/lifecycle)</sup> Azure Blob 生命周期管理应用基于规则的策略，将数据转换到所需层级或在生命周期结束时使其过期，Azure Storage Actions 可以在多个存储账户中大规模运行此类操作。<sup>[6](https://learn.microsoft.com/en-us/azure/storage/blobs/access-tiers-overview/)</sup> 一个实际成本细节：每个转换到 S3 Glacier Flexible Retrieval 或 Deep Archive 的对象带有 40 KB 开销，其中 8 KB 元数据按 S3 Standard 费率收费，32 KB 用于索引，因此 AWS 不建议对许多小对象进行生命周期转换。<sup>[17](https://docs.aws.amazon.com/AmazonS3/latest/userguide/troubleshoot-lifecycle.html)</sup>

## 版本控制与防删除保护

版本控制在一个存储桶中保留对象的多个变体。S3 版本控制保留、检索和恢复每个对象的每个版本，允许从意外用户操作和应用程序故障中恢复。<sup>[10](https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html)</sup> 在 Google Cloud Storage 中，启用对象版本控制后，替换活动对象会将旧版本保留为非当前版本。<sup>[19](https://docs.cloud.google.com/storage/docs/object-versioning?hl=en)</sup> 为获得更强保证，S3 对象锁定在一次写入多次读取（WORM）模型下存储对象，提供强制访问控制，在锁定过期之前，即使是根用户也无法删除或覆盖对象。<sup>[10](https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html)</sup><sup> • </sup><sup>[20](https://docs.aws.amazon.com/pdfs/wellarchitected/latest/security-pillar/wellarchitected-security-pillar.pdf)</sup>

## 安全与访问控制

云对象存储中的[访问控制](https://www.edgepedia.org/zh/access-control)在存储桶和项目级别运作。Google Cloud Storage 提供两个并行系统：IAM 和访问控制列表（ACL）；用户只需其中一个系统的权限，这意味着即使存储桶的 IAM 策略限制严格，具有公共 ACL 的单个对象也会暴露。统一存储桶级访问完全禁用 ACL，是敏感数据的推荐配置。<sup>[21](https://docs.cloud.google.com/storage/docs/access-control)</sup> AWS 建议最小权限访问和 S3 阻止公共访问，现在可以通过 AWS Organizations 以单一策略配置在组织级别强制执行。<sup>[10](https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html)</sup> Google 的等效功能，公共访问预防，阻止由 `allUsers` 和 `allAuthenticatedUsers` 授权的请求，可以按存储桶或通过组织策略强制执行；强制执行最多需要 10 分钟生效。<sup>[22](https://docs.cloud.google.com/storage/docs/public-access-prevention)</sup>

两个平台都默认对静态数据启用**加密**。上传到 S3 的每个新对象自动加密，默认使用 S3 管理密钥的服务器端加密（SSE-S3），此外还有 SSE-KMS、双层 DSSE-KMS 和客户提供密钥（SSE-C）选项。<sup>[10](https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html)</sup> Google Cloud Storage 默认提供 Google 管理的密钥，通过 Cloud KMS 提供客户管理的密钥以满足 PCI-DSS 或 HIPAA 等合规需求，还提供客户提供的密钥，以及在提供商必须无法访问未加密数据的情况下提供客户端加密。<sup>[11](https://docs.cloud.google.com/storage/docs/encryption)</sup>

## 云中的文件存储

对象存储不是唯一的模型。Azure Files 提供完全托管的云文件共享，可通过行业标准的 SMB 和 NFS 协议访问，可同时挂载在云或本地 Windows、Linux 和 macOS 系统上，Azure File Sync 在 [Windows Server](https://www.edgepedia.org/zh/windows-server) 机器上缓存共享以实现本地访问。<sup>[3](https://learn.microsoft.com/en-us/azure/storage/files/storage-files-faq)</sup> 这种文件接口适合期望文件系统的应用程序，而对象存储适合大规模、一次写入的数据，如备份、归档和内容服务。<sup>[15](https://docs.cloud.google.com/storage/docs/bucket-locations)</sup>

## References

1. [Cloud computing, NIST CSRC Glossary (from NIST SP 800-145)](https://csrc.nist.gov/glossary/term/cloud_computing)
2. [What is Amazon S3?, Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)
3. [Azure Files FAQ, Microsoft Learn](https://learn.microsoft.com/en-us/azure/storage/files/storage-files-faq)
4. [Amazon S3 Security and Data Protection, AWS whitepaper](https://d1.awsstatic.com/product-marketing/S3/Amazon%20S3%20Security%20and%20Data%20Protection%20-%20Tools%20and%20Best%20Practices.pdf)
5. [Data availability and durability, Google Cloud Storage documentation](https://docs.cloud.google.com/storage/docs/availability-durability)
6. [Access tiers for blob data, Azure Storage, Microsoft Learn](https://learn.microsoft.com/en-us/azure/storage/blobs/access-tiers-overview/)
7. [Storage classes, Google Cloud Storage documentation](https://docs.cloud.google.com/storage/docs/storage-classes)
8. [Cloud Storage consistency, Google Cloud documentation](https://docs.cloud.google.com/storage/docs/consistency)
9. [Amazon S3 objects overview, Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingObjects.html)
10. [Security best practices for Amazon S3, Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html)
11. [Data encryption options, Google Cloud Storage documentation](https://docs.cloud.google.com/storage/docs/encryption)
12. [About Cloud Storage objects, Google Cloud documentation](https://docs.cloud.google.com/storage/docs/objects)
13. [Amazon S3 consistency model, AWS](https://aws.amazon.com/s3/consistency/)
14. [Data Durability and Reliability, AWS whitepaper](https://d1.awsstatic.com/whitepapers/Security/Security_Storage_Services_Whitepaper.pdf)
15. [Bucket locations, Google Cloud Storage documentation](https://docs.cloud.google.com/storage/docs/bucket-locations)
16. [Azure Storage, Azure Developer Guide eBook, Microsoft](https://download.microsoft.com/download/9/F/E/9FE59D31-20EC-440C-9005-F94A56EB8832/Azure_Developer_Guide_eBook_en-GB.pdf)
17. [Troubleshooting Amazon S3 Lifecycle issues, Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/troubleshoot-lifecycle.html)
18. [Object Lifecycle Management, Google Cloud Storage documentation](https://docs.cloud.google.com/storage/docs/lifecycle)
19. [Object Versioning, Google Cloud Storage documentation](https://docs.cloud.google.com/storage/docs/object-versioning?hl=en)
20. [Security Pillar, AWS Well-Architected Framework](https://docs.aws.amazon.com/pdfs/wellarchitected/latest/security-pillar/wellarchitected-security-pillar.pdf)
21. [Overview of access control, Google Cloud Storage documentation](https://docs.cloud.google.com/storage/docs/access-control)
22. [Public access prevention, Google Cloud Storage documentation](https://docs.cloud.google.com/storage/docs/public-access-prevention)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › 网络与安全

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/cloud-storage

English original: https://www.edgepedia.org/cloud-storage
