This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2017-057642 filed Mar. 23, 2017.
The present invention relates to an information processing system, an autoscaling association apparatus, and a non-transitory computer readable medium.
In hypervisor-based virtualization, which is widely used as a computer virtualization method, each virtual machine is created on an operating system (OS, host OS) of a physical machine, and an independent guest OS environment is run on the individual virtual machine.
On the other hand, in container-based virtualization, which has been widely used in recent years, resources are made to be separate for each user by individually creating an application execution environment for each user on the host OS. Container-based virtualization is more efficient than hypervisor-based virtualization because each user does not have to individually run the guest OS.
In recent years, a hybrid system obtained by combining a hypervisor-based system with a container-based system has also been proposed. In hybrid systems, containers are created on virtual machines.
In a hybrid system of the related art, autoscaling at a virtual-machine level and autoscaling at a container level are performed independently of each other. That is, in the related art, autoscaling of a group of virtual machines is performed in accordance with conditions such as load conditions of the group of virtual machines, and autoscaling of a group of containers is performed in accordance with conditions such as load conditions of the group of containers.
According to an aspect of the invention, there is provided an information processing system including one or more virtual machines, a container scaling apparatus, a virtual-machine scaling apparatus, a calculating unit, and a reflecting unit. The container scaling apparatus performs autoscaling of a container that runs on the one or more virtual machines. The virtual-machine scaling apparatus performs autoscaling of the virtual machines in accordance with a difference in a necessary number of virtual machines and a number of virtual machines that are currently running. The calculating unit calculates, from a necessary number of containers calculated by the container scaling apparatus, a number of virtual machines that is necessary to cause the necessary number of containers to run thereon. The reflecting unit reflects the number calculated by the calculating unit to the necessary number of virtual machines to be used by the virtual-machine scaling apparatus.
An exemplary embodiment of the present invention will be described in detail based on the following figures, wherein:
An example of a cloud service system according to an exemplary embodiment will be described with reference to
The cloud service system in
The container virtual-machine group 10 is a group of virtual machines run in a system including one or more physical computers. Each physical computer includes hardware resources such as one or more central processing units (CPUs), memory devices (primary storage devices), and secondary storage devices. Hypervisor-based virtualization virtual machines run on operating systems of the physical computers. Among the virtual machines, the container virtual-machine group 10 is a group of virtual machines 12 that are used for causing containers to run thereon.
Container-based virtualization containers 14 run on each of the virtual machines 12, and applications are run in the containers 14. In the example of
The virtual-machine autoscaling management apparatus 20 performs autoscaling at the virtual-machine level. In the autoscaling at the virtual-machine level, scale-out of the group of virtual machines (increasing the number of virtual machines) and scale-in of the group of virtual machines (decreasing the number of virtual machines) are performed. The virtual-machine autoscaling management apparatus 20 performs autoscaling of the virtual machines in association with a necessary number of containers 14, which is obtained through autoscaling of the containers 14 performed by the container autoscaling management apparatus 30, which will be described next.
The virtual-machine autoscaling management apparatus 20 includes a necessary-number-of-machines managing unit 22 and a virtual-machine autoscaling unit 24. The necessary-number-of-machines managing unit 22 manages the number of virtual machines that is determined to be necessary under the current conditions (this number is referred to as a necessary number of machines). In the exemplary embodiment, the autoscaling association apparatus 50, which will be described later, sets the necessary number of machines in the necessary-number-of-machines managing unit 22. The virtual-machine autoscaling unit 24 performs autoscaling of the group of virtual machines 12 in accordance with the difference between the necessary number of machines managed by the necessary-number-of-machines managing unit 22 and the number of virtual machines 12 that are currently running (number of current machines).
The container autoscaling management apparatus 30 performs autoscaling at the container level. That is, if the load of a certain kind of containers increases, the containers are subjected to scale-out (i.e., the number of containers is increased), and if the load decreases, the containers are subjected to scale-in (i.e., the number of containers is decreased). For example, if the load of applications of the containers A increases, the containers A are subjected to scale-out (i.e., a new container A is started), and if the load thereof decreases, the number of containers A is decreased (i.e., a container or containers selected on the basis of a predetermined criterion from among the existing containers A are stopped and removed).
The container autoscaling management apparatus 30 includes a necessary-number-of-containers managing unit 32 and a container autoscaling unit 34. The necessary-number-of-containers managing unit 32 manages the number of containers 14 of each kind that is determined to be necessary under the current conditions of the containers 14 of the kind (this number is referred to as a necessary number of containers). For example, from the total load amounts of one or more containers 14 of a certain kind, the necessary-number-of-containers managing unit 32 calculates the number of containers that is necessary to process the load amounts by a known method (i.e., the number of containers corresponding to the load amount) as the necessary number of containers. The load amount of each container 14 may be, for example, the number of requests that have been processed by the container 14 in a unit time, the number of requests accumulated in a queue of requests for the container 14, or the like. In accordance with the difference between the necessary number of containers calculated by the necessary-number-of-containers managing unit 32 and the number of containers 14 that are currently running (number of current containers), the container autoscaling unit 34 performs autoscaling of the group of containers 14.
The container management apparatus 40 manages various kinds of information about the containers and includes a container-machine information managing unit 42 and a resource-use-ratio managing unit 44. The container-machine information managing unit 42 manages information about the containers 14 that are running on each virtual machine 12. The information managed by the container-machine information managing unit 42 is, for example, as illustrated in
As illustrated in
For example, focusing on a memory amount as a resource, if, for example, the memory amount that the virtual machine 12 may allocate to the group of containers on the subject machine is 4 GB and the memory amount that is necessary for a kind of container, such as a container A, to perform a process is 2 GB, the resource use ratio of the container A is 0.5 (i.e., 50%). For example, focusing on the number of CPU cores as a resource, if, for example, the number of CPU cores that the virtual machine 12 may allocate to the group of containers on the subject machine is 8 and the number of CPU cores that is necessary for the container A to perform a process is 2, the resource use ratio of the container A is 0.25 (i.e., 25%). In addition, focusing on multiple resources such as the memory amount and the CPU cores, the resource use ratio is a final value obtained by calculating the resource use ratios of the individual resources of the container (e.g., by selecting the maximum resource use ratio).
The autoscaling association apparatus 50 performs a process for associating autoscaling at the virtual-machine level with autoscaling at the container level. The autoscaling association apparatus 50 includes a necessary-number-of-machines calculating unit 52 and a necessary-number-of-machines setting unit 54. The autoscaling association apparatus 50 may further include a buffer-ratio applying unit 56.
The necessary-number-of-machines calculating unit 52 calculates the necessary number of machines by using the necessary number of containers calculated by the container autoscaling management apparatus 30. Since the container autoscaling management apparatus 30 calculates the necessary number of containers of the containers 14 of each kind, the necessary-number-of-machines calculating unit 52 also calculates the necessary number of machines for the containers 14 of the kind. Then, the necessary-number-of-machines calculating unit 52 adds the numbers of necessary machines for the containers 14 of all kinds, thereby calculating the number of virtual machines 12 that is necessary in a whole system (total necessary number of machines).
The necessary number of machines for the containers 14 of a certain kind is, for example, calculated by multiplying the resource use ratio of the containers 14 of this kind by the necessary number of containers of the containers 14 of this kind. Since the resource use ratio indicates the ratio of a resource to be used by a container 14 of this kind to a resource of a virtual machine 12, by multiplying this ratio by the necessary number of containers, the number of virtual machines 12 that is necessary to correspond to the necessary number of containers of the containers 14 of this kind may be estimated.
The necessary-number-of-machines setting unit 54 sets the necessary number of machines calculated by the necessary-number-of-machines calculating unit 52 in the necessary-number-of-machines managing unit 22 of the virtual-machine autoscaling management apparatus 20.
The buffer-ratio applying unit 56 applies a buffer ratio to the necessary number of machines calculated by the necessary-number-of-machines calculating unit 52. The buffer ratio is a coefficient of greater than or equal to 1 for overestimating the necessary number of machines. For example, if the necessary number of machines calculated by the necessary-number-of-machines calculating unit 52 is multiplied by a buffer ratio of greater than 1, a value larger than the necessary number of machines calculated directly from the necessary number of containers (i.e., necessary number of containers×resource use ratio) may be obtained. If this value is set in the virtual-machine autoscaling management apparatus 20, autoscaling of the group of virtual machines 12 is performed by using, as a target value, a value larger than the necessary number of machines calculated directly from the necessary number of containers. In this manner, if a buffer ratio of greater than 1 is used, the number of virtual machines 12 in the whole system becomes a value including a small margin in accordance with the necessary number of containers. If the number of virtual machines 12 is insufficient when starting a new container 14, it takes a certain amount of time to prepare a new virtual machine 12 from this time point because an OS or the like of the virtual machine 12 has to be started. If an overestimated number of virtual machines 12 are prepared in advance by using a buffer ratio of greater than 1, although cost is increased for the increased number of virtual machines 12, calculation may be performed immediately even if the number of containers increases. Note that, if the buffer ratio is set to 1, the exact necessary number of machines obtained by (necessary number of containers)×(resource use ratio) is set in the virtual-machine autoscaling management apparatus 20.
The autoscaling association apparatus 50 includes a setting item as to whether or not the buffer ratio is applied by using the buffer-ratio applying unit 56, a setting item as to the value of the buffer ratio to be used when the buffer ratio is applied, and the like, and a manager of the system sets these items.
Next, an example of a process procedure of autoscaling at the virtual-machine level performed by the virtual-machine autoscaling management apparatus 20 (particularly the virtual-machine autoscaling unit 24) will be described with reference to
If “(the necessary number of machines)−(the number of current machines)” is a positive value, the number of current virtual machines 12 is smaller than the necessary number of machines, and accordingly, the virtual-machine autoscaling management apparatus 20 performs scale-out of the group of virtual machines 12 (S12). That is, a new virtual machine 12 is started.
If “(the necessary number of machines)−(the number of current machines)” is zero, the number of current machines is equal to the necessary number of machines, and thus, the number of virtual machines 12 does not have to be increased or decreased. In this case, the virtual-machine autoscaling management apparatus 20 ends the process.
If “(the necessary number of machines)−(the number of current machines)” is a negative value, the number of current virtual machines 12 is greater than the necessary number of machines. In this case, the virtual-machine autoscaling management apparatus 20 performs scale-in (S14). That is, the virtual-machine autoscaling management apparatus 20 searches for a virtual machine 12 that does not cause any problem if stopped. If such a virtual machine 12 is found, the virtual-machine autoscaling management apparatus 20 stops the virtual machine 12.
The process procedure of autoscaling at the container level performed by the container autoscaling management apparatus 30 may be substantially the same as the procedure of the virtual-machine autoscaling management apparatus 20 illustrated in
Next, an example of a process procedure of the autoscaling association apparatus 50 will be described with reference to
In this procedure, first, the necessary-number-of-machines calculating unit 52 acquires, from the container-machine information managing unit 42, a list of kinds of the containers 14 (e.g., containers A, B, and C in
Following S28, the necessary-number-of-machines calculating unit 52 determines that the kind of container that was processed in S24, S26, and S28 is a processed kind of container (S30) and returns to S22.
If the above-described process in S22 through S30 has been performed for all of the kinds of containers included in the list acquired in S20, the result of determination in S22 is NO. In this case, the necessary-number-of-machines calculating unit 52 determines whether a setting for applying a buffer ratio by using the buffer-ratio applying unit 56 has been set (S32), and if the setting for applying the buffer ratio has been set, the necessary-number-of-machines calculating unit 52 multiplies the necessary number of machines in the whole system obtained through repetition of the process in S22 through S30 by the buffer ratio (S34). Then, the fractional portion of the resultant value of the multiplication is rounded off, and thereby a final necessary number of machines is obtained (S36). If the setting for applying the buffer ratio has not been set, skipping S34, the fractional portion of the necessary number of machines in the whole system is rounded off, and thereby the final necessary number of machines is obtained (S36).
Following S36, the necessary-number-of-machines setting unit 54 sets the necessary number of machines obtained in S36 in the necessary-number-of-machines managing unit 22 of the virtual-machine autoscaling management apparatus 20 (i.e., the necessary number of machines stored in the necessary-number-of-machines managing unit 22 is updated to the value obtained in S36) (S38).
The process of the autoscaling association apparatus 50 (
In the above-described examples, the virtual-machine autoscaling management apparatus 20 uses the necessary number of machines calculated by the autoscaling association apparatus 50 from the necessary number of containers directly as the target value of autoscaling. However, this is merely an example. The virtual-machine autoscaling management apparatus 20 may perform autoscaling by using, as the target value, a necessary number of machines obtained by correcting the necessary number of machines calculated by the autoscaling association apparatus 50 from the necessary number of containers in accordance with, for example, the load of the group of virtual machines 12 (or by calculating the necessary number of machines calculated by using the load of the group of virtual machines 12). In the above manner, in the exemplary embodiment, the necessary number of machines to be used by the virtual-machine autoscaling management apparatus 20 as the target value of autoscaling reflects the necessary number of machines calculated by the autoscaling association apparatus 50 from the necessary number of containers.
The foregoing description of the exemplary embodiment of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiment was chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2017-057642 | Mar 2017 | JP | national |