Scale MongoDB with AWS

Description

I am inexperienced with MongoDB, I know little.

I use Mongodb with Rocket.Chat

I have an AWS instance running Rocket.Chat and MongoDB at the same time locally.

I know that if I want to scale Rocket.Chat to be able to support more traffic, I only have to activate autoscaling, if the CPU is filled to 60%, new copies of the same instance are created, I know how to do that, my question is: what will happen to the database?

Let’s say that I duplicate my instance, I suppose that if I send a message it will be sent in one instance, it will not be duplicated in both, right?

Is there a way for me to keep many moingodb DB instances connected?

Server Setup Information

  • Version of Rocket.Chat Server: 4.7.4
  • Operating System: Ubuntu 20.04
  • Deployment Method: AWS Marketplace: Rocket.Chat Server
  • Number of Running Instances: 1
  • NodeJS Version: 14.18.3 - x64
  • MongoDB Version: 5.0.9
  • MongoDB Engine: wiredTiger

Hi!

Have you seen this doc? It’s probably what you want for scaling MONGODB:

1 Like

I understand the basics of MongoDB. So I will appreciate any kind of information.

What I want is to scale my database with multiple servers. It’s possible? Because if I have only one server, it has a capacity limit. What do you recommend me to do?

I know about replicas, but they’re so you don’t lose data on an instance, it doesn’t allow you to scale the database, does it?

Discussion continued here: Rocket.Chat

:slight_smile: