Search code examples
node.jsmongodbscaling

MongoDB Scalable setup


Hello every i already setup this.

  1. MongoDB Replica Sets with 3 members.
  2. Enable indexing
  3. Enable Oplog on my node.js app

I would like to ask other tips/guides how to optimize my mongodb. It is good way to add Members in Replica set? or add a sharding?


Solution

  • Replication is about durability and availability, not scaling. If you need to scale use sharding. Before setting up a sharded cluster several important decision should be made based on how your application operates (data model, most often requests etc.), for further reference see the documentation.