by Spencer Nguyen • April 1, 2022
We’re happy to announce that DreamFactory version 4.11 has been released. With this release, we’ve added native support for MongoDB databases.
When using replica sets with MongoDb, the client has to specify at least one replica set (or may include several) when connecting. This in turn allows us to connect to a replica set even if one of the nodes that we ask for is unavailable.
Previously in DreamFactory this meant that we could end up with a very large connection string, and we would also need to specify the ssl and replicaSet options. For example, the connection string and options when connecting to a MongoDB Atlas dataset would look like this:
Quite the mouthful!
In DreamFactory 4.11.0 we have added connectivity support with mongodb for srv. The SRV record identifies all the nodes associated with the cluster (and their port numbers) and an associated TXT record defines the options for the URI.
If you have configured your Mongodb cluster in this way, or are you using their cloud solution, Atlas, you can now use the mongodb+srv:// prefix in your connection string. So the configuration to connect to the same MongoDb Atlas cluster above now looks like this:
A little nicer!
Sign up for our free 14 day hosted trial to learn how.
If you are interested in trying the latest DreamFactory features, or want to see how DreamFactory can help you set up your own fully documented, secure REST APIs, start your free trial!
DreamFactory Version 4.10.2 has been Released!
Join the DreamFactory newsletter list.