How to have single connection for each device in MongoDB Atlas?

谁都会走 提交于 2021-01-29 22:12:40

问题


I have an Android that uses firebase for authentication and MongoDb as a backend, I'm currently on the M0 cluster where the connection limit is 500. I use the Stitch API. When I use app from my device the number of connections increases from 4 to 8. I think initial 4 connections are by default so I don't mind that but I'm really concerned about such a jump in number of connections from a single device. PS. I tried having StitchAppClient and RemoteMongoClient in common class, so that there would be a single instance, but that too didn't work.

I'm attaching the connection graph below, please help.

来源:https://stackoverflow.com/questions/63471878/how-to-have-single-connection-for-each-device-in-mongodb-atlas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!