是什么是firebase数据库连接?
我正在研究iOS的功能,我们想查询firebase实时数据库,该数据库仅更新一次。我看到有200k同时连接的限制(对于大火计划)。我的问题是:什么是主动连接?
例如,如果我们使用.observe()
方法创建一个观察结果,那么这是否意味着1连接,只要我们要观察? 以及使用.getData()
的“一击”提取呢?完成后是否关闭连接?
实际上,我们对长期观察的活力并不感兴趣,因为数据仅每周只会变化一次。
I'm working on a feature on iOS for which we want to query a Firebase realtime database, which only updates about once a week. I saw there is a limit of 200k simultaneous connections (for the Blaze plan). My question is: what counts as an active connection?
For example, if we create an observation using the .observe()
method, does that mean 1 connection as long as we are observing?
And what about a 'one shot' fetch, using .getData()
. Does this close the connection after completion?
We're not actually interested in keeping an observation alive for a long time, as data only changes about once a week.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从经常询问的问题:
SDK首次尝试从(或将数据写入)访问数据库的数据时连接到服务器。只要客户有一个主动的侦听器(在您的情况下, )或直到上次读取或写入操作后约5分钟,该连接就保持打开状态。
您还可以通过调用 <代码> gooffline 和
goonline
在您的代码中。From the frequently asked questions:
The SDK connects to the server the first time that you try to access data from (or write data to) the database. The connection stays open for as long as the client has an active listener (so
observe
in your case) or until about 5 minutes after the last read or write operation.You can also explicitly control the connection by calling
goOffline
andgoOnline
in your code.