我有一个需要访问大文件 (600MB) 的系统
我是否认为我需要在 Azure 中使用 VM?有没有办法将单个文件放入 App 服务系统?
我可以看到这需要很长时间才能部署!
保罗
我有一个需要访问大文件 (600MB) 的系统
我是否认为我需要在 Azure 中使用 VM?有没有办法将单个文件放入 App 服务系统?
我可以看到这需要很长时间才能部署!
保罗
I'm a bit confused by your mention of "a long time to deploy" but... no, a Virtual Machine is not required, to have an environment with storage.
Azure Web Apps have built-in storage of their own. At the "Basic" tier, you have 10GB at your disposal (and it grows upwards of 1TB as you scale up in tier). And that storage is durable (until you delete the web app itself) and shared across all running instances of the web app.
You may also store content in Azure Blob Storage. And if/as you need to work with this content locally, you can download blob content to your local (web app) storage via SDK/API calls. Assuming the Storage account and Web App are in the same region, there will be no bandwidth costs copying between the two.
Azure File Storage works as well, but has limitations: - 5TB max per storage instance - Max 1000 IOPS across entire storage instance - Cannot be SMB-attached to a Web App - you need to access it programmatically (via SDK/API)
Note: As long as you keep your large content (such as your 600MB file) in blob/file storage, you don't have to include it in your web app every time you deploy; you can copy it down to your web app's storage upon startup.
您不一定需要一个 VM 来存储和访问该文件,而是应该考虑使用 Azure 文件,这是一种经济高效的解决方案,并且与您的用例相匹配。以下是对其功能的简要说明:
替换或补充本地文件服务器:
Azure 文件可用于完全替代或补充传统的本地文件服务器或 NAS 设备。Windows、macOS 和 Linux 等流行操作系统可以在世界任何地方直接挂载 Azure 文件共享。Azure 文件共享也可以通过 Azure 文件同步复制到本地或云中的 Windows 服务器,以对正在使用的数据进行高性能和分布式缓存。
“提升和转移”应用程序: Azure 文件可以轻松地将应用程序“提升和转移”到云中,这些应用程序需要文件共享来存储文件应用程序或用户数据。Azure 文件支持“经典”提升和转移方案,其中应用程序及其数据都移动到 Azure,以及“混合”提升和转移方案,其中应用程序数据移动到 Azure 文件,并且应用程序继续在本地运行。
简化云开发:还可以通过多种方式使用 Azure 文件来简化新的云开发项目。例如: 共享应用程序设置:分布式应用程序的一个常见模式是将配置文件放在一个集中位置,可以从许多应用程序实例访问它们。应用程序实例可以通过 File REST API 加载它们的配置,并且人们可以通过在本地挂载 SMB 共享来根据需要访问它们。
诊断共享:Azure 文件共享是云应用程序写入日志、指标和故障转储的便利位置。应用程序实例可以通过文件 REST API 写入日志,开发人员可以通过在本地机器上挂载文件共享来访问它们。这带来了极大的灵活性,因为开发人员可以拥抱云开发,而不必放弃他们所知道和喜爱的任何现有工具。开发/测试/调试:当开发人员或管理员在云中的虚拟机上工作时,他们通常需要一组工具或实用程序。将此类实用程序和工具复制到每个 VM 可能是一项耗时的工作。通过在 VM 上本地安装 Azure 文件共享,开发人员和管理员可以快速访问他们的工具和实用程序,无需复制。
For the full use cases of Azure files, please checkout this article: https://docs.microsoft.com/en-us/azure/storage/files/storage-files-introduction#why-azure-files-is-useful