Applying Replication
One of the most critical aspects of high-performance databases is replication. Replication is the process of defining multiple MongoDB servers that have the same data. The MongoDB servers in the replica set will be one of three types, as illustrated in Figure 17.1:
Primary: The primary server is the only server in a replica set that can be written to. This way, the primary server can ensure the data integrity during write operations. A replica set can have only one primary server.
Secondary: A secondary server contains a duplicate ...
Get Node.js, MongoDB, and AngularJS Web Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.