【问题标题】:Cloud Firestore limit 8 millions writes per day on single documentCloud Firestore 限制单个文档每天写入 800 万次
【发布时间】:2018-11-12 09:33:59
【问题描述】:

许多实时应用程序都有充当计数器的文档。例如,您可以计算帖子上的“喜欢”或视频的访问次数。

根据我使用 Cloud Firestore 的计算,这个值每天增长不会超过 800 万

使用 Cloud Firestore 和分布式计数器,我(最多)可以拥有:

1 write/second * 100 == 100 writes per second.

1 day = 86.400 seconds

86.400 * 100 = 8.640.000

( 100 : 限制子集合的最大深度)

对于有很多用户的应用程序,如何超出此限制?

谢谢你

【问题讨论】:

  • 你也可以看看我这个post的回答的最后一部分。

标签: firebase firebase-realtime-database google-cloud-firestore


【解决方案1】:

the documentation 中解释了建议的解决方案。您可以在多个文档之间分片计数器。

或者,您可以使用其他一些没有与 Firestore 相同的写入限制的存储机制(例如实时数据库)。

【讨论】:

  • 嗨,Doug,仅在 Realtime DB 中保留“计数”而在 Firestore 中保留我们的其余 DB 是否有任何缺点?
猜你喜欢
  • 2018-03-19
  • 1970-01-01
  • 1970-01-01
  • 2021-10-12
  • 2020-06-14
  • 1970-01-01
  • 1970-01-01
  • 2018-08-24
  • 2017-12-22
相关资源
最近更新 更多