Mongodb connection from flutter basicaly watch listeners

i have a atlas account and i have flutter app now i know that 500 connection can be made on the free MongoDB atlas database but if i have 1000 users then what will happen to my app i basically trying to build a chat app where when the chat page opens i with start listening for changes to MongoDB with mongo_dart package available for flutter.

Hi @Jaiswal_Pharma,

Welcome to the MongoDB Community!

The connection limit in Atlas represents the maximum number of simultaneous connections that the mongos or mongod will accept.

The documentation also mentions other limitations that may be useful for you to be aware of. Please also note, the connection limit is per node for each cluster. Additionally, you may find the connection limits per cluster tier & class as documented here.

So you’re asking what would happen if you have 1000 users on your application server. In such a scenario, you can leverage connection pooling, where multiple client connections share a smaller number of actual connections to the database. This can help you optimize the use of your database connections.

Also, in some situations in which connections are opened but never closed can allow old connections to pile up and eventually exceed the connection limit. So, it’s recommended to keep a tab on the available metrics (specifically Connections) to see if the connections surge up instantaneously or are gradually building up.

Additionally, refer to the MongoDB Atlas - Fix Connection Issues documentation, which includes some possible ways for an immediate fix and details.

Hope this answers your questions.


i am not sure yet here is my use case again i will connect my apps directly to mongodb atlas like if i have 1000 users then they will listen for changes and based on the change i will update the ui