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

98 Views Asked by At

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.enter image description here

0

There are 0 best solutions below