elixir-mongodb-driver icon indicating copy to clipboard operation
elixir-mongodb-driver copied to clipboard

LoadBalanced topology type

Open andrew-ko opened this issue 2 years ago • 9 comments

Hi, thanks for your work!

Please consider to add support of "LoadBalanced" topology https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#topologytype-loadbalanced

Currently it's unable to connect to MongoDB Atlas with this error:

(Mongo.Error) The server is being accessed through a load balancer, but this driver does not have load balancing enabled 354

As I know officially supported drivers only need load_balanced: true option in this case.

andrew-ko avatar May 17 '23 12:05 andrew-ko

Unfortunately I didn't have the possibility to use a load balancer configuration. There is some work to do to support load balancer. For example the monitoring changes in the case of a load balancer.

zookzook avatar May 18 '23 11:05 zookzook

Is there a workaround? (to connect to atlas)

dvic avatar Jul 10 '23 09:07 dvic

By the way @andrew-ko, not sure if you are aware, but the regular deployment type (not serverless) seems to work, I only have the issue with the serverless deployment

dvic avatar Jul 10 '23 09:07 dvic

No progress so far, I need an environment using a load balancer. There are some changes mentioned in the specifications when using a load balancer.

zookzook avatar Jul 15 '23 07:07 zookzook

You may create a free MongoDB Atlas account at https://www.mongodb.com/cloud/atlas/register

Once your new MongoDB Atlas account is created you can refer to the Java setup instructions to get the connection URL and user and password to make tests.

Please, if you need further details or if the free account is not enough, let us know and we can coordinate some viable good alternatives.

By the way, thank you very much for your project and your code, it's very cool, at my company we can use it with our in-house dedicated servers correctly.

csaltos avatar Nov 29 '23 16:11 csaltos