Auto-scaling groups are Cloudmin's way of scaling up the number of systems that provide some service in response to load. They are typically used when you have multiple virtual systems with identical configurations providing the same service, such as a website, mail server or database replicas. When CPU load or some other metric exceeds a configurable threshold on some or all systems, additional systems are created to handle the load. Conversely, a group can be reduced in size when a second set of thresholds is reached.
Before creating a scaling group, you should create a virtual system that will be used as a template for the additional system that the group will create. For example, if the objective is to host a high-traffic website with variable load, this template system should have the appropriate front-end webserver and content installed and configured, so that when Cloudmin clones it the new system can accept traffic for the website immediately. This template system should be shut down, so that it can be more quickly cloned as needed.
To create a group, the steps to follow are :
${num} in the template will be replaced with a unique system number, starting from zero.Once a group has been created, you can edit its settings by clicking on the hostname template on the Auto-Scaling Groups page. You can also select one or more groups and force immediate evaluation of their rules with the Update Systems In Groups button, or add or remove a system with the Scale Up and Scale Down buttons respectively.
To see the status of systems within a group, click on it and open the Current status section. This will show for each member system whether it is exceeding the scale up or down conditions. If the conditions are being met currently but have not been active for long enough to trigger a scaling rule, the period for which they have been active will be displayed.
Groups can also be increased or decreased via the Cloudmin API with the increase-scalegroup and decrease-scalegroup API commands. Both take a host parameter which must contain the group's hostname template. Scaling via the API can be used instead of automatic scaling based on rules, driven by code in your own application that detects when additional systems are needed.
EC2 is an excellent service for use with auto-scaling groups, as it has enormous capacity and only charges for use by the hour. Cloudmin supports the use of auto-scaling on EC2 as well, but with some minor differences :
Auto-scaling groups are most useful when combined with DNS roundrobins, which automatically update a DNS record to point to multiple systems based on their status. For instructions on creating one, see the Roundrobin DNS Records page. During creation, you can use the Systems in scaling groups option to choose one or more groups' systems' IP addresses to include in the DNS record.
Each time a system is added to or deleted from an auto-scaling group, any associated DNS records will be immediately updated.