Home > OS >  large number of docker containers and aws resources
large number of docker containers and aws resources

Time:09-09

My application allow users to create multiple nodered instances using docker containers , each docker container handle one instance , the number of containers could reach 65000 container , so:

how can i configure host resources to handle that number of containers if my host memory is 16 gb how to check if it can handle all those instances

if No should i increase memroy size or should i create another instance (aws instance) and use it

CodePudding user response:

You don't, 16GB / 65000 = 0.25mb per container, there is no way a NodeJS process will start, run and do anything useful. So you are never going to run 65000 containers on a single machine.

As I said in the comment on your previous question, you need to spend some time running tests and determine how much memory/CPU your typical use case will need and you then set resource limits on the container when started to limit it to those values. How to set resource limits are in the Docker docs

If your work load is variable then you may need to have different sizes of container depending on the workload.

You then do the basic maths that is CPU in the box/ %CPU per container and memory in the box / memory per container and which ever is the smaller number is the max number of containers you can run. (You will also need to include some overhead for monitoring/management and other house keeping tasks)

It's up to you to decide what approach to sizing/choosing cloud infrastructure to support that work load and what will be economically viable.

(or you could outsource this to people that have already done a bunch of this e.g. FlowForge inc [full disclosure, I am lead developer at FlowForge])

  • Related