Scaling microservices using Docker

Viewed 970

I've created a Node.js (Meteor) application and I'm looking at strategies to handle scaling in the future. I've designed my application as a set of microservices, and I'm now considering implementing this in production.

What I'd like to do however is have many microservices running on one server instance to maximise resource usage whilst they are using a small number of resources. I know containers are useful for this, but I'm curious if there's a way to create a dynamically scaling set of containers where I can:

  • Write commands such as "provision another app container on this server if the containers running this app reach > 80% CPU/other limiting metrics",
  • Provision and prepare other servers if needed for extra containers,
  • Load balance connections between these containers (and does this affect server load balancing, e.g., send less connections to servers with fewer containers?)

I've looked into AWS EC2, Docker Compose and nginx, but I'm uncertain if I'm going in the right direction.

3 Answers

We are using AWS to host our miroservices application, and using ECS (AWS docker service) to containerize the different API.

And in this context, we use AWS auto scaling feature to manage the scale in and scale out. Check this.

Hope it helps.

Related