Skip to content

Minimum number of AppServers should be a constant #22

@shatterednirvana

Description

@shatterednirvana

Right now we assume that the minimum number of AppServers per node should be 1, but to support use cases where this isn't the case, we should extract it to a class constant in appscale/AppController/djinn.rb. In particular, the below code should be changed to replace all instances of 1 with the new constant.

    if time_since_last_decision > SCALEDOWN_TIME_THRESHOLD and
      !@app_info_map[app_name][:appengine].nil? and
      appservers_running > 1

      Djinn.log_debug("Removing an AppServer on this node for #{app_name}")
      remove_appserver_process(app_name)
      @last_decision[app_name] = Time.now.to_i
    elsif !@app_info_map[app_name][:appengine].nil? and
      appservers_running <= 1

      Djinn.log_debug("Only 1 AppServer is running - don't kill it")

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions