Windows Azure多租户 [英] Windows Azure Multi Tenancy

查看:110
本文介绍了Windows Azure多租户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在启动一个新的企业Web应用程序.它将托管在Windows Azure上,并且是与SQL数据库通信的asp.net MVC应用程序.

I am starting a new enterprise web application. It will be hosted up on Windows Azure and will be an asp.net MVC application talking to an SQL database.

我的问题与多租户及其实现的正确方法有关.过去,我通过拥有一个租户表并在每个表中放置一个TenantID列来创建一个多租户应用程序.这很好用(但是它只是规模较小,因此它并没有真正发挥作用到n级).研究Azure上的多租户内容,似乎不建议采用这种方式.他们谈论子域,拆分租户等.在我看来,这就像是管理方面的噩梦.我希望用户访问一个网站,输入他们的租户登录详细信息,然后他们就关闭了.

My question relates to multi-tenancy and the correct way to accomplish it. In the past I've created a multi-tenant application by having a tenant table and than putting a TenantID column in every table. This worked fine (but it was only on a smaller scale so it didn't really exercise it to the nth degree). Looking into the multi-tenant stuff on Azure, it doesn't seem to recommend this way. They talk about subdomain, splitting tenants etc. To me, that just seems like a management nightmare. I would like the user to hit a website, enter their tenant login details and boom they are off.

  1. 是否有一种更简单的方法在Azure中实现多租户,仍然允许我使用Azure的可伸缩性优势?
  2. 我应该只使用简单的TenantID方法吗? Azure框架是否仍可以很好地扩展以适合?
  3. 我应该担心一开始的租约还是将其留到最后?

需要咨询.

谢谢

推荐答案

我在Azure上都做到了这两种方式.我已经按照您以前做过的方式完成了工作,他们在登录时输入了租户代码,而且效果很好,我认为没有任何理由做不同的事情.您可以使用SQL Azure联合身份管理租户,以便可以轻松拥有多个数据库以实现可伸缩性.

I have done it both ways on Azure. I have done it the way you have done previously where they enter in a tenant code upon logging in and this works fine, I don't see any reason to do differently. You can use SQL Azure federations to manage the tenants so you can have multiple databases easily for scalability.

然后,我还使用了子域方法来标识租户,但所做的只是将子域映射到租户代码.我在无需登录的系统中使用了此功能,因此对用户来说更容易.

I have then also used the subdomains approach to identity the tenant, but all it did was map the subdomain to a tenant code. I used this in a system where they didn't have to log on so it was easier for the user.

一开始只为设计数据库来应对它而担心.

Worry about it at the start if only to design the database to cope with it.

这篇关于Windows Azure多租户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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