CN108282507B - Method and device for application release in CaaS environment and electronic equipment - Google Patents

Method and device for application release in CaaS environment and electronic equipment Download PDF

Info

Publication number
CN108282507B
CN108282507B CN201710011109.9A CN201710011109A CN108282507B CN 108282507 B CN108282507 B CN 108282507B CN 201710011109 A CN201710011109 A CN 201710011109A CN 108282507 B CN108282507 B CN 108282507B
Authority
CN
China
Prior art keywords
container
application
routing
node
load balancing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710011109.9A
Other languages
Chinese (zh)
Other versions
CN108282507A (en
Inventor
刘中巍
闫长海
尹书威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710011109.9A priority Critical patent/CN108282507B/en
Publication of CN108282507A publication Critical patent/CN108282507A/en
Application granted granted Critical
Publication of CN108282507B publication Critical patent/CN108282507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Abstract

The application provides a method for issuing applications in a CaaS environment, which comprises the following steps: creating a new application instance of the application to be issued in a container running on a node in the container cluster and starting the new application instance; a routing weight of the first container and the second container; the original application instance of the application to be released runs in the first container, and the new application instance runs in the second container; and executing the issuing confirmation operation aiming at the application to be issued. The method for issuing the application in the CaaS environment realizes the route switching among different containers in the CaaS environment in a weight mode, realizes the issuing of the application on the basis, and is simple and convenient to realize; and the deployment and the starting of the application and the route switching among the containers can be combined, so that more automatic application release is realized, and the method is more comprehensive and more applicable.

Description

Method and device for application release in CaaS environment and electronic equipment
Technical Field
The application relates to the technical field of virtualization, in particular to a method for issuing applications in a CaaS environment. The application also relates to a device for issuing the application in the CaaS environment and electronic equipment.
Background
CaaS (Communications as a Service) encapsulates traditional telecommunication capabilities such as messages, voice, video, conference, communication collaboration and the like into an API or an SDK, which is open to the outside through the internet, and provides the capabilities to third-party enterprises or developers for use, and the telecommunication capabilities are really provided as services to the outside. The container service is used as a high-performance container management service, and supports deployment or arrangement of applications on a group of cloud servers through Docker containers, and users of a cloud computing platform do not need to install, operate and maintain and expand own cluster management infrastructure, but can directly perform container operation and life cycle management through a console graphical interface or API of the cloud computing platform. For example, the container service of the ari Cloud integrates Cloud products such as an SLB (Server Load Balancing), a VPC (Virtual Private Cloud), and provides rich one-stop function support for Cloud application deployment and operation and maintenance scenes.
An important issue of container service is how to issue applications, common issue strategies include blue-green issue and gray issue) and ABTest, and especially important is blue-green issue, where blue-green issue is a smooth issue mode, and users cannot perceive restart of services in the issue process, and usually the issue is implemented by a mode in which new and old versions coexist, that is, in the issue flow, the new and old versions are mutually hot-prepared, and online or offline of the new and old versions of applications is implemented by switching routing weights (not 0, that is, 100).
At present, a blue-green distribution strategy in an IaaS-based scenario generally implements blue-green distribution by manually switching weights through a load balancer, or implements automatic blue-green distribution by encapsulating an API. However, in the CaaS scenario, the blue-green hair cover is very challenging, because the container application can be performed in a container cluster in a scaling, failure migration, and other scenarios, and the method of performing application distribution by switching routing weights in the common CaaS scenario cannot satisfy the complex scenario in the CaaS scenario. In view of the foregoing, it is necessary to provide a method for application distribution in a CaaS environment to solve the above problems.
Disclosure of Invention
The application provides a method for application release in a CaaS environment, and the method is used for solving the problem that the prior art cannot meet the complex scene under the CaaS environment.
The application also relates to a device for issuing the application in the CaaS environment and electronic equipment.
The application provides a method for issuing applications in a CaaS environment, which comprises the following steps:
creating a new application instance of the application to be issued in a container running on a node in the container cluster and starting the new application instance;
switching the routing weight of the first container and the second container through a preset load balancing module on the node; the original application instance of the application to be released runs in the first container, and the new application instance runs in the second container;
and executing the issuing confirmation operation aiming at the application to be issued.
Optionally, the second container is located on a node where the first container is located in the container cluster.
Optionally, after creating a new application instance of the application to be released in the container running on the node in the container cluster and executing the starting step, and before executing the step of switching the routing weights of the first container and the second container by using the preset load balancing module on the node, the following steps are executed:
for each node of the cluster of containers running the second container, performing the following:
and registering the state information of the second container running on the current node to a preset service discovery module through a preset agent module on the current node.
Optionally, the state information at least includes the routing weight.
Optionally, the switching of the routing weights of the first container and the second container through the preset load balancing module on the node is implemented by adopting the following method:
for each node where the first container and the second container are located, performing the following steps:
and the load balancing module on the current node switches the routing weights of the first container and the second container according to the state information of the first container and the second container monitored by the service discovery module.
Optionally, the routing weight of the first container before switching is 100, and the routing weight of the second container before switching is 0; and, the routing weight of the first container after switching is 0, and the routing weight of the second container after switching is 100.
Optionally, the step of executing a release confirmation operation on the application to be released includes:
and deleting the original application instance of the application to be issued.
Optionally, the original application instance corresponds to an old version of the application to be released, and the new application instance corresponds to a new version of the application to be released.
Optionally, the method for issuing the application in the CaaS environment includes:
the preset cluster load balancing module receives a load request sent by a user, carries out routing according to a preset routing rule and distributes the load request to the load balancing module on a corresponding node in the container cluster.
Optionally, the preset cluster load balancing module receives a load request sent by a user, performs routing according to a preset routing rule, and after the step of distributing the load request to the load balancing module on the corresponding node in the container cluster is executed, executes the following steps:
and the load balancing module receives the load request sent by the cluster load balancing module, carries out container addressing according to routing information monitored by a preset service discovery module, and routes the received load request to a corresponding container for processing.
Optionally, all load balancing modules arranged on nodes in the container cluster monitor routing information stored in the same service discovery module; correspondingly, the load balancing module arranged on any node in the container cluster can load the application instances running in the container on all nodes in the container cluster.
The present application further provides an apparatus for issuing an application in a CaaS environment, including:
the new application instance creating and starting unit is used for creating and starting a new application instance of the application to be issued in a container running on a node in the container cluster;
the routing weight switching unit is used for switching the routing weights of the first container and the second container through a preset load balancing module on the node; the original application instance of the application to be released runs in the first container, and the new application instance runs in the second container;
and the release confirmation operation execution unit is used for executing the release confirmation operation aiming at the application to be released.
Optionally, the apparatus for issuing an application in a CaaS environment includes:
and the first routing unit is used for receiving a load request sent by a user through a preset cluster load balancing module, carrying out routing according to a preset routing rule and distributing the load request to the load balancing module on a corresponding node in the container cluster.
Optionally, the apparatus for issuing an application in a CaaS environment includes:
and the second routing unit is used for receiving the load request sent by the cluster load balancing module through the load balancing module, addressing a container according to routing information monitored by a preset service discovery module, and routing the received load request to a corresponding container for processing.
The present application additionally provides an electronic device comprising:
a memory, and a processor;
the memory is to store computer-executable instructions, and the processor is to execute the computer-executable instructions to:
creating a new application instance of the application to be issued in a container running on a node in the container cluster and starting the new application instance;
switching the routing weight of the first container and the second container through a preset load balancing module on the node; the original application instance of the application to be released runs in the first container, and the new application instance runs in the second container;
and executing the issuing confirmation operation aiming at the application to be issued.
Compared with the prior art, the method has the following advantages:
the method for issuing the application in the CaaS environment comprises the following steps: creating a new application instance of the application to be issued in a container running on a node in the container cluster and starting the new application instance; switching the routing weight of the first container and the second container through a preset load balancing module on the node; the original application instance of the application to be released runs in the first container, and the new application instance runs in the second container; and executing the issuing confirmation operation aiming at the application to be issued.
According to the method for issuing the application in the CaaS environment, a new application instance of the application to be issued is created based on a container running on a node in a container cluster, the newly created new application instance is started after the creation is completed, route switching between a first container and a second container is achieved aiming at a first container running an original application instance of the application to be issued and a second container running the new application instance on the node in the container cluster in a weight mode, and the application to be issued is confirmed after route switching, so that the application to be issued is issued. The method for issuing the application in the CaaS environment realizes the route switching among different containers in the CaaS environment in a weight mode, realizes the issuing of the application on the basis, and is simple and convenient to realize; and the deployment and the starting of the application and the route switching among the containers can be combined, so that more automatic application release is realized, and the method is more comprehensive and more applicable.
Drawings
Fig. 1 is a processing flow diagram of an embodiment of a method for issuing an application in a CaaS environment according to the present application;
FIG. 2 is a schematic diagram of a first container cluster provided herein;
FIG. 3 is a schematic diagram of a second container cluster provided herein;
FIG. 4 is a schematic illustration of a third container cluster provided herein;
fig. 5 is a schematic diagram of an embodiment of an apparatus for application distribution in a CaaS environment according to the present application;
fig. 6 is a schematic diagram of an embodiment of an electronic device provided by the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The application provides a method for application release in a CaaS environment, a device for application release in the CaaS environment and electronic equipment. The following detailed description and the description of the steps of the method are individually made with reference to the drawings of the embodiments provided in the present application.
The embodiment of the method for issuing the application in the CaaS environment provided by the application comprises the following steps:
referring to fig. 1, which is a process flow diagram illustrating an embodiment of a method for application publishing in a CaaS environment according to the present application, referring to fig. 2, which is a schematic diagram illustrating a first container cluster according to the present application; referring to fig. 3, there is shown a schematic diagram of a second container cluster provided herein; referring to fig. 4, a schematic diagram of a third container cluster provided herein is shown. In addition, please refer to fig. 1 to determine the relationship between the steps of the embodiment of the method for issuing the application in the CaaS environment.
Step S101, a new application instance of the application to be issued is created in a container running on a node in the container cluster and started.
The embodiment of the application takes the currently common blue-green release as an example, which illustrates that the application release is realized in a CaaS environment, the smallest dimension of the blue-green release deployed in the CaaS environment is a container, and the smallest dimension of the release is an application, and simply speaking, the blue-green release is an application-level updating operation, and you can switch between two versions of an application, for example, an old version of the application is unchanged, and a new version is deployed. In addition, the blue-green release realized in the CaaS environment has the advantages that the minimum unit distributed in the CaaS environment is a mirror image, the mirror image can be started in different software environments, the dependence on the bottom layer software environment is not needed, and therefore various software environments can be compatible.
The container cluster in the embodiment of the application refers to a cluster composed of at least one virtual machine in a CaaS environment, the virtual machine in the container cluster is used as a node for running a container, and the application to be issued runs in the container running on the virtual machine. For example, as shown in fig. 2, the container cluster shown therein includes VM1 (virtual machine 1, i.e., node 1) and VM2 (virtual machine 2, i.e., node 2), wherein instance 1 and instance 2 of application a are respectively run in 2 containers (Docker containers) on VM1, and instance 3 of application a is run in a container (Docker container) on VM 2.
In specific implementation, load balancing of nodes in the container cluster is implemented based on a preset cluster load balancing module, where the load balancing module is configured to load a load request sent by a user to a virtual machine in the container cluster, and each virtual machine in the container cluster is provided with and started up a load balancing module, and the cluster load balancing module receives the load request sent by the user and performs routing according to a preset routing rule, and distributes the load request to the load balancing module on a corresponding node in the container cluster. In addition, in any node in the container cluster, the load balancing of the container level on the node is realized through the load balancing module arranged on the node, the load balancing module receives the load request sent by the cluster load balancing module, carries out container addressing according to the routing information monitored by the preset service discovery module, and routes the received load request to the corresponding container for processing. For example, as shown in fig. 2, load request 1 and load request 2 received by SLB (cluster load balancing module) are sent to HAProxy (load balancing module) on VM1 and HAProxy (load balancing module) on VM2 in the container cluster, respectively; the HAProxy arranged on the VM1 monitors the routing information at the Discovery Server (service Discovery module), and addresses according to the monitored routing information, and routes the load request 1 to the corresponding container on the VM1 for processing; similarly, the HAProxy provided on VM2 listens to the routing information at the Discovery Server and performs addressing according to the heard routing information, and routes load request 2 to the corresponding container on VM2 for processing.
Further, all load balancing modules arranged on the nodes in the container cluster monitor the routing information stored in the same service discovery module; correspondingly, the load balancing module arranged on any node in the container cluster can load the application instances running in the container on all nodes in the container cluster. For example, as shown in fig. 2, the HAProxy on VM1 and the HAProxy on VM2 listen to the routing information of the Discovery Server, and the heard routing information includes the routing information of VM1 and the container on VM2, so the HAProxy on VM1 can be loaded on instance 1 and instance 2 of application a running in the container on VM1 and can also be loaded on instance 3 of application a running in the container on VM2, and similarly, the HAProxy on VM2 can also be loaded on instance 1, instance 2 and instance 3 of application a running in the container on VM1 and VM 2.
In the step, a new application instance of the application to be issued is created in a container running on a node in the container cluster, and the newly created new application instance of the application to be issued is started. In specific implementation, when a new application instance of the application to be published is created in a container running on a node in the container cluster, the new application instance of the application to be published may also be created on the node where the original application instance of the application to be published is located, that is: and creating the new application instance in a container (second container) on a node where a first container running the original application instance is located, wherein the second container is located on the node where the first container is located in the container cluster. For example, as shown in fig. 3, instance 1 (original application instance 1) and instance 2 (original application instance 2) of application a are running in a container (first container) on VM1, a new instance 1 (new application instance 1) of application a is created in a container (second container) on VM 1; instance 3 of application a (original application instance 3) is running in a container (first container) on VM2, new instance 2 of application a (new application instance 2) and new instance 3 of application a (new application instance 3) are created in a container (second container) on VM 2; and starts new instance 1 and new instance 2 created within the container on VM1 and new instance 3 created within the container on VM 2.
In a scenario of release or update of a version of an application to be released, the original application instance corresponds to an old version of the application to be released, and the new application instance corresponds to a new version of the application to be released. For example, as shown in fig. 3, instance 1, instance 2, and instance 3 of application a correspond to the current 2.0 version of application a, and new instance 1, new instance 2, and new instance 3 of application a correspond to the 2.1 version or the 3.0 version of application a, i.e., to be updated.
In addition, in the implementation, after the step is executed, that is, after a new application instance of the application to be published is created and started in a container running on a node in the container cluster, the following step may also be executed:
for each node of the cluster of containers running the second container, performing the following: and registering the state information of the second container running on the current node to a preset service discovery module through a preset agent module on the current node. It should be noted that the state information at least includes the routing weight; in addition, the state information may further include other routing information except the routing weight, version information of the application to be published, and service discovery addresses of the first container and the second container. For example, as shown in fig. 3, an Agent (proxy module) on VM1 registers status information of a container running the newly created new instance 1 of application a on VM1 with the Discovery Server; the Agent on VM2 registers with the Discovery Server the state information of the container on VM2 running the newly created application a new instance 2 and new instance 3.
And step S102, switching the routing weight of the first container and the second container through a preset load balancing module on the node.
In the above step S101, a new application instance of the application to be published is created in a container running on a node in the container cluster, and the newly created new application instance is started, in this step, on the basis of the above step S101, a routing weight of a first container and a routing weight of a second container are switched by a preset load balancing module on the node, where an original application instance of the application to be published runs in the first container, and the new application instance runs in the second container.
In specific implementation, for each node where the first container and the second container are located, the following steps are performed: and the load balancing module on the current node switches the routing weights of the first container and the second container according to the state information of the first container and the second container monitored by the service discovery module. In a blue-green release scene, the routing weight value is not 0, namely 100, so that the routing weight of the first container before switching is 100, and the routing weight of the second container before switching is 0; and, the routing weight of the first container after switching is 0, and the routing weight of the second container after switching is 100.
For example, as shown in fig. 3, which shows the routing weights before handover: on VM1, the container (first container) running instance 1 and instance 2 of application a has a routing weight of 100 and the container (second container) running new instance 1 of application a has a routing weight of 0; on VM2, the container (first container) running application a's instance 3 has a routing weight of 100 and the containers (second container) running application a's new instance 2 and new instance 3 have a routing weight of 0.
As shown in fig. 4, which shows the routing weights after handover: on VM1, the routing weights of the containers (first container) running instance 1 and instance 2 of application a are switched from 100 to 0, respectively, and the routing weight of the container (second container) running new instance 1 of application a is switched from 0 to 100; on VM2, the routing weight of the container (first container) running instance 3 of application a switches from 100 to 0, and the routing weights of the containers (second containers) running new instance 2 and new instance 3 of application a switch from 0 to 100, respectively.
Step S103, the release confirmation operation is executed for the application to be released.
In step S102, the routing weights of the first container running the original application instance of the application to be released and the second container running the new application instance are switched by the load balancing module preset on the node, and on this basis, in this step, a release confirmation operation is executed for the application to be released, so that the old version of the application to be released is completely offline and the new version of the application to be released is completely online. In specific implementation, the old version of the application to be released can be destroyed by deleting the original application instance of the application to be released, so that the new version of the application to be released is completely online.
In practical application, multiple specific implementation manners may be adopted to implement the release confirmation operation, for example, release verification is performed on the application to be released, and if the release verification is passed, a new version of the application to be released is released. The various forms of implementing the release confirmation operations are merely implementation changes, and do not depart from the core of this application, and therefore, are all within the scope of this application.
To sum up, the method for issuing the application in the CaaS environment, provided by the application, creates a new application instance of the application to be issued based on a container running on a node in a container cluster, starts the new application instance to be newly created after the creation is completed, and realizes the routing switching between the first container and the second container by aiming at the first container and the second container of the new application instance running on the node in the container cluster, and the application to be issued is issued and confirmed after the routing switching, so that the application to be issued is issued. The method for issuing the application in the CaaS environment realizes the route switching among different containers in the CaaS environment in a weight mode, realizes the issuing of the application on the basis, and is simple and convenient to realize; and the deployment and the starting of the application and the route switching among the containers can be combined, so that more automatic application release is realized, and the method is more comprehensive and more applicable.
The embodiment of the device for application release in the CaaS environment provided by the application is as follows:
in the foregoing embodiment, a method for issuing an application in a CaaS environment is provided, and correspondingly, an apparatus for issuing an application in a CaaS environment is also provided in the present application, which is described below with reference to the accompanying drawings.
Referring to fig. 5, a schematic diagram of an embodiment of an apparatus for application distribution in a CaaS environment is shown.
Since the device embodiment corresponds to the method embodiment provided above, please refer to the corresponding description of the method embodiment for reading the content of this embodiment. The device embodiments described below are merely illustrative.
The application provides a device for issuing applications in a CaaS environment, which comprises:
a new application instance creating and starting unit 501, configured to create and start a new application instance of an application to be published in a container running on a node in a container cluster;
a routing weight switching unit 502, configured to switch routing weights of the first container and the second container through a preset load balancing module on the node; the original application instance of the application to be released runs in the first container, and the new application instance runs in the second container;
a publication confirmation operation execution unit 503, configured to execute a publication confirmation operation for the application to be published.
Optionally, the second container is located on a node where the first container is located in the container cluster.
Optionally, a state information registration unit is run for each node in the container cluster running the second container; and the state information registration unit is used for registering the state information of the second container running on the current node to a preset service discovery module through a preset agent module on the current node.
Optionally, the state information at least includes the routing weight.
Optionally, the routing weight switching unit 502 is specifically configured to run a routing weight switching subunit for each node where the first container and the second container are located; the routing weight switching subunit is configured to switch, by the load balancing module on the current node, the routing weights of the first container and the second container according to the state information of the first container and the second container monitored by the service discovery module.
Optionally, the routing weight of the first container before switching is 100, and the routing weight of the second container before switching is 0; and, the routing weight of the first container after switching is 0, and the routing weight of the second container after switching is 100.
Optionally, the issue confirmation operation executing unit 503 includes:
and the original application instance deleting subunit is used for deleting the original application instance of the application to be issued.
Optionally, the original application instance corresponds to an old version of the application to be released, and the new application instance corresponds to a new version of the application to be released.
Optionally, the apparatus for issuing an application in a CaaS environment includes:
and the first routing unit is used for receiving a load request sent by a user through a preset cluster load balancing module, carrying out routing according to a preset routing rule and distributing the load request to the load balancing module on a corresponding node in the container cluster.
Optionally, the apparatus for issuing an application in a CaaS environment includes:
and the second routing unit is used for receiving the load request sent by the cluster load balancing module through the load balancing module, addressing a container according to routing information monitored by a preset service discovery module, and routing the received load request to a corresponding container for processing.
Optionally, all load balancing modules arranged on nodes in the container cluster monitor routing information stored in the same service discovery module; correspondingly, the load balancing module arranged on any node in the container cluster can load the application instances running in the container on all nodes in the container cluster.
The embodiment of the electronic equipment provided by the application is as follows:
in the foregoing embodiment, a method for issuing an application in a CaaS environment is provided, and in addition, the present application also provides an electronic device for implementing the method for issuing an application in a CaaS environment, which is described below with reference to the accompanying drawings.
Referring to fig. 6, a schematic diagram of an electronic device provided in the present embodiment is shown.
The present embodiment corresponds to the above embodiment of the method for issuing an application in a CaaS environment, and please refer to the corresponding description of the embodiment of the method for issuing an application in a CaaS environment provided above for reading the content of the present embodiment. The embodiments described below are merely illustrative.
The application provides an electronic device, including:
a memory 601, and a processor 602;
the memory 601 is configured to store computer-executable instructions, and the processor 602 is configured to execute the computer-executable instructions to:
creating a new application instance of the application to be issued in a container running on a node in the container cluster and starting the new application instance;
switching the routing weight of the first container and the second container through a preset load balancing module on the node; the original application instance of the application to be released runs in the first container, and the new application instance runs in the second container;
and executing the issuing confirmation operation aiming at the application to be issued.
Optionally, the second container is located on a node where the first container is located in the container cluster.
Optionally, after creating a new application instance of the application to be issued in the container running on the node in the container cluster and starting the instruction execution, and before the routing weight instruction for switching the first container and the second container by using the preset load balancing module on the node is executed, the processor 602 is further configured to execute the following computer-executable instructions:
for each node of the cluster of containers running the second container, performing the following:
and registering the state information of the second container running on the current node to a preset service discovery module through a preset agent module on the current node.
Optionally, the state information at least includes the routing weight.
Optionally, the switching of the routing weights of the first container and the second container through the preset load balancing module on the node is implemented by adopting the following method:
for each node where the first container and the second container are located, executing the following computer-executable instructions:
and the load balancing module on the current node switches the routing weights of the first container and the second container according to the state information of the first container and the second container monitored by the service discovery module.
Optionally, the routing weight of the first container before switching is 100, and the routing weight of the second container before switching is 0; and, the routing weight of the first container after switching is 0, and the routing weight of the second container after switching is 100.
Optionally, the executing the instruction of the operation of confirming the issuance of the application to be issued includes:
and deleting the original application instance of the application to be issued.
Optionally, the original application instance corresponds to an old version of the application to be released, and the new application instance corresponds to a new version of the application to be released.
Optionally, the processor 602 is further configured to execute the following computer-executable instructions:
and receiving a load request sent by a user based on a preset cluster load balancing module, carrying out routing according to a preset routing rule, and distributing the load request to the load balancing module on a corresponding node in the container cluster.
Optionally, the preset cluster load balancing module receives a load request sent by a user, performs routing according to a preset routing rule, and after the load request is distributed to a load balancing module instruction on a corresponding node in the container cluster and executed, the processor 602 is further configured to execute the following computer executable instructions:
and receiving the load request sent by the cluster load balancing module based on the load balancing module, addressing a container according to routing information monitored by a preset service discovery module, and routing the received load request to a corresponding container for processing.
Optionally, all load balancing modules arranged on nodes in the container cluster monitor routing information stored in the same service discovery module; correspondingly, the load balancing module arranged on any node in the container cluster can load the application instances running in the container on all nodes in the container cluster.
Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto, and variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present invention.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

Claims (13)

1. A method for application release in a CaaS environment is characterized by comprising the following steps:
creating a new application instance of the application to be issued in a container running on a node in the container cluster and starting the new application instance;
switching the routing weight of the first container and the second container through a preset load balancing module on the node; the original application instance of the application to be released runs in the first container, and the new application instance runs in the second container;
executing a release confirmation operation aiming at the application to be released;
the method comprises the following steps that a preset load balancing module on a node switches the routing weight of a first container and the routing weight of a second container, and the following modes are adopted: for each node where the first container and the second container are located, performing the following steps: the load balancing module on the current node switches the routing weights of the first container and the second container according to the state information of the first container and the second container monitored by the service discovery module, wherein the routing weight of the first container before switching is 100, the routing weight of the second container before switching is 0, the routing weight of the first container after switching is 0, and the routing weight of the second container after switching is 100.
2. The method as claimed in claim 1, wherein the second container is located on a node of the container cluster where the first container is located.
3. The method as claimed in claim 2, wherein after the step of creating a new application instance of the application to be published in a container running on a node in the container cluster and starting the new application instance is performed, and before the step of switching the routing weights of the first container and the second container by using a preset load balancing module on the node is performed, the following steps are performed:
for each node of the cluster of containers running the second container, performing the following:
and registering the state information of the second container running on the current node to a preset service discovery module through a preset agent module on the current node.
4. The method as claimed in claim 3, wherein the state information at least includes the routing weight.
5. The method as claimed in claim 1, wherein the step of performing release confirmation operation on the application to be released comprises:
and deleting the original application instance of the application to be issued.
6. The method as claimed in claim 1, wherein the original application instance corresponds to an old version of the application to be published, and the new application instance corresponds to a new version of the application to be published.
7. The method for application release in a CaaS environment as claimed in claim 1, comprising:
the preset cluster load balancing module receives a load request sent by a user, carries out routing according to a preset routing rule and distributes the load request to the load balancing module on a corresponding node in the container cluster.
8. The method as claimed in claim 7, wherein the preset cluster load balancing module receives a load request sent by a user, performs routing according to a preset routing rule, and after the step of distributing the load request to the load balancing module on the corresponding node in the container cluster is performed, performs the following steps:
and the load balancing module receives the load request sent by the cluster load balancing module, carries out container addressing according to routing information monitored by a preset service discovery module, and routes the received load request to a corresponding container for processing.
9. The method of claim 8, wherein all load balancing modules disposed on nodes in the container cluster monitor routing information stored in a same service discovery module;
correspondingly, the load balancing module arranged on any node in the container cluster can load the application instances running in the container on all nodes in the container cluster.
10. An apparatus for application publishing in a CaaS environment, comprising:
the new application instance creating and starting unit is used for creating and starting a new application instance of the application to be issued in a container running on a node in the container cluster;
the routing weight switching unit is used for switching the routing weights of the first container and the second container through a preset load balancing module on the node; the original application instance of the application to be released runs in the first container, the new application instance runs in the second container, wherein the routing weights of the first container and the second container are switched through a preset load balancing module on the node, and the method is realized by adopting the following mode: for each node where the first container and the second container are located, performing the following steps: the load balancing module on the current node switches the routing weights of the first container and the second container according to the state information of the first container and the second container monitored by the service discovery module, wherein the routing weight of the first container before switching is 100, the routing weight of the second container before switching is 0, the routing weight of the first container after switching is 0, and the routing weight of the second container after switching is 100;
and the release confirmation operation execution unit is used for executing the release confirmation operation aiming at the application to be released.
11. The apparatus for application distribution in a CaaS environment according to claim 10, comprising:
and the first routing unit is used for receiving a load request sent by a user through a preset cluster load balancing module, carrying out routing according to a preset routing rule and distributing the load request to the load balancing module on a corresponding node in the container cluster.
12. The apparatus for application distribution in a CaaS environment according to claim 11, comprising:
and the second routing unit is used for receiving the load request sent by the cluster load balancing module through the load balancing module, addressing a container according to routing information monitored by a preset service discovery module, and routing the received load request to a corresponding container for processing.
13. An electronic device, comprising:
a memory, and a processor;
the memory is to store computer-executable instructions, and the processor is to execute the computer-executable instructions to:
creating a new application instance of the application to be issued in a container running on a node in the container cluster and starting the new application instance;
switching the routing weight of the first container and the second container through a preset load balancing module on the node; the original application instance of the application to be released runs in the first container, and the new application instance runs in the second container;
executing a release confirmation operation aiming at the application to be released;
the method comprises the following steps that a preset load balancing module on a node switches the routing weight of a first container and the routing weight of a second container, and the following modes are adopted: for each node where the first container and the second container are located, performing the following steps: the load balancing module on the current node switches the routing weights of the first container and the second container according to the state information of the first container and the second container monitored by the service discovery module, wherein the routing weight of the first container before switching is 100, the routing weight of the second container before switching is 0, the routing weight of the first container after switching is 0, and the routing weight of the second container after switching is 100.
CN201710011109.9A 2017-01-06 2017-01-06 Method and device for application release in CaaS environment and electronic equipment Active CN108282507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710011109.9A CN108282507B (en) 2017-01-06 2017-01-06 Method and device for application release in CaaS environment and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710011109.9A CN108282507B (en) 2017-01-06 2017-01-06 Method and device for application release in CaaS environment and electronic equipment

Publications (2)

Publication Number Publication Date
CN108282507A CN108282507A (en) 2018-07-13
CN108282507B true CN108282507B (en) 2021-02-02

Family

ID=62801044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710011109.9A Active CN108282507B (en) 2017-01-06 2017-01-06 Method and device for application release in CaaS environment and electronic equipment

Country Status (1)

Country Link
CN (1) CN108282507B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112889247B (en) * 2018-10-18 2022-05-31 华为技术有限公司 VNF service instantiation method and device
CN109725920B (en) * 2018-12-29 2022-05-06 咪咕文化科技有限公司 Service instance updating method and device and storage medium
CN110162382B (en) * 2019-04-09 2023-12-15 平安科技(深圳)有限公司 Container-based gray level publishing method, device, computer equipment and storage medium
CN110244964B (en) * 2019-05-28 2023-04-28 创新先进技术有限公司 Operation and maintenance method, device and equipment based on operation and maintenance application
CN110471683B (en) * 2019-08-06 2023-11-24 上海浦东发展银行股份有限公司信用卡中心 Intelligent DNS-based container cloud application blue-green publishing method
CN112532508B (en) * 2019-09-18 2022-06-14 华为技术有限公司 Video communication method and video communication device
CN111841019A (en) * 2020-06-23 2020-10-30 腾讯科技(成都)有限公司 Game application security verification method, device, equipment and storage medium
CN114866790B (en) * 2022-03-25 2024-02-27 上海哔哩哔哩科技有限公司 Live stream scheduling method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123587A (en) * 2007-09-13 2008-02-13 杭州华三通信技术有限公司 Traffic control method and device for switch service flow
CN103095600A (en) * 2013-02-07 2013-05-08 杭州华三通信技术有限公司 Loading balancing method based on Trill network and routing device
US8690578B1 (en) * 2013-01-03 2014-04-08 Mark E. Nusbaum Mobile computing weight, diet, nutrition, and exercise tracking system with enhanced feedback and data acquisition functionality
CN104811459A (en) * 2014-01-23 2015-07-29 阿里巴巴集团控股有限公司 Processing method, processing device and system for message services and message service system
CN105103105A (en) * 2012-12-28 2015-11-25 脸谱公司 Social cover feed interface
CN105700908A (en) * 2014-12-16 2016-06-22 佳能株式会社 Management system and control method for management system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123587A (en) * 2007-09-13 2008-02-13 杭州华三通信技术有限公司 Traffic control method and device for switch service flow
CN105103105A (en) * 2012-12-28 2015-11-25 脸谱公司 Social cover feed interface
US8690578B1 (en) * 2013-01-03 2014-04-08 Mark E. Nusbaum Mobile computing weight, diet, nutrition, and exercise tracking system with enhanced feedback and data acquisition functionality
CN103095600A (en) * 2013-02-07 2013-05-08 杭州华三通信技术有限公司 Loading balancing method based on Trill network and routing device
CN104811459A (en) * 2014-01-23 2015-07-29 阿里巴巴集团控股有限公司 Processing method, processing device and system for message services and message service system
CN105700908A (en) * 2014-12-16 2016-06-22 佳能株式会社 Management system and control method for management system

Also Published As

Publication number Publication date
CN108282507A (en) 2018-07-13

Similar Documents

Publication Publication Date Title
CN108282507B (en) Method and device for application release in CaaS environment and electronic equipment
CN112513816B (en) Function As A Service (FAAS) execution dispatcher
US9244817B2 (en) Remote debugging in a cloud computing environment
US9916174B2 (en) Updating networks having virtual machines with migration information
CN113783922A (en) Load balancing method, system and device
US10771570B2 (en) Scalable message passing architecture a cloud environment
US11177974B2 (en) Consistent provision of member node group information on virtual overlay network
US11627169B2 (en) Network-based Media Processing (NBMP) workflow management through 5G Framework for Live Uplink Streaming (FLUS) control
US9921878B1 (en) Singleton coordination in an actor-based system
CN112882792A (en) Information loading method, computer device and storage medium
US11816469B2 (en) Resolving the version mismatch problem when implementing a rolling update in an open-source platform for container orchestration
US11792289B2 (en) Live socket redirection
AU2020385682B2 (en) Communication with an application flow in an integration system
US9348672B1 (en) Singleton coordination in an actor-based system
US10868758B1 (en) Enabling bypass flows for network traffic between devices
US10824476B1 (en) Multi-homed computing instance processes
WO2021201942A1 (en) 3rd generation partnership project (3gpp) framework for live uplink streaming (flus) sink capabilities determination
CN110347473B (en) Method and device for distributing virtual machines of virtualized network elements distributed across data centers
US10133496B1 (en) Bindable state maintaining components
US11872497B1 (en) Customer-generated video game player matchmaking in a multi-tenant environment
US11442943B1 (en) Error-causing record isolation for data stream processing
US20200089544A1 (en) Managing computer resources
JP2023524388A (en) Method, computer system and computer program for reverse address mapping when using content preparation in 5G networks
CN114363254A (en) Tenant isolation method and device and electronic equipment
CN112148935A (en) Method and apparatus for NBMP function execution for multiple instances

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant