我正在构建一个用azure托管的asp.net Web应用程序。我决定使用文件系统来存储图像而不是数据库,图像路径存储在数据库中。图像由用户添加,他们可以一次添加很多,最多100个。
我的问题是,图像文件系统存储的限制是什么?目前,它们都只是存储在一个目录中。最终,单个目录中将有数千个(可能是数十万个)图像。当这些图像嵌入页面时,这会对性能产生巨大影响吗?没有图像大于1 mb。制作子目录会更好吗?
答案 0 :(得分:2)
I strongly recommand to use Azure Blob storage to store file which is the best way to store static content in Azure.
And, if you have to scale your application in the future (web farm, azure web app or whatever that has more than one VM instance), storing files on the server is not a best practice.
You can find some "best practices" about static content like images on this page: https://msdn.microsoft.com/en-us/library/dn589776.aspx
And the Azure Storage documentation that will help you to get started: https://azure.microsoft.com/en-us/documentation/services/storage/
Hope this helps,
Julien