AppController/djinn.rb
# Adds or removes AppServers within a node based on the number of requests
# that each application has received as well as the number of requests that
# are sitting in haproxy's queue, waiting to be served.
Adds or removes AppServers within a node based on the number of requests
that each application has received as well as the number of requests that
are sitting in haproxy's queue, waiting to be served.
Adds or removes AppServers within a node based on the number of requests that each application has received as well as the number of requests that are sitting in haproxy ' s queue waiting to be served .
def scale_appservers_within_nodes
    @apps_loaded.each { |app_name|
      next if app_name == "none"
      initialize_scaling_info_for_app(app_name)
      case get_scaling_info_for_app(app_name)
      when :scale_up
        Djinn.log_debug("Considering scaling up app #{app_name}.")
        try_to_scale_up(app_name)
      when :scale_down
        Djinn.log_debug("Considering scaling down app #{app_name}.")
        try_to_scale_down(app_name)
      else
        Djinn.log_debug("Not scaling app #{app_name} up or down right now.")
      end
    }
  end
def scale_appservers_within_nodes @apps_loaded . each { | app_name | next if app_name == "none" initialize_scaling_info_for_app ( app_name ) case get_scaling_info_for_app ( app_name ) when :scale_up Djinn . log_debug ( "Considering scaling up app #{app_name}." ) try_to_scale_up ( app_name ) when :scale_down Djinn . log_debug ( "Considering scaling down app #{app_name}." ) try_to_scale_down ( app_name ) else Djinn . log_debug ( "Not scaling app #{app_name} up or down right now." ) end } end
Adds or removes AppServers within a node based on the number of requests
that each application has received as well as the number of requests that
are sitting in haproxy's queue, waiting to be served.
Adds or removes AppServers within a node based on the number of requests that each application has received as well as the number of requests that are sitting in haproxy ' s queue waiting to be served .
# Always get scaling info, as that will send this info to the # AppDashboard for users to view.