docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.75k stars 1.08k forks source link

Not able to set different CPU usage limit for service on different nodes in Docker Swarm? #2886

Closed bsalunke closed 4 years ago

bsalunke commented 6 years ago

I'm trying to set the CPU usage limit for the service in the docker swarm cluster. Using following config limits: -> cpus: '0.50' in the docker swarm yaml file to set the limit for CPU usage for a particular service.

version: '3.3'
services:
  My-Service:
    image: my-regisrty/myiamge:latest
    deploy:
      mode: global  # Deploy 1 container on each node == DaemonSet
      resources:
        limits:
          cpus: '0.50'

This set the My_Service CPU usage limit to 50% on all the nodes. However I wanted to set different CPU usage limit on different swarm nodes.

Is there any option to set node specific CPU usage limit whiling deploying the service on swarm cluster?