Architecture - macroadster/HMS GitHub Wiki
HMS Architecture
Physical Architecture
Controllers and agents persist message passing communication using Paxos algorithm. This architecture allows controller and agent failures without affecting the reliability of the deployment system. Zeroconf has been chosen for resolving the location of the persistent storage. Large binary packages are shared through P2P network to ensure the packages can distribute to thousands of nodes efficiently.
Logical Architecture
This section describes data written to ZooKeeper. To deploy a cluster, a command is issued to controller. A command is composed of three piece of data.
- Role to Nodes mapping
- Role to Software package mapping
- Configuration steps for each role
Controller store the deployment command in a queue, and other controller threads will pick up the deployment command and create a deployment status object to track the deployment progress. When the deployment status object has been created, controller resolves role to nodes mapping with software to install and configuration to apply. Next, controller creates cluster structure in ZooKeeper and queue the necessary actions to perform on the agent nodes. Agent nodes retrieve queued action, and execute actions. The result of the action execution is reported back to status queue. Controller is notified of the completion of action and iterate through all necessary actions to construct the cluster.