-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to a mongo cluster which address is behind a haproxy. #478
Comments
Oh, I got the reason, it seems that the driver doesn't support mongodb older than 3.6..... A little curious about why ? It seems that many other drivers support mongodb 3.2+.. |
Hi @WindSoilder! The Rust driver is the newest MongoDB driver, and only did our 1.0 release a little over a year ago. From a development perspective, the effort to support server versions both < 3.6 and 3.6+ at once is quite significant due to changes that occurred in 3.6 in how drivers interact with the underlying MongoDB server via the wire protocol, as well as the introduction of sessions support in MongoDB 3.6. I would also note that at the time of our 1.0 release all MongoDB versions < 3.6 had already reached end-of-life. (see: https://www.mongodb.com/support-policy/lifecycles). Given that, we made the choice to only support 3.6+ and instead focus our development efforts on adding support for newer MongoDB features (e.g. sessions, transactions) along with making the driver performant and addressing the needs of Rust developers through e.g. Serde integration, supporting multiple async runtimes, etc. |
Oh, I get it, thanks for your detailed explanation, I think it can be closed :-) Thank you. |
Reproducing code:
When I'm trying to find, it returns an error:
Using pymongo or mongo shell doesn't have this problem:
The address of mongodb is a haproxy to real mongodb address. When the ip is not behind a ha proxy, the code works fine.
Database version: 3.2.22
It also seems that the expected tpoplogy type is single:
The text was updated successfully, but these errors were encountered: