mirror of
https://github.com/databasus/databasus.git
synced 2026-04-06 00:32:03 +02:00
Add directConnection support for MongoDB
#123
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Ujstor on 2/18/2026
Problem
When connecting to a MongoDB replica set member exposed via a Kubernetes LoadBalancer (e.g. using
replicaSetHorizonswith the MongoDB Operator), Databasus fails with:Root cause: MongoDB replica set discovery returns internal Kubernetes FQDNs to external clients. The
replicaSetHorizonsfeature requires TLS+SNI . The MongoDB driver parameterdirectConnection=truebypasses topology discovery entirely, solving this issue.Currently there is no way to pass
directConnection=true(or any extra connection string parameters) through the Databasus UI or data model.Proposed Solution
Add a
directConnectionboolean toggle to the MongoDB connection settings under Advanced settings, alongside the existing "Use SRV connection" option.When enabled, append
&directConnection=trueto the connection URI in bothbuildConnectionURI()andBuildMongodumpURI().Use Cases