Choosing right ec2 instance type for Mongodb with sharded cluster configuration

amazon-web-servicesclustermongodbperformance

I am designing a MongoDB sharded cluster in AWS. Now MongoDB recommends C4,M4 or D2 instance types with provisioned IOPS ebs volumes to be used with MongoDB. Initially, I chose to use two configuration server replica set with 2 sharded clusters. Each sharded cluster contains 20 Gb of primary and secondary replica set. And the two application servers with MongoDB will run behind a load balancer.

My question is can I use the general purpose instance types like t3 as the application server (which will run MongoDB) or the configuration servers? Will it create performance issues? As I understand the load in the configuration server will be relatively low.

Best Answer

Without knowing your load patterns it’s impossible to tell what instance size you should use. Go ahead with an instance type that you think should work, even if it’s T3, monitor its CPU load, monitor the volumes I/O load, and if you find that it’s overloaded upgrade it.

Changing an instance type is easy - stop / change / start.

To change disk from gp2 to provisioned iops you will have to make a snapshot first I believe.

So start with some configuration, monitor, adjust, repeat.

Hope that helps :)