考题解析 | 为 Azure container 实例选择恰当的存储方案


  题目

Your company plans to deploy a stateful application named App1 to Azure Container Instances. App1 requires two containers that must be deployed to the same container group.
You need to implement a persistent storage solution that is accessible simultaneously from both containers.
What should you use? Select only one answer.
A. Azure Blobs
B. Azure Disk
C. Azure Files
D. Azure Table

  参考答案

C

  参考解析

技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。
本题需要为在 Azure Container Instances 中部署的有状态应用程序 App1 找到一个合适的持久存储解决方案,该解决方案需要能够被同一个容器组中的两个容器实例同时随机访问。

A. 不正确。Azure Blob 存储。Azure Blob 存储主要用于存储大量的非结构化数据,如文本或二进制文件。它不支持直接挂载到容器作为文件系统,因此不适合需要文件系统级访问的场景。
B. 不正确。Azure 磁盘。Azure磁盘提供持久性磁盘存储,可以用于 Azure 虚拟机。但是Azure Container Instances不支持直接挂载 Azure 磁盘。
C. 正确。Azure文件。Azure 文件提供完全托管的文件共享服务,可以在云中或本地通过SMB协议挂载。它支持多个客户端或容器实例同时挂载同一个文件共享,非常适合需要共享存储的场景,可以满足题目中两个容器同时访问同一存储的需求。
D. 不正确。Azure 表存储。Azure表存储是一种NoSQL数据存储,用于存储结构化数据。
它不提供文件系统级别的访问,不支持需要挂载文件系统或共享存储的场景。