AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

AWS ELB with 3 Availability Zone – MongoDB Replication


I am planning to use my own VPN with 3 availability zones with elastic load balancer (ELB). Each available zone configured as public subnet for app server and private subnet for MongoDB server. 

my question is, in case of one of the availability zone not available/not healthy, then entire architecture operates with 2 availability zones using ELB. so how MongoDB server (in private subnet) of other availability zones data replication accomplished ? Does ELB automatically ensure data replication of all MongoDB instances across 3 availability zones?


Sreedhar Y

2 Answers

Hi Sreedhar,

If you are using MongoDB installed on EC2 for example, you’re responsible for replicating across all three AZ’s.  That replication must take place at the MongoDB service level and would not be handled by the ELB.   The ELB just distributes inbound traffic across the three instances with the normal intention of leveling the load.

If you happen to use DocumentDB (with MongoDB compatiblity), then cross-AZ replication is completely handled for you automatically.


Sreedhar Y

Thanks Scott, I got clarified now..

Yes. its answered my question..

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?