Cloud Cost Management Methodology (3) - Judgment Rules for Cloud Optimization Management

The management time point in the four management dimensions of cloud optimization management does not need additional supplements on the basis of the general management model, so the other three dimensions (management objects, judgment rules and management measures) are mainly explained. Also, to stay close to our familiar concept of optimization, we refer to violations in optimization management as problems, and to handle violations as implementation optimizations.

Because optimization management is relatively complex, we will discuss it in two articles. This article focuses on managing objects and decision rules.

Manage objects

The management object in optimization management is the relationship between resource indicators and resources (as we will see later, strictly speaking, it is "resource relationship status"). Among them, the types of resource indicators are very rich, and generally vary with different types of resources, but the types of indicators for specific resources are determined, so there is no need to do general analysis. Therefore, we focus on analyzing the different resource relationships that affect resource cost optimization. To this end, some basic concepts are explained below.

Basic relationship of resources:

  • Association - If an attribute of a resource is the identification information of another resource, this attribute is called an association attribute, and the two resources are said to have an association relationship. Among them, the resource with this associated property is called the associated resource, and the resource identified by this property is called the associated resource. For example, a virtual machine generally has a security group ID attribute. In this relationship, the virtual machine is called the associated resource, and the security group is the associated resource.

connection relation

  • Aggregation - Aggregation is a strong association. There are whole and part relationships between resources with an aggregate relationship. For example, there is an aggregation relationship between a load balancer and a virtual machine, where the load balancer represents the overall resource, and the virtual machine is a partial resource. There may be bidirectional associations in the aggregation relationship. For example, a virtual machine has the "storage volume" set attribute, and the storage volume also has the "virtual machine ID" attribute.

Aggregation relationship

  • Composition - A composition relationship is a strong aggregation relationship. A resource representing a part in a composite relationship only belongs to the resource representing the whole in this composite relationship, and cannot be a part of other resources at the same time. For example, a virtual machine has a combined relationship with a storage volume, and a storage volume cannot be associated with multiple virtual machines at the same time.

Combination relationship

It should also be noted that, whether in an aggregate or composition relationship, the resources representing parts may not be associated with any resources representing the whole. However, because some resources in the aggregation relationship do not have strong dependencies on the overall resources, some resources can generally still achieve their business functions independently in this case (for example, virtual machines that are not associated with load balancers can still provide external services); However, for the combination relationship, some resources generally cannot implement their business functions independently in this case (for example, a storage volume that is not mounted to any virtual machine cannot provide external data storage services).

Based on the definition of the basic relationship of resources, we define the following concepts:

  • Mandatory Association - The value of the association property in the associated resource cannot be null. For example, there is a mandatory association between virtual machines and private IPs, and between volume snapshots and storage volumes.

forced association

  • Foreign key association - If the associated attribute in the associated resource is not empty, the corresponding associated resource must exist (not destroyed). If there is a foreign key association between a storage volume and a virtual machine, that is, if the virtual machine ID of the storage volume is not empty, the virtual machine must exist.

foreign key association

  • Snapshot Association - A snapshot association is a special kind of mandatory association, but not a foreign key association. The associated resource in the snapshot association is the snapshot, and the associated resource is the source resource of the snapshot. We can also refer to the associated resource in the snapshot association as the snapshot resource, and the associated resource as the source resource. For example, there is a snapshot association between the virtual machine and the image generated by the virtual machine, where the image is the snapshot resource and the virtual machine is the source resource. It should be noted that there is no snapshot association between the virtual machine and the image that generated this virtual machine, but only a general association.

Snapshot association

  • Managed - If the life cycle of a resource (create, modify, stop, destroy, etc.) is completely managed by another resource (and generally without human intervention), this relationship is called a escrow relationship, which is a a strong combination. At the same time, we call managed (ie managed) resources as managed resources, and managed (ie managed) resources as managed resources. Scaling groups and virtual machines are a typical hosting relationship.

  • Parent resource - A parent resource is a resource that represents the whole in a group of resources with an aggregate relationship.

  • Child Resource - A parent resource is a resource that represents a part of a set of resources with an aggregate relationship. A sub-resource may be a single resource (such as the public
    IP of a virtual machine) or a group of resources (such as a virtual machine in a scaling group).

It can also be seen from the above example. The same resource may have multiple aggregation relationships (such as virtual machines and load balancers, and virtual machines and scaling groups), and different aggregation relationships may have both general aggregation relationships and combination relationships.

What needs to be clear is that the specific relationship between real resources is determined by their functional characteristics and is inherent, so we have no way to improve or optimize these relationships themselves. However, we can optimize its relationship state. Therefore, the different states of various associations are listed below:

  • [Associated] Associated/Unassociated 1
  • [Forced Association] Associated/Not Associated
  • [foreign key association] associated/unassociated
  • [Snapshot Association] Associated/Unassociated
  • [aggregation] associated/unassociated
  • [Combination] Linked/Unlinked
  • [Managed] Linked/Unlinked

Among them, since the "associated" and "unassociated" in the association relationship only have the most basic information, there is no way to judge the problem, so they will not be used as management objects. At the same time, the relationship status of the following non-related relationships will also be used as management objects:

  • Matching relationship between reserved resources and instance resource usage
  • The number of copies of snapshots or backups of the same resource object

In addition, the management objects in the optimization management include resource indicators in addition to the resource relationship status. Therefore, after the summary, all the management objects in the cloud cost optimization management are as follows:

  • Force Link - Linked
  • Force Association - Not Associated
  • foreign key association - associated
  • foreign key association - not associated
  • Snapshot Association - Associated
  • Snapshot Associated - Not Associated
  • Aggregate - Associated
  • Aggregate - not associated
  • Combination - Linked
  • Combined - not associated
  • Managed - Linked
  • Managed - Not Associated
  • Reservation and instance resource matching relationship
  • number of snapshots or backups
  • Resource metrics

Optimizing management management objects

decision rule

The rules in optimization management determine whether there is a problem (ie, a violation), and the type of problem. The problem type can be judged by combining the information of the management object and the resource status.

Before defining the resource state, we first define two physical resource types:

  • Resources required to operate - The physical resources that cloud resources require in order to provide business functions.
  • Defining required resources - Definition of cloud resources, relationships, and physical resources occupied by metadata information.

It can be found that some resources such as VPC, subnets, user accounts, permissions and secret keys will not occupy the resources required for operation during their entire life cycle. In general, the price of this resource is zero.

There are three possible states for any resource (ignoring transition states such as "destroying"):

  • in action
  • stopped
  • destroyed

First of all, if a resource does not occupy the resources required to run in its entire life cycle, it only has an active state, and there is no stopped state. For cloud resources that consume (physical) resources required for operation, the active state refers to the state in which resources required for operation are being or is capable of being consumed; stopped refers to the state in which resources required for operation are not consumed. Destroyed refers to the state in which the resource required by its definition has been removed.

The following is an analysis of its decision rules for different management objects.

relationship related

注:
1. 与使用管理的描述方式有所不同,关联关系相关的判定条件由表格的表头(被关联资源状态)及每行的第一列(关联资源状态)构成,其他单元格中内容即为判定结果。同时,从判定条件到判定结果之间的映射关系即构成了违规判断方法。
2. 判定结果有三类:“/”表示不存在此情形,“无”表示此情形属正常情况,其他情况为问题描述。

- Force Association - Associated

Associated resource status - Associated resource status -
in action stopped destroyed or not created
in action without without without
stopped without without without
destroyed / / /

- Forced association - not associated

Associated resource status Violation judgment result
in action data error
stopped data error
destroyed /

- [Foreign Key Association] Associated

Associated resource status - Associated resource status -
in action stopped destroyed or not created
in action without without data error
stopped without without data error
destroyed / / /

- [foreign key association] not associated

Associated resource status Violation judgment result
in action without
stopped without
destroyed /

- [Snapshot Link] Linked

Snapshot resource status - Source resource status -
in action stopped destroyed or not created
in action without without source resource does not exist
stopped / / /
destroyed / / /

- [Snapshot Association] Not associated

Snapshot resource status Violation judgment result
in action data error
stopped /
destroyed /

- [Aggregate] Linked

parent resource status - child resource status -
in action stopped destroyed or not created
in action without without data error
stopped Parent resource is stopped without data error
destroyed or not created data error data error /

- [aggregation] not associated

resource role - resource status -
in action stopped destroyed
parent resource No subresource without /
subresource without without /

- [Combination] Linked

parent resource status - child resource status -
in action stopped destroyed or not created
in action without without data error
stopped Parent resource is stopped without data error
destroyed or not created data error data error /

- [Combination] Not associated

resource role - resource status -
in action stopped destroyed
parent resource without without /
subresource No parent resource No parent resource /

- [Managed] Linked

Manage resource status - Managed resource status -
in action stopped destroyed or not created
in action without without without
stopped data error data error data error
destroyed or not created data error data error /

- [Managed] Not associated

resource role - resource status -
in action stopped destroyed
control resources without without /
Managed resources data error data error /

matching relationship

- Matching relationship between reservation and instance resources

The reserved resources are less than the resource usage of the matching instance Reserved resources are equal to matching instance resource usage The reserved resources are greater than the resource usage of the matching instance
Insufficient reserved resources without Low utilization of reserved resources

dosage relationship

- number of snapshots or backups

The number of copies is below a reasonable range The number of copies is within a reasonable range The number of copies is higher than the reasonable range
Insufficient snapshots or backups without Too many snapshots or backups

Resource indicator related

- Resource metrics

The indicator is below the reasonable range Indicators are within a reasonable range The indicator is above the reasonable range
Low resource utilization without lack of resources

Supplementary Instructions

Combined with the user's actual use of resources, we will find that many of the problems determined by the above judgment rules will actually occur in the user's reasonable use process. For example, there will be a certain time difference between manually creating a storage volume and completing the mounting of the storage volume (during this period, it will be in a state of "no parent resource"), and the reserved resources may be underutilized during periods when the business is not busy. The CPU utilization rate of a virtual machine may be very low when the access is low, etc. These states are not related to the unreasonable operation of the user, and there is no optimization problem.

Considering this further, it turns out that many "problem states" must persist for a certain amount of time, or reach a certain percentage of the total duration, before they become a problem. Therefore, when actually formulating the determination rule, it is generally necessary to add auxiliary determination conditions such as "duration" and/or "average duration".

next notice

The next article: "Cloud Cost Management Methodology (4) - Management Measures for Cloud Optimization Management" will generally explain the optimization measures for these problems based on the various optimization problems found by the judgment rules in this article.


  1. Intuitively, it can be considered that the associated attribute value is not empty, and the unassociated attribute value is empty. At the same time, for the parent resource in the aggregation relationship, unassociated means that the collection attribute of the associated child resource is empty.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324439965&siteId=291194637