2 Major Problems with Database Servers
- What if Server shuts down (Data Availability Problem)
- What if the Server is Incapable of Handling Request or Data (Scaling Problem)
In MongoDB, Servers are basically mongod Processes. Let's say we have only one Server and it shuts down. Now, If we had two servers running from the start, one as a Primary Server and another as a Backup Server then once the Primary Server fails, we can serve up the content from Backup Server. To keep both of them in-sync, We need to keep track of all CUD(Create-Update-Delete) operations performed on Primary Server and replicate them on Backup Server as well.