I'm going to scale an application for 100,000 users. The application was hosted in NodeJS. I have created docker images for my application and also using AWS ALB etc. My application is small and my main concern is the number of users going to hit the application. The application is taking only 600mb of memory (max) for a container. So, I used 8 t2.small (2GB RAM machine) instances and hosted 3 containers in each instance (i.e., 8 X 3 = 24 containers (3 in each container)). With this architecture, I can scale this for up to 5000 users. I can horizontally scale this for up to 100,000 users, but my concern is that What if I choose an m4.large instead of the t2.small machine that I chose.
Because instead of using 8 t2.small machines (8 X 2GB = 16GB), we can also use 2 m4.large (2 X 8GB = 16GB) machines also. And can also host 24 containers in it.
Why I chose t2.small instances was the vCPU value. Both t2.small and m4.large has 2vCPUs. So if we go for 2 m4.large machines, there will be 4vCPUs for these 24 containers. But if we go with 8 t2.small instances, we will get 16vCPUs for these 24 containers.
But, is there are any other factors that I need to consider? Any advice would be highly appreciated.