Search code examples
amazon-web-servicesamazon-ec2microservicesamazon-ecs

How many tasks a single t3.micro instance can handle?


I started to work with microservices and I have some questions about using ECS. My application has about 15 microservices, some of them are CRUDS and some of them connects to a client throught webservices to make some calls. Data will be storaged in RDS and S3s.

My question is how to have an idea about the number of tasks to run in a single instance? We would like to have an idea about the cost before starting the project.

So, is it possible based on this information have an ideia how many tasks a single t3.micro can handle? there is a minimum value needed for task memory and CPU units?


Solution

  • Its very difficult to say, as it depends on how CPU intensive and memory hungry are your containers.

    Nevertheless, keep in mind that t3.micro has 2 vCPU and 1.0 GB of memory.

    The absolute minimum memory per container is 4 MB:

    The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 MiB of memory for your containers.

    However, ECS console recommends between 300 MB and 500 MB per container:

    enter image description here

    So by following the recommendation with 1 GB of RAM on t3.micro, you could possibly accommodate 2 or 3 containers.

    But as usual with performance. You start small and if your are not satisfied with performance you scale vertically or horizontally your application.