You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Introduction

This feature allows the direct agents to support multiple management servers. With this feature, a load balancer may no longer be necessary. The CloudStack administrator is responsible for setting a list of management servers and an algorithm in which to sort them, to the management server, using global configurations. The management server is responsible for applying algorithm to the management server list and propagate it to the agents.

Purpose

Allow a CloudStack administrator to set a list of management servers for direct agents to connect to. In this way, directs agents should connect to the first element on the list as the master node, but in case of disconnection will iterate through the list in order (secondary nodes).

Bug Reference

Unable to render Jira issues macro, execution error.

Feature Specification

A new global configuration is added: 'direct.agent.lb.algorithm'. Possible values of this global configuration are: 'static', 'roundrobin' and 'shuffle'. 

This feature makes use of two global configurations:

  • 'host': A list of comma separated management servers is accepted. Example value: '192.168.10.10,192.168.10.11'
  • 'direct.agent.lb.algorithm': Possible values: 'static', 'roundrobin' or 'shuffle'

Values from both global configurations are read on management server startup by new utility and kept in memory.

An existing command-answer pattern that handles initial agent connection and startup will be modified to propagate the a comma-separated list of management servers. This list will be provided by the utility and will be determined by the value of 'direct.agent.lb.algorithm' in this way:

  • 'static': No modification is made to the original 'host' list, sent to agents as it is
  • 'roundrobin': Rotate items one by one once the list is read
  • 'shuffle': Randomly sort the list to send to an agent

The agents will be modified to save this list as the configured 'host' value in agent.properties file.

Example

Supposing an environment in which there are 3 management servers: A, B and C and 3 KVM agents.

Setting 'host' = 'A,B,C', agents will receive lists depending on 'direct.agent.lb' value:

  • 'static': Each agent will receive the list: 'A,B,C'
  • 'roundrobin': First agent receives: 'A,B,C', second agent receives: 'B,C,A', third agent receives: 'C,B,A'
  • 'shuffle': Each agent will receive a list in random order.
  • No labels