I have an Elastic Beanstalk autoscaling architecture that queries a 3 node mongodb cloudformation stack.
Elastic Beanstalk |
server1
server2 (autoscaled clone of server1)
server3 (autoscaled clone of server1)
mongodb CloudFormation |
replicanode0
replicanode1
replicanode2
Each ec2 box in the mongo stack has a different IP address. When I deploy the node app on the elastic beanstalk I give it the IP address of replicaNode0.
But how do they access the other nodes? Do I have to create a load balancer between the server stack and the DB stack? Or does Mongo just do this magically?