A.Dumas
A.Dumas

Reputation: 3297

How are the resources distributed for several replicas for docker?

I think I am just missing minor detail but it seems a documentation is little unclear to me. So the documentation states that,

If the service is replicated (which is the default), specify the number of containers that should be running at any given time.

now if use a resource limit for the service e.g.

replicas: 2
resources:
  limits:
    cpus: '0.50'
    memory: 50M

Does that imply that each replica gets 0.5 of each core or does the sum of replica get 0.5 of one core?

Upvotes: 2

Views: 624

Answers (1)

BMitch
BMitch

Reputation: 264591

The limits are applied to each replica. For the overall cluster utilization limit, you would multiply by the number of replicas.

Upvotes: 3

Related Questions