无限集合中每个分区键的存储限制 [英] Storage limit per partition key in an unlimited collection

查看:68
本文介绍了无限集合中每个分区键的存储限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个名为"追随者"的集合,其中的典型数据结构如下:

Assume that I have a collection named `Followers`, and typical data in it is structured like this:

" ; FollowedUserId" (Guid,收集分区键)

"FollowedUserId" (Guid, partition key for collection)

" FollowingUserId" (Guid)

"FollowingUserId" (Guid)

CreatedOn(DateTime)

CreatedOn (DateTime)

如果受欢迎的用户收到如此多的后续内容,例如5000万,会发生什么?我记得在StackOverflow上读到每个逻辑分区限制为10GB的数据。对于无限的收藏,这是真的吗?我还看到Azure将数据拆分为多个
分区,我们不必担心这个限制。那么,哪一个是正确的?我可以安全地添加尽可能多的记录而不会在某些时候出现限制到达的错误吗?

What happens if a popular user receives so many follows, say, 50 million? I remember reading on StackOverflow that each logical partition is limited to 10GB of data. Is this true for unlimited collections? I have also read that the data is split into multiple partitions by Azure, and we don't have to worry about this limit. So, which one is correct? Is it safe for me to keep adding as many records as I want without getting a limit-reached error at some point?

推荐答案

10 GB限制仅适用于固定大小的容器。

The 10 GB limit applies only for Fixed-Size containers.

您也可以选择创建无限容器。

You have the option of creating unlimited containers as well.

要创建无限容器,您必须指定分区键和最小吞吐量1,000 RU / s。目前,我们有10K RU / 10GB的比率,这可能会在未来发生变化。



逻辑分区中的数据必须驻留在物理分区中,直到物理分区到达它的存储限制。然后分区自动分割。



分区是一个内部概念,是暂时的。 Cosmos DB将在您的存储增长时自动扩展分区,而无需您执行任何操作。设计正确的做法是考虑正确的分区键。

To create a container as unlimited, you must specify a partition key and a minimum throughput of 1,000 RU/s. Currently, we have this 10K RU/10GB ratio, and this might change in future.

Data in a logical partition must reside in a physical partition until the physical partition reaches its storage limit. Then the partitions are split automatically.

Partitions are an internal concept and are transient. Cosmos DB will automatically scale partitions as your storage grows without any action from you. The right thing to do for design is to think about the right partition key.

如果您有其他问题,请告诉我们。

Please let us know if you have further questions.

-

如果上述答案有用,请点击"标记为答案"或"向上投票",这可能对其他社区成员阅读有益这个帖子。 

If the above answers were helpful, click "Mark as Answer" or "Up-Vote", which might be beneficial to other community members reading this thread. 


这篇关于无限集合中每个分区键的存储限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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