firebase数据库战略同时连接100k +? [英] firebase database strategy for simultaneous connections of 100k+?

查看:229
本文介绍了firebase数据库战略同时连接100k +?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果你要实施一个疯狂的病毒式后台服务,每10天增长率超过40%,并且你没有超过10万个同时连接的命中率,使用Firebase处理超过100K的同时连接,可以采用什么样的工作策略? 1M? 100M? 1B !!?

解决方案

100k并发是相当多的并发连接,但对于大型应用程序来说,我们已经有了大于1MM的应用程序。

一般来说,这样做的策略涉及将数据分散到多个数据库中。如果数据是全部独立的(例如,每个用户的待办事项列表),这是非常简单的,因为您可以将开发人员分配到数据库,并且您不需要跨数据库进行同步。 $ b

只读数据(如1:N聊天)通常也非常简单,因为您可以执行相同的允许某人连接到同一数据库的N个副本中的任何一个,并且只有一个用户/作业更新他们使用相同的信息。

对于更复杂的方案(特别是1:1聊天),允许开发人员连接到任何数据库,然后使用云功能跨数据库同步数据或另一个系统可能是推荐。



如果您希望实际达到100k以上的同时满足,请随时联系我们的支持团队,获取更多关于用例的信息,我们很乐意与您合作。


If you are going to implement a firebase backend service that goes insanely viral and has a growth rate of over 40% per 10 days and you hit the quota of the blaze plan of nothing over 100,000 simultaneous connections. What kind of working strategies could be implemented with firebase for handling simultaneous connections of over 100k? 1M? 100M? 1B!!?

解决方案

100k concurrents is quite a lot of concurrent connections, but not out of the question for large apps, as we've had applications with > 1MM.

In general, the strategy for doing this involves sharding data across multiple databases. This is pretty trivial if the data is all independent (e.g. per user todo list), since you can assign a developer to a database and you never have to sync across databases.

Read only data (such as 1:N chat) is generally also pretty straightforward, as you can perform the same "allow someone to connect to any of N copies of the same database", and have a single user/job update all of them with the same information.

For more complicated schemes (particularly 1:1 chat), allowing developers to connect to any database, then syncing data across databases using Cloud Functions or another system is probably recommended.

If you're expecting to realistically hit 100k+ concurrents, feel free to reach out to our support team with more info on the use case and we're happy to work with you.

这篇关于firebase数据库战略同时连接100k +?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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