Uploaded image for project: 'BrownDog'
  1. BrownDog
  2. BD-1582

Scale services in swarm based on RabbitMQ queues

XMLWordPrintableJSON

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Normal Normal
    • Milestone 5: Beta Release
    • None
    • None
    • None
    • Brown Dog - April 1 Sprint, Brown Dog - April/May, Brown Dog - 2017 May 2, Brown Dog - 2017 June Sprint 1

      Given the length of the rabbitmq queues we should scale the number of replicas of a service in the swarm. This could be in pseudo code:

      sizing = 100
      jitter = 20
      foreach queue in rabbitmq:
        get messagecount from rabbitmq
        find service in docker swarm
        if messagecount > (service.replicas * sizing + jitter):
          # scale up 
          services.replicas = messagecount / sizing
        elif messagecount < (service.replicas * sizing - jitter):
          # scale down
          service.replicas = messagecount / sizing
       

      Pull request; https://opensource.ncsa.illinois.edu/bitbucket/projects/BD/repos/bd-swarm/pull-requests/2/overview

       

              bing Bing Zhang
              bing Bing Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 day Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d