确定何时使用 Azure Blob、Azure 文件或 Azure 磁盘Deciding when to use Azure Blobs, Azure Files, or Azure Disks

Azure 在 Azure 存储中提供多种功能,用于在云中存储和访问数据。Azure provides several features in Azure Storage for storing and accessing your data in the cloud. 本文介绍 Azure 文件、Blob 和磁盘,旨在帮助用户选择合适的功能。This article covers Azure Files, Blobs, and Disks, and is designed to help you choose between these features.

方案Scenarios

下表比较了文件、Blob 和磁盘,并显示每种技术适合的示例情景。The following table compares Files, Blobs, and Disks, and shows example scenarios appropriate for each.

功能Feature 说明Description 何时使用When to use
Azure 文件Azure Files 提供 SMB 接口、客户端库和允许从任何位置访问存储文件的 REST 接口Provides an SMB interface, client libraries, and a REST interface that allows access from anywhere to stored files. 希望将应用程序“提升和移动”到已使用本机文件系统 API 的云中,以此在该应用程序和 Azure 中运行的其他应用程序之间共享数据时。You want to "lift and shift" an application to the cloud which already uses the native file system APIs to share data between it and other applications running in Azure.

希望存储需要从多个虚拟机访问的开发和调试工具时。You want to store development and debugging tools that need to be accessed from many virtual machines.
Azure BlobAzure Blobs 提供客户端库,以及一个可用于在块 blob 中大规模存储和访问非结构化数据的 REST 接口Provides client libraries and a REST interface that allows unstructured data to be stored and accessed at a massive scale in block blobs.

还支持 Azure Data Lake Storage Gen2,用于企业大数据分析解决方案。Also supports Azure Data Lake Storage Gen2 for enterprise big data analytics solutions.
希望应用程序支持流式处理和随机访问方案时。You want your application to support streaming and random access scenarios.

希望可以从任何位置访问应用程序数据时。You want to be able to access application data from anywhere.

想要在 Azure 上生成企业数据湖并执行大数据分析。You want to build an enterprise data lake on Azure and perform big data analytics.
Azure 磁盘Azure Disks 提供客户端库和 REST 接口,借助该接口可通过附加的虚拟硬盘永久地存储和访问数据。Provides client libraries and a REST interface that allows data to be persistently stored and accessed from an attached virtual hard disk. 希望提升和移动使用本机文件系统 API 将数据读写到永久性磁盘中应用程序时。You want to lift and shift applications that use native file system APIs to read and write data to persistent disks.

希望存储不要求从附加磁盘的虚拟机外进行访问的数据时。You want to store data that is not required to be accessed from outside the virtual machine to which the disk is attached.

后续步骤Next steps

决定如何存储和访问数据时,还应考虑涉及的成本。When making decisions about how your data is stored and accessed, you should also consider the costs involved. 有关详细信息,请参阅 Azure 存储定价For more information, see Azure Storage Pricing.

某些 SMB 功能不适用于云。Some SMB features are not applicable to the cloud. 有关详细信息,请参阅 Features not supported by the Azure File service(Azure 文件服务不支持的功能)。For more information, see Features not supported by the Azure File service.

有关 Azure Blob 的详细信息,请参阅什么是 Azure Blob 存储?一文。For more information about Azure Blobs, see our article, What is Azure Blob storage?.

有关磁盘存储的详细信息,请参阅托管磁盘简介For more information about Disk Storage, see our Introduction to managed disks.

有关 Azure 文件存储的详细信息,请参阅 Azure 文件存储部署规划一文。For more information about Azure Files, see our article, Planning for an Azure Files deployment.