The present disclosure relates to at least one embodiment of a management system which manages a processing environment including a virtual machine and a load sharing apparatus and a control method.
In recent years, the number of cloud services in which a user may use computer resources including applications, virtual machines, and storages as required as much as needed is increased. Such a cloud service is referred to as “SaaS” (software as a service), “PaaS” (platform as a service), or “IaaS” (infrastructure as a service) and the user may uniquely combine applications and computer resources provided by a cloud service vender. When the user may provide a service for an end user as a service vender by constituting a system in a cloud. The cloud service vender charges the user depending on the number of applications and computer resources used by the user.
In general, when a system is to be created, a system configuration is determined taking scales of functions and services to be provided into consideration and computer resources for operating applications are required to be selected. When the system configuration is to be changed in a course of operation of a service or when a machine specification is to be improved taking a load or performance of the system into consideration, computer resources are required to be changed or added. However, it is difficult to change or add computer resources in an environment in operation, and therefore, a stop time is provided taking deployment of setting files and programs in existing computer resources and switch-back of the system into consideration.
To address the provision of the stop time and to improve an operation mistake during operation, a system upgrading method referred to as “Blue-Green deployment” has been used in recent years. Here, the system upgrading includes upgrading of applications to be executed by virtual machines included in the system, for example. In the upgraded system, additional functions may be provided or types or formats of managed data are changed. Here, the virtual machines are logical computers which are obtained by dividing a server in a logical unit by a virtualizing technique irrespective of a physical configuration of the server and which operate with corresponding operating systems.
A method for upgrading the system by the Blue-Green deployment will now be described. First, a processing environment including an apparatus (a load balancer or a virtual machine) which is set to accept a request from a client in a cloud service functions as a production environment. A processing environment includes at least one virtual machine which processes requests and a load balancer functioning as a load sharing apparatus which distributes the requests to at least one virtual machine. When the processing environment is to be upgraded, a processing environment after the upgrading which is different from the processing environment of a current version is further created in the cloud service. Thereafter, at a time of upgrading, a setting of the apparatus which receives requests from a client is changed and a processing environment to function as a production environment is switched. By this switching, upgrading of the system is realized. Here, examples of a method for switching a connection destination include a method for rewriting a setting file including a domain name system (DNS) record of a DNS server managed by a service provider.
Japanese Patent Laid-Open No. 2016-115333 discloses a method for upgrading a system by the Blue-Green deployment.
Although a processing environment functioning as a production environment is switched by executing the Blue-Green deployment described above, a load sharing apparatus in an old production environment accepts a request from a client in some cases. This occurs when updating of a DNS server in a local network environment of the client delays or an old DNS cache remains in a cache server of the client as a setting of a client environment, for example. In such a case, when the client transmits a request, an old DNS record is used for name resolution. Then, although the processing environment functioning as a production environment is switched, the request from the client is received by the old production environment (a first processing environment) and may not be processed in a current production environment (a second processing environment). That is, an upgraded service is not provided for the client. The same is true of a case where the production environment is returned to the old processing environment (the second processing environment) due to occurrence of failure in the new processing environment (the first processing environment) immediately after the Blue-Green deployment is executed.
The present disclosure provides at least one embodiment of a system in which, even when a request from a client is transmitted to a first processing environment, the request is processed by a virtual machine in a second processing environment by performing at least one setting in a client environment.
At least one embodiment of a management system according to the present disclosure determines a virtual machine to which a request is transferred from a load sharing apparatus. The management system transfers the request from a load sharing apparatus in a first processing environment to a virtual machine in a second processing environment when a setting of an apparatus which receives the request from the client is switched from the load sharing apparatus in the first processing environment to a load sharing apparatus in the second processing environment, and does not transfer the request from the load sharing apparatus in the first processing environment to a virtual machine in the first processing environment.
According to other aspects of the present disclosure, one or more additional management systems and one or more control methods are discussed herein. Further features of the present disclosure will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
Hereinafter, preferred embodiments of the present disclosure will be described with reference to the accompanying drawings.
An input/output interface 201 performs input and output of information and signals by a display, a keyboard, a mouse, a touch panel, and buttons. A computer which does not include such hardware may be connected to and operated by another computer through a remote desk top or a remote shell. A network interface 202 is connected to a network, such as a local area network (LAN) so as to communicate with another computer or a network device. A ROM 204 records an embedded program and data. A RAM 205 is a temporary memory area. A secondary storage device 206 is represented by a hard disk drive (HDD) or a flash memory. A CPU 203 executes programs read from the ROM 204, the RAM 205, the secondary storage device 206, and the like. These units are connected to one another through an internal bus 207. The server 101 includes the CPU 203 which executes programs stored in the ROM 204 and integrally controls these units through the internal bus 207.
A processing environment 310 includes a load balancer 311, virtual machines 312, a queue 313, and a virtual machine 314. A setting for receiving a request supplied from the client 302 is performed on the processing environment 310 by a domain name system (DNS) server 340. In the setting performed by the DNS server 340, a processing environment including devices (a load balancer, a virtual machine, and the like) which has a setting for receiving a request from a client is referred to as a “Blue environment” or a “production environment” hereinafter. The load balancer (a load sharing apparatus) 311 in the Blue environment receives a request supplied from the client 302. It is assumed here that the load balancer 311 periodically executes health check on virtual machines which are request distribution destinations. In the health check, it is determined whether the virtual machines normally operate and whether communication with the virtual machines is available. The virtual machines (VMs) 312 are transfer destinations of requests supplied from the load balancer 311 and are capable of processing the transferred requests. Here, the virtual machines are logical computers obtained by dividing a server in a logical unit by a virtualizing technique irrespective of a physical configuration of the server and independently operate with respective operating systems. The VMs 312 may have a setting for automatically performing scale-out in accordance with the number of requests per unit time or a use rate of resources of the VMs 312.
The queue 313 stores data corresponding to processing requests of the VMs 312. The VM 314 periodically obtains and processes the data (a task or a message) stored in the queue 313. Unlike the VMs 312, the setting of automatic scale-out is normally not performed on the VM 314 due to presence of the queue 313. However, the setting of automatic scale-out may be performed in a case where the data stored in the queue 313 may not be processed within a predetermined period of time or a case where the queue 313 periodically performs dequeuing on the VM 314.
A processing environment 320 becomes a production environment after the execution of the Blue-Green deployment. Applications which are upgraded are operated in VMs in the processing environment 320 when compared with applications in the VMs in the processing environment 310. A processing environment which becomes a production environment after execution of the Blue-Green deployment is referred to as a “Green environment”. A load balancer 321 is included in the Green environment, and VMs 322 are distribution destinations of requests issued by the load balancer 321. Applications which are upgraded are operated in the VMs 322 when compared with applications in the VMs 312 in the Blue environment 310. A queue 323 stores data corresponding to processing request of the VMs 322. A VM 324 periodically obtains and processes the data stored in the queue 323. An application which is upgraded is operated in the VM 324 when compared with an application in the VM 314 in the Blue environment 310. In the Green environment, the client 302 does not normally transmit a request. However, a process in the Blue environment may be performed in the Green environment in a case where the client 302 or a system management unit 360 transmits a request while specifying an endpoint of the Green environment.
As described above, the Blue environment 310 and the Green environment 320 basically have the same configuration. However, the number of computer resources, a specification, and an application logic of the Green environment are changed relative to those in the Blue environment in accordance with the upgrading.
Here, a system constructed using a cloud service repeats upgrading in a comparatively short period in many cases and may be upgraded a few dozen times or hundreds of times per a day. Even in such a case, a service provider may easily perform change of computer resources and upgrading of applications without interruption by performing the Blue-Green deployment. Furthermore, since the service does not stop, the client may continuously use the service without taking changes performed on a service side into consideration.
When a connection destination is switched, a setting file is rewritten so that a connection destination of an external request is switched to a new production environment without changing a fully qualified domain name (FQDN). To perform name resolution based on an updated DNS record, the client may transmit a request to the new production environment without changing the FQDN. However, even if a service provider sets Time-to-Live (TTL) in a DNS server managed by the service provider, it is not necessarily the case that an update interval of the DNS server in a layer of an end user is ensured. For example, an old DNS record before updating is used in the name resolution in a case where the update delays in a specific DNS server in a local network environment of the client or a case where a DNS cache is held in a cache server of the client. Accordingly, the request issued by the user is processed in an old production environment which is an old version instead of a current production environment which is a new version.
Returning back to
A setting file 400 in
A table 410 of
A column 416 includes a setting value indicating a VM which is a target of transfer of a request supplied from a load balancer in a processing environment. The load balancer in the processing environment transfers a request to one of VMs included in the column 416. A setting value in the column 416 is updated by the resource operation unit 361 after switching between Blue and Green. In the management table 410, a processing environment in a first row (a row including a system version of “20160101-000000”) indicates that a request is received by a load balancer described in the column 412, and thereafter, the request is transferred to a VM set in the column 416. In the processing environment in the first row of the table 410, the load balancer described in the column 412 transfers the request to a VM of the column 413 in a processing environment in a second row of the table 410. In the processing environment in the second row of the table 410, “myself” is described in the column 416, and therefore, a request is transferred in a VM in the same processing environment instead of a VM in another processing environment. Specifically, the table 410 manages the association between the load balancer in the column 412 and the VM in the column 416 which is a request transfer destination.
That is, the processing environment in the first row is an old production environment, the processing environment in the second row is a current production environment, and the load balancer in the old production environment transfers a request to the VM in the current production environment. The load balancer in the production environment transfers a request to the VM of the production environment as normal. Note that a table definition is changed depending on system configurations of the processing environments in the table 410, and therefore, a table which manages processing environment configuration information is not limited to a table definition of the table 410.
A table 420 in
A client 502 continuously transmits a request to an old processing environment since a DNS cache is not updated in a network environment of the client 502 after the switching, for example. A client 503 appropriately transmits a request to a new processing environment after the switching. A reference numeral 510 indicates the old processing environment after the switching. The old processing environment is also referred to as an “old Blue environment”. On the other hand, a reference numeral 520 indicates the new processing environment, and is also referred to as a “Blue environment” hereinafter. The old Blue environment operates even after the switching.
As described above, the processing environment in the first row of the table 410 of
Furthermore, the processing environment in the second row of the table 410 of
Note that a client serving as a transmission source may newly obtain a DNS record when the load balancer 511 of the old Blue environment 510 returns an error to the client in response to a request supplied from the client. However, all clients which access the cloud system 301 are required to have such a mechanism.
In step S601, the resource operation unit 361 issues an instruction for constructing the Green environment to the resource generation unit 351. When the Green environment is constructed, information on various computer resources is added to the tables 410 and 420. In step S602, the resource operation unit 361 issues an instruction for executing the Blue-Green switching to the setting value updating unit 352. Specifically, a load balancer which receives a request from a client installed out of the cloud system is changed by updating the setting file of the DNS server 340. In step S603, the resource operation unit 361 issues an inquiry to the setting value updating unit 352, and when it is determined that the switching is successfully performed, a process in step S604 is executed, and otherwise, the process of this flowchart is terminated. In step S604, the test unit 362 determines whether the Blue environment 520 normally operates by performing an operation/communication check test or the like on the Blue environment 520. When the determination is affirmative, the test unit 362 executes a process in step S605, and otherwise, a process in step S610 is executed.
In step S605, the resource operation unit 361 updates the table 410 so that the load balancer 511 of the old Blue environment 510 is associated with the VMs 522 of the Blue environment 520. Specifically, a VM included in the column 413 in the second row of the management table 410 is added to the column 416 in the first row of the management table 410 as a candidate of a request transfer destination. At a time point when the association is performed, health check performed by the load balancer 511 of the old Blue environment 510 on the VMs 522 of the Blue environment 520 is not completed, and therefore, a request from the client 502 is not transferred to the VMs 522 of the Blue environment 520. In step S606, the test unit 362 issues an instruction for performing the health check on the VMs 522 of the Blue environment 520 added in step S605 to the load balancer 511 of the old Blue environment 510. In the health check, it is determined whether the virtual machine normally operates and whether communication with the virtual machine is available. Note that, when the load balancer 511 of the old Blue environment 510 executes the health check on the Blue environment 520, setting values of the load balancers in the old Blue environment 510 and the Blue environment 520 may be different from each other, and therefore, the health check may fail. Accordingly, the test unit 362 may issue an instruction for executing the health check after a setting value of the load balancer 521 of the Blue environment 520 is applied to the load balancer 511 of the old Blue environment 510 based on the information included in the table 420. In step S607, when the test unit 362 determines that a request may be transferred to the VMs 522 of the Blue environment 520 based on a result of the health check executed by the test unit 362 in step S606, a process in step S608 is executed, and otherwise, a process in step S612 is executed. Also when the health check fails, the test unit 362 executes the process in step S612.
In step S608, the resource operation unit 361 instructs the load balancer 511 in the old Blue environment 510 to transfer a request supplied from the client 502 to the VMs 522 in the Blue environment 520 added in step S605. In step S609, the resource operation unit 361 updates the table 410 so that the association between the load balancer 511 in the old Blue environment 510 and the VMs 512 is cancelled so that the request supplied from the client 502 is not transferred to the VMs 512 in the old Blue environment 510. Specifically, the resource operation unit 361 deletes values set in the columns 413, 414, and 415 of the processing environment in the first row of the management table 410 and assign a removal flag so as to update the table 410. If communication from the load balancer 511 to the VMs 512 which are request distribution destinations may be closed by a setting on the load balancer 511, the communication may be only closed without cancelling the association between the load balancer 511 and the VMs 512. Similarly, when the communication is closed, the resource operation unit 361 updates the setting values of the columns 413, 414, and 415 in the management table 410. Thereafter, the deployment process is terminated.
In step S610, the resource operation unit 361 instructs the setting value updating unit 352 to execute update of the setting file 400 which is executed in step S602 again so as to perform switch-back from the Blue environment 520 to the old Blue environment 510. In step S611, the resource operation unit 361 updates the table 410 so that the VMs 512 of the processing environment 510 which has become the Blue environment by the switching is added to the load balancer 521 of the processing environment 520 which has become the old Blue environment by the switching. Note that, at a time point of step S611, a request is not yet transferred from the client to the VMs 512.
In step S612, the resource operation unit 361 updates the table 410 so that the association between the VMs of the Blue environment and the load balancer of the old Blue environment which is externally disclosed is cancelled, and terminates the deployment process. If the health check is not required, the process may proceed to step S608 while step S606 and step S607 are skipped. Furthermore, the load balancer 511 may transfer a request to the VMs 522 without an instruction issued by the resource operation unit 361 to the load balancer 511 in step S608 when the association is made in the table 410 of
According to at least this embodiment, even when the setting of reception of a request from a client by the processing environment 520 is stored as a record in the DNS server, the load balancer 511 of the processing environment 510 may receive the request from the client. In this case, according to at least this embodiment, the system management unit 360 associates the load balancer 511 in the processing environment 510 with the VMs 522 in the processing environment 520 and cancels the association between the load balancer 511 in the processing environment 510 and the VMs 512 in the processing environment 510. According to at least this embodiment, a request received by a load sharing apparatus in a processing environment which is not set as a production environment by a DNS server may be processed in VMs in a processing environment set as a production environment.
In at least the first embodiment, a flow of update of setting values for transferring a request from a load balancer to VMs in two environments, that is, a Blue environment and an old Blue environment, after switching is described. However, when upgrading of a processing environment is often performed, three or more environments may exist in parallel. A deployment method for generating a processing environment for each upgrading and deleting an unrequired processing environment is sometimes used. Specifically, when switching of a connection destination is completed in the Blue-Green deployment and it is determined that a system has no failure, an old production environment is no longer required, and therefore, the old production environment may be deleted. Even in such a case, some clients continuously transmit a request to an old processing environment due to the reason described in at least the first embodiment, and therefore, a request transmission destination of such clients is required to be changed to a latest processing environment. In at least a second embodiment, as an application example of at least the first embodiment, a method for managing a plurality of processing environments which are not a production environment is described.
A column 801 includes a version of a processing environment and corresponds to the column 411 of
In step S901, the resource operation unit 361 issues an instruction for constructing a Green environment to a resource generation unit 351 similarly to the process in step S601. In step S902, the resource operation unit 361 adds the Green environment constructed in step S901 to the management table 800. In step S903, the resource operation unit 361 instructs switching similarly to the process in step S602. In step S904, it is determined whether the switching is successfully performed, and when the determination is affirmative, the process proceeds to step S905, and otherwise, the deployment process is terminated.
In step S905, the resource operation unit 361 updates information on the environments in the management table 800. First, the resource operation unit 361 updates a processing environment corresponding to a system mode 804 of “blue” to a processing environment corresponding to “waiting old blue” and updates a processing environment corresponding to “green” to a processing environment corresponding to “blue”. Subsequently, the resource operation unit 361 updates the system mode update date and time 805 of the processing environment in which the system mode 804 is updated. Finally, the resource operation unit 361 updates VMs of transfer destinations of requests of load balancers in the processing environments updated to the system mode “old blue” and “waiting old” to VMs corresponding to the system mode “blue”. In step S906, it is determined whether the processing environment corresponding to the system mode 804 of “blue” is normally operated. When the determination is affirmative, a process in step S907 is executed, and otherwise, a process in step S912 is executed. The determination as to whether the processing environment is normally operated is made in accordance with a fact that a test executed by the test unit 362 is passed or a fact that an error does not occur when a certain request process is performed after a predetermined period of time.
In step S907, the resource operation unit 361 updates a processing environment corresponding to the system mode 804 of “waiting old blue” to “old blue” and updates the system mode update date and time 805. In step S908, the test unit 362 and the resource operation unit 361 associates a load balancer corresponding to the system mode 804 of “old blue” with VMs corresponding to a system mode “blue” and serving as a request transfer destination. Furthermore, the test unit 362 issues an instruction for executing a health check. In step S909, as with the process in step S607, when the test unit 362 determines that a request may be transferred to VMs corresponding to a system mode of “blue” based on a result of the health check, a process in step S910 is executed, and otherwise, a process in step S915 is executed. Also when the health check fails, the test unit 362 executes the process in step S915.
In step S910, the resource operation unit 361 instructs a combination of the load balancer and the VMs in which the health check is successfully performed in step S909 to transfer a request from the load balancer to the VMs. In step S911, the resource operation unit 361 cancels the association between a load balancer in processing environments corresponding to the system modes 802 of “old blue” and “switch-back” and VMs of the environment itself in accordance with information included in the management table 800. As with the process in step S609, the resource operation unit 361 may only close communication instead of the cancel of the association between the load balancer and the VMs.
In step S912, as with the process in step S610, the resource operation unit 361 executes switch-back. Here, a processing environment corresponding to the system mode 804 of “waiting old blue” enters a Blue environment as a result of the switch-back. In step S913, first, the resource operation unit 361 updates the management table 800 so that a processing environment corresponding to the system mode 804 of “waiting old blue” is updated to “blue” and updates the system mode 804 of “blue” to “switch-back”. Thereafter, the resource operation unit 361 updates the system mode update date and time 805 of the processing environment in which the system mode 804 is changed. Finally, the resource operation unit 361 sets VMs of transfer destinations of a request from the load balancer to VMs of a processing environment corresponding to “blue”. In step S914, the test unit 362 and the resource operation unit 361 add the VMs of the switched-back processing environment (“blue” at this time point) to the load balancer of the switched-back processing environment (“switch-back” at this time point) and execute health check.
In step S915, the resource operation unit 361 cancels the association between the load balancers in processing environments corresponding to “old blue” and “switch-back” in which the health check fails and the VMs corresponding to “blue” which is a request transfer destination.
As described above, if frequency of upgrading of a service is high, the old Blue environment may remain. However, since operation cost becomes high, an unrequired processing environment is preferably deleted in one or more embodiments. A method for deleting computer resources under control of a load balancer which is accessible by a client and which is externally disclosed depending on a condition while only the load balancer remains will be described.
Note that, in step S1003, if a message still remains in a queue of the old Blue environment, only the VMs 722 in the old Blue environment may be deleted and the queue in the old Blue environment and a VM which processes the message in the queue may not be deleted.
According to at least this embodiment, in a case where three processing environments are generated in parallel in the cloud system, the system management unit 360 associates a load sharing apparatus in two of the processing environments which is not set as a production environment by the DNS server with virtual machines in the other one of the processing environments set as the production environment. Furthermore, the system management unit 360 deletes virtual machines in the processing environments which are not set as the production environment. According to at least this embodiment, a request received by a load sharing apparatus in a processing environment which is not set as a production environment by a DNS server may be processed in VMs in a processing environment set as a production environment.
Embodiment(s) of the present disclosure may also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.
While the present disclosure has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2016-230824 filed Nov. 29, 2016, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2016-230824 | Nov 2016 | JP | national |