IaaS Cloud Computing elastic extension implementation and algorithm

Source: Internet
Author: User
Keywords Cloud

What is elastic expansion

The elastic extension was originally proposed by Amazon, elastic expansion is a dynamic expansion of the cloud application itself, during the operation of cloud applications to achieve support cloud application of the virtual machine instance number of dynamic increase or decrease, popular point is the load higher time to start more instances, the load of the situation to stop some instances. Elastic expansion for cloud applications achieves a real sense of resource demand. Elastic expansion is not simply a figment of the imagination, for application services, increasing the number of servers is only increased resource computing capacity, but also the traditional sense of "cluster" technology will be integrated into a whole external services. For IaaS, it does not limit the application because of the special business rules, causing the application to make the appropriate changes, which is contrary to its original intention, it is more concerned about the overall behavior, no matter what application can be run in it, and enjoy its consistent services. This shows that the virtual machines required for application deployment in the flex extension are created in advance, and by the application of the implementation of the network to build a cluster, these virtual machines into a pool, according to the strategy to start the virtual machine for the instance, and frankly, IaaS management services only focus on how many virtual machines in the pool, Then stop or start these virtual machines by policy.

Second, flexible extension implementation

First cloud users through the management portal, you can define a pool, will need to implement a flexible expansion of the virtual machine to join pool, in principle, an application corresponding to a pool, and set the elastic expansion strategy, mainly the IaaS management Service scheduling algorithm involved in the parameters, as follows:

Pool Max Size: This is related to the number of virtual machines that cloud users join;

Pool min Size: This value defaults to 1, which indicates the number of virtual machines under minimum operating conditions;

High load limit: Indicates that when the overall running load exceeds this value, the new virtual machine needs to be shipped;

Lower Load Limit: Indicates that when the overall running load falls below this value, you need to deactivate the virtual machine and put the virtual machine into an idle pool.

Step Start Count: This value defaults to 1, indicating the number of times per operation

Step Stop Count: This value defaults to 1, indicating the number of times each outage

Then, for cloud users, a dynamic monitoring interface is needed to monitor the dynamic change of the pool.

For the IaaS platform to achieve flexible expansion, first of all to implement the performance monitoring module, the pool of the operation of the virtual machine performance monitoring, according to the monitoring data, real-time CPU utilization calculation overall running load, and then scheduling according to policy. Let me explain the elastic extension algorithm in detail.

Three, elastic expansion algorithm

Hypothetical premise:

Idle pool: Freepool={v1,v2,......}

Operation Pool: usedpool={...}

Virtual machine in pool: V1,v2,......

Physics machine: P1,p2,......, Pn

Set each physical machine weight according to physical machine performance: Ld1,ld2,......, LDn

Average period of calculation: T

High Load Limit:hll

Lower Load Limit:lll

Flexible computing resource scheduling cycle: T1

Algorithm Description:

1, the average method to remove the instantaneous peak value of all physical machines, as well as the virtual machine for a certain length of the average CPU utilization;

Note: The averaging method is to prevent the frequent scheduling of cloud computing due to instantaneous spikes, resulting in "fibrillation" within cloud computing

The calculation is as follows: each resource (physical machine or virtual machine) has a queue, to save M performance data of T cycle, each new monitoring data CPU utilization after entering, the longest monitoring data will be moved out, add new data to the queue, calculate the remaining values in the queue, the calculation formula is as follows: resource load = (sumi-1+ Datanew-datalast)/m;

Note: If data in the queue that does not hold a T-cycle is not calculated, it is not included in the scope of this calculation.

2. Calculate the actual occupancy load of all virtual machines for operation:

Calculation mode: The performance of the virtual machine monitoring data represents the relative computational power, so the physical machine performance data needs to be converted to absolute load value, the formula is as follows:

Where VCPU represents the number of CPUs during virtual creation;

Represents the virtual machine relative load;

The calculation formula indicates that an M virtual machine is running on the physical machine

3, select a need to dispatch pool, integrated virtual machine load calculation of the entire operation of the virtual machine load:

The calculation formula is as follows:

M represents the number of virtual machines that have been shipped in the pool.

4. Calculate whether the pool needs to be transported or stopped:

N Pool Overall load 〉hll, indicating that a new virtual machine needs to be shipped, select Step Start count virtual join to the pending queue in free pool, and remove all remaining if the number of virtual machines in free pool is insufficient.

N Pool Overall load <lll, indicating the need to deactivate a new virtual machine,

If the number of virtual machines in Pool is-step stop count>=pool min size, select Step Stop Count's lowest load virtual machine from used pool to join the pending queue;

If the number of virtual machines in pool is-step stop count<pool min Size, select the number of virtual machines in pool from the Used pool-pool min size the lowest load virtual machine into the pending queue;

N Otherwise: The virtual machine does not do any scheduling

5. Start the virtual machine in turn from the to boot or stop the virtual machine in turn from the queue to be stopped, and clear the data for all the virtual machines in the pool T1 cycle to prevent the pool from being scheduled again during the T1 cycle.

6, sequentially from the poollist to take a pool, in accordance with the operation of 3-5.

Algorithm Other Description:

The algorithm focuses on how many virtual machines need to be started for pool, how many virtual machines in theory represent their computing power on IAAS, thereby improving application performance and allocating resources to applications on demand. But the actual resource allocation also contains a lot of factors, such as how many computing resources are left in the physical Machine resource group, and whether the resource utilization is divided into each physical machine (which needs the resource balanced intelligent migration to support).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.