Hello, I have set up a MongoDB replica set in Azure using Bitnami template and I am very happy about the ease of deployment. My replica set contains 3 virtual machines with replicas and no arbiters. After deployment I performed a little test - turned off the primary virtual machine to see the magic of automatic switch happen... and it didn't. Public ip address was still assigned to the turned off virtual machine. When I manually reassigned it to new primary - it started to work. Could you tell me if it is a normal behavior or I have some problems with configuration?
That is the normal behaviour of the application. We configured the virtual machine like this for security purposes.
Here you have more information about connecting an application to the MongoDB database and configuring public IP's for all the nodes. But from our perspective, this is not recommended.
Hi dbarranco,Thank you for response.I have created two additional public IP addresses, assigned them to secondary nodes and put 3 DNS names to the connection string. Could you describe what security issues can I get with this approach?
We only expose the IP of the master node to not to expose the secondary nodes publicly but please note that we configure all the nodes of the cluster with security in mind (User / Password, disable anonymous access, ... ) so you can use that new configuration.
Thank you for reply, I will stick with current configuration:)
A post was split to a new topic: MongoDB replica set issue when adding nodes