Azure的使用文件共享共享从IIS虚拟机的照片? [英] Azure sharing photos from IIS VMs using a file share?

查看:137
本文介绍了Azure的使用文件共享共享从IIS虚拟机的照片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能创建可在虚拟机中运行的Web服务器共享直接访问Azure中Blob存储的文件共享?

我感动写在.NET 1.1天青虚拟机现有的N层应用程序的网站

这是一个遗留应用程序,我想移动它目前的形式天青然后慢慢修改code在以后的时间采取的云类型的服务优势。

应用目前分布在4个服务器分割:

1个SQL数据库服务器

2×IIS(通过循环DNS负载均衡)应用程序的Web服务器

1个IIS Web服务器的照片(主机数百万用户上传的照片)

相片服务器是一个怪物机RAID 10阵列12硬盘。

用户可以上传其经由所述网络服务器传送到使用一个简单的文件共享照片服务器的照片。例如:

  \\\\ PhotoServer1 \\的UserData \\照片\\

文件共享可能会装载在Z:\\ 2 Web服务器上的驱动器和他们没有问题读,通过共享文件写入到照片服务器

照片服务器同时也作为一个IIS Web服务器和用于承载的文件。例如:

  http://photos.mysite.com/userdata/photos/234/234photo.jpeg


我可以在SQL Server和IIS Web服务器很容易迁移到虚拟机在Azure上。

但我努力理解我怎么能实现在其目前形式的文件/网络照片服务器。

我想设置一个文件共享Web服务器上,然后读/写/通过Web服务器中删除照片的虚拟机。

我可以简单地安装另一台虚拟机的文件/ Web服务器,但它是一个繁忙的机器,我需要创建驱动器的RAID阵列,它看起来毫无意义的Azure存储已经这样做对自己一致的。

我不能让我的头周围的Blob存储,我知道它不是一个硬盘驱动器,但它会很方便的把它看作对遗留应用程序,尤其是服务器之间共享。

问题:


  1. 我怎样才能创建可在虚拟机中运行的Web服务器共享直接访问Azure中Blob存储的文件共享?


  2. 如果我做存储在Blob存储的一切,我还需要一个IIS服务器托管的文件,如果是这样就这样还可以通过文件共享安装到IIS?



解决方案

Azure存储有您可以考虑来解决问题两个潜在的服务 - 的Azure Blob和Azure的文件。正如大卫在他的回答中提到,Azure的文件服务的设计看起来就像一个标准的文件共享,只要你从一个虚拟机访问它在云中。您可以在一个或多个虚拟机上的共享和访问它就像你的本地文件共享。大卫发布的链接是一个很好的起点,<一个href=\"http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx,在此还看到:<一href=\"http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/27/persisting-connections-to-microsoft-azure-files.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/27/persisting-connections-to-microsoft-azure-files.aspx.

Blob存储是一个有点像一个文件系统,而是存储在云端,并通过REST API的访问。对于Blob存储的code /基于实例的概述,建议下的http://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/.如果你使用Blob存储的,你可以有客户端直接访问的斑点,这取决于您的身份验证需求。 Blob存储支持三种认证方式 - 无名氏(任何人都可以访问),共享密钥(必须有您的存储账户键进入,占重点给出了存储账户的一切完全访问)和SAS(共享访问签名,在可以访问blob和容器级别)。 SAS往往是一个不错的选择,并删除需要有托管的文件服务器,但客户确实需要一种方法来访问SAS令牌。请参见 http://msdn.microsoft.com/en-us/library/天蓝色/ hh225339.aspx 一个身份验证概述。

注意BLOB和文件服务是分开的,你不能从另一个访问数据。

How can I create a file share that can be shared across web servers running in a VM to directly access the blob storage in Azure?

I am moving an existing n-tier website application written in .net 1.1 to Azure Virtual Machines.

This is a legacy application, I want to move it to azure in its current form then slowly make changes to code to take advantages of the cloud type services at a later time.

The application is currently split across 4 servers:

1 x SQL Database Server

2 x IIS Web server for application (load balanced via round robin dns)

1 x IIS Web Server for photos (hosts millions of user uploaded photos)

The photo server is a monster machine with a RAID 10 array of 12 HDD.

Users can upload photos which are transferred via the web servers to the photo server using a simple file share. Eg:

\\PhotoServer1\UserData\Photos\

The file share is mounted as the Z:\ drive on the 2 web servers and they have no problem reading and writing files to the photo server via the share.

The photo server also acts as an IIS web server and is used to host the files. Eg:

http://photos.mysite.com/userdata/photos/234/234photo.jpeg


I can easily move the SQL server and the IIS web servers to Virtual Machines on Azure.

But I am struggling to understand how I can implement the file/web photo server in its current form.

I want to setup a file share on the web servers and then read/write/delete photos via the web server VMs.

I could simply setup another VM for the file/web server but it is a busy machine and I would need to create a RAID array of drives which seems pointless as the Azure storage already does this on its own accord.

I cant get my head around the blob storage, I know its not a Hard Drive, but it would be handy to treat it as such for legacy applications and especially share it between servers.

Questions:

  1. How can I create a file share that can be shared across web servers running in a VM to directly access the blob storage in Azure?

  2. If I do store everything in blob storage, do I still need an IIS server to host the files, if so would this also be mounted to IIS via a fileshare?

解决方案

Azure Storage has two potential services you can consider to solve your problem – Azure Blobs and Azure Files.  As David mentions in his answer, the Azure File Service is designed to look exactly like a standard file share, as long as you access it from a VM in the cloud.  You can mount the share in one or more VM’s and access it just as you would a local file share. The link that David posted is a good starting place, http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx, also see here: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/27/persisting-connections-to-microsoft-azure-files.aspx.

Blob storage is a bit like a file system, but stored in the cloud and accessed through REST APIs.  For a code/example-based overview of blob storage, I recommend the code samples under http://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/.  If you make use of blob storage, you could have clients access the blobs directly, depending on your authentication needs.  Blob storage supports three types of authentication – Anonymous (anyone can access), Shared Key (must have your storage account key to access, account key gives complete access to everything in the storage account), and SAS (Shared Access Signature, gives access at the blob or container level).  SAS is often a good choice, and remove the need to have a server hosting the files, although clients do need a way to access the SAS token.  See http://msdn.microsoft.com/en-us/library/azure/hh225339.aspx for an authentication overview.

Note that the blob and file services are separate, you can't access data in one from the other.

这篇关于Azure的使用文件共享共享从IIS虚拟机的照片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆