Azure的DocumentDB多租户架构 [英] Azure DocumentDB Multi-Tenant Architecture

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

问题描述

我一直preVIEW在实施DocumentDB成多tenent系统。我的计划已经产生DocumentDB帐户下一个新的数据库为签约每个租户。其中大部分code是已经到位,测试会非常好。

I've been implementing DocumentDB during preview into a multi-tenent system. My plan has been to generate a new database under the DocumentDB account for each tenant that signs up. Most of this code is already in place and the testing is going extremely well.

由于DocumentDB已经正式发布,并在文件定稿我读到每DocumentDB账户100个数据库的限制,它让我停下来重新思考自己的架构。

Since DocumentDB has been officially released and the documentation is finalized I read about the 100 database limit per DocumentDB account and it made me stop to rethink my architecture.

我想保持我的租户隔离,从而删除帐户会很容易,而且它的组织将是非常干净的。租户之间的数据不需要进行交互,以便保持它分开不会是一个问题。

I wanted to keep my tenants isolated so that deleting accounts would be easy, and the organization of it would be very clean. Data between tenants do not need to interact so keeping it separated would not be an issue.

我的问题:

由于我的目标是让这个规模达数万甚至数十万住户,我需要考虑不同的体系结构,由于DocumentDB限制和/或成本?

Since my goal is to make this scale up to tens or even hundreds of thousands of tenants, do I need to consider a different architecture due to DocumentDB limitations and/or cost?

这是否意味着我需要在多个DocumentDB账户每100个账户分片?

Does this mean I need to shard every 100 accounts across multiple DocumentDB accounts?

根据微软的100个数据库的限制只是一个可以根据要求进行调整了软限制,但它可以上去,如果需要的100,000+?如果我得到什么更多的帐户注册的预期,我打我的生产可能会失去客户限制?

According to Microsoft the limit of 100 databases is just a soft limit that can be scaled up upon request, but can it go up to 100,000+ if needed? What if I get more account sign-ups that expected and I hit my limits in production potentially losing clients?

这是否限制的一种方式,从以这种方式有很好的理由,我应该考虑分区租户阻止开发商存在吗?

Does this limitation exist as a way to deter developers from partitioning tenants in this fashion for good reason that I should be considering?

推荐答案

有作为一个尺寸适合所有人的答案没有这样的东西,当涉及到分区/分片租户的数据。通常情况下,你如何划分数据取决于应用程序的查询模式,以及每个租户的资源需求(在存储和吞吐量方面)。只需记住,集合是进行交易和查询边界DocumentDB的单位。

There's no such thing as a one-size-fits-all answer when it comes to partitioning / sharding tenant data. Generally, how you partition data depends on your application's query patterns as well as the resource requirements per tenant (in terms of both storage and throughput). Just keep in mind that collections are DocumentDB's unit of boundary for transactions and queries.

退房的博客文章在上面的评论中提及user272735:<一href=\"http://azure.microsoft.com/blog/2014/12/03/scaling-a-multi-tenant-application-with-azure-documentdb-2/\"相对=nofollow>缩放与天青DocumentDB 一个多租户应用程序。这是一个伟大的阅读。

Check out the blog post as user272735 mentioned in the comment above: Scaling a Multi-Tenant Application with Azure DocumentDB. It's a great read.

如果你需要一些更多的1:放宽您的特定方案或数据库/数据收集限制1指导,随时andrl来ping我在{} microsoft.com

If you need to some more 1:1 guidance for your particular scenario or database/collection limits relaxed, feel free to ping me at andrl {at} microsoft.com.

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

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