单个文档的风险包含数千个小物体的十几个阵列
当许多用户在线时,可以在单个文档中断上写操作吗?
将有〜12个这样的阵列,每个数组都有数万个这样的对象。写操作将是:
- 基于货币和活动的现有对象的计数字段的增量(
- )
- +1 :增量(-1)或价格变化。
注意:所有数据均在单个页面上立即显示。
stayCount [
{price: "15", count: 2, country: "USA", currency: "USD"},
{price: "15, count: 3, country: "UAE", currency: AED},
{price: "25", count: 5, country: "USA", currency: USD}
]
sportsCount [
{price: "15", count: 1, country: "Germany", currency: EUR},
{price: "49, count: 6, country: "UAE", currency: AED},
{price: "49", count: 8, country: "France", currency: EUR}
]
询问每第二个规则每个文档的最大写入。
Can the write operations on a single doc break when many users are online?
There will be ~12 such arrays, each with tens of thousands of such objects. Write operations would be:
- increment(+1) for the count field of existing objects based on currency and activity (stay, sports...),
- add an entire new object when it's a new currency and country,
- update an existing object, eg: increment(-1) or price change.
Note: all data is displayed at once on a single page.
stayCount [
{price: "15", count: 2, country: "USA", currency: "USD"},
{price: "15, count: 3, country: "UAE", currency: AED},
{price: "25", count: 5, country: "USA", currency: USD}
]
sportsCount [
{price: "15", count: 1, country: "Germany", currency: EUR},
{price: "49, count: 6, country: "UAE", currency: AED},
{price: "49", count: 8, country: "France", currency: EUR}
]
Asking because of the one write max per Doc per second rule.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论