Application deployment method and device, storage medium and electronic equipment

Automatically perform cold backup through the traffic detection service of the application proxy service and application deployment is carried out when the traffic data of the target application is cleared, which solves the problems of manual cold backup and brute-force restart services in the existing technology, and improves the efficiency and reliability of application deployment.

CN120179260APending Publication Date: 2025-06-20BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311766957.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The existing technology requires manual cold backup during application deployment, and directly violently destroy containers and restart services after traffic is cleared, resulting in inefficiency and potential error risks.

Method used

The traffic detection service of the application proxy service collects the traffic data of the target application machine and triggers the proxy server to perform automatic cold backup. When the traffic data of the target application is detected to be cleared, the target application is deployed on the target application machine through the application deployment service to avoid direct brute force destruction of the container and restarting the service.

Benefits of technology

The automated cold backup process is realized, reducing the need for manual intervention, and safely deploying application when traffic is cleared, avoiding unnecessary container restarts, and improving deployment efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179260A_ABST
    Figure CN120179260A_ABST
Patent Text Reader

Abstract

The invention provides an application deployment method and device, a storage medium and electronic equipment, and relates to the technical field of computers. The method comprises the steps that after a deployment request of a target application is received, an application proxy service is started, and the application proxy service comprises a flow detection service; traffic data of a target application machine is collected through a traffic detection service, and the target application machine is a machine of a to-be-deployed target application; triggering the proxy server to set the backup state of the target application as cold backup through the traffic detection service; if it is detected that the flow of the target application is cleared according to the flow data of the target application machine, the target application is deployed on the target application machine through the application deployment service of the target application. According to the method, the traffic is collected through the application proxy service and the proxy server is triggered to carry out automatic cold backup, so that the problem of manual cold backup is solved, application deployment is carried out under the condition of traffic zero clearing, and the situation that a container is directly destroyed violently to restart the service is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to an application deployment method, an application deployment apparatus, a computer-readable storage medium, and an electronic device. Background Art

[0002] In the application deployment solution of related technologies, when an application deployment service interacts with a proxy server, it is necessary for a staff member to go to the proxy server to find the machine where the application is deployed and manually perform cold backup. After the cold backup, it is also necessary to wait for several minutes to prevent errors caused by caches. During the application deployment and release process, for traffic applications, the containers are directly and forcefully destroyed and the service is restarted.

[0003] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0004] The purpose of the present disclosure is to provide an application deployment method, an application deployment apparatus, a computer-readable storage medium, and an electronic device. By collecting traffic through an application proxy service and triggering the proxy server to perform automatic cold backup, the problem of manual cold backup required in related technologies is solved, and application deployment is performed when the traffic is cleared, avoiding directly and forcefully destroying the containers and restarting the service.

[0005] Other features and advantages of the present disclosure will become apparent through the following detailed description, or will be partially learned through the practice of the present disclosure.

[0006] According to one aspect of the present disclosure, there is provided an application deployment method, including: after receiving a deployment request for a target application, starting an application proxy service; wherein, the application proxy service includes a traffic detection service; collecting traffic data of a target application machine through the traffic detection service; wherein, the target application machine is the machine on which the target application is to be deployed; triggering the proxy server to set the backup state of the target application to cold backup through the traffic detection service; if it is detected according to the traffic data of the target application machine that the target application has zero traffic, then deploying the target application on the target application machine through the application deployment service of the target application.

[0007] In an optional embodiment of the present disclosure, after deploying the target application on the target application machine through the application deployment service of the target application, the method further includes: triggering the proxy server to set the backup state of the target application to hot backup through the traffic detection service; detecting whether the traffic data of the target application has reached the target application machine through the traffic detection service, and if so, closing the traffic detection service.

[0008] In an alternative embodiment of the present disclosure, collecting traffic data of a target application machine through the traffic detection service includes: monitoring a service port of the target application machine through a network monitoring middleware of the traffic detection service, and then collecting traffic data of the target application machine according to the service port.

[0009] In an alternative embodiment of the present disclosure, after collecting traffic data of the target application machine, the method further includes: reporting the traffic data of the target application machine to a data storage service at a preset time period to detect whether the target application has zero traffic through the data storage service.

[0010] In an alternative embodiment of the present disclosure, triggering the proxy server to set the backup state of the target application to cold backup through the traffic detection service includes: triggering a cold backup interface of the proxy server through the traffic detection service; using the cold backup interface to set the backup state of the target application on the proxy server to cold backup according to the identification information of the target application; and triggering the proxy server to set the backup state of the target application to hot backup through the traffic detection service includes: triggering a hot backup interface of the proxy server through the traffic detection service; using the hot backup interface to set the backup state of the target application on the proxy server to hot backup according to the identification information of the target application.

[0011] In an alternative embodiment of the present disclosure, the application proxy service includes a pressure detection service; wherein, after deploying the target application on the target application machine through an application deployment service of the target application, the method further includes: obtaining application health data of the target application machine; if it is determined according to the application health data that the machine load of the target application machine is greater than a preset load threshold, obtaining historical response data of the target application machine through the pressure detection service; judging whether there is a target response on the target application machine with a traffic volume greater than a preset traffic volume threshold or an access duration greater than a preset access duration threshold according to the historical response data; if there is the target response on the target application machine, performing traffic limiting processing on the target application machine, or triggering the proxy server to adjust the weight of the target application machine.

[0012] In an alternative embodiment of the present disclosure, the application proxy service includes a retry enhancement service, a traffic limiting enhancement service, and a circuit breaker enhancement service.

[0013] In an alternative embodiment of the present disclosure, the number of target application machines is one or more; wherein, the method further includes: deploying the target application on one or more target application machines through the application deployment service according to the pre-set grouping information and scheduling order of one or more target application machines.

[0014] According to another aspect of the present disclosure, there is provided an application deployment apparatus, including: a proxy service startup module, configured to start an application proxy service after receiving a deployment request for a target application; wherein, the application proxy service includes a traffic detection service; a traffic data collection module, configured to collect traffic data of a target application machine through the traffic detection service; wherein, the target application machine is a machine on which the target application is to be deployed; a backup state setting module, configured to trigger the proxy server to set the backup state of the target application to cold backup through the traffic detection service; an application deployment module, configured to deploy the target application on the target application machine through the application deployment service of the target application if it is detected according to the traffic data of the target application machine that the traffic of the target application has cleared.

[0015] According to another aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned application deployment method is implemented.

[0016] According to another aspect of the present disclosure, there is provided an electronic device, including: a processor; and a memory, configured to store executable instructions of the processor; wherein, the processor is configured to execute the above-mentioned application deployment method by executing the executable instructions.

[0017] The application deployment method provided by the embodiments of the present disclosure starts an application proxy service when a target application needs to be deployed, collects traffic data of a target application machine through the traffic detection service of the application proxy service, and triggers the proxy server to set the target application to cold backup through the traffic detection service. Furthermore, when it is detected according to the traffic data of the target application machine that the data of the target application has cleared, the target application is deployed on the target application machine through the application deployment service. On the one hand, collecting traffic data through the traffic detection service of the application proxy service and triggering the proxy server to perform automatic cold backup solves the problem in the related art that cold backup needs to be performed manually; on the other hand, performing application deployment when the traffic of the target application has cleared can avoid directly and forcefully destroying the container and restarting the service.

[0018] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0020] Figure 1 is a schematic diagram of the system architecture of an application deployment method shown according to an exemplary embodiment;

[0021] Figure 2 is a flowchart of an application deployment method shown according to an exemplary embodiment;

[0022] Figure 3 is a flowchart of an application deployment method shown according to another exemplary embodiment;

[0023] Figure 4 is a flowchart of rate limiting for a target application machine shown according to an exemplary embodiment;

[0024] Figure 5 is an architecture diagram of an application deployment system shown according to an exemplary embodiment;

[0025] Figure 6 is a block diagram of an application deployment device shown according to an exemplary embodiment; and

[0026] Figure 7 is a block diagram of the structure of an electronic device shown according to an exemplary embodiment. Detailed Embodiments

[0027] In order to enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above accompanying drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described here can be implemented in an order other than those illustrated or described here.

[0029] The following exemplary embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of this disclosure. However, those skilled in the art will realize that one or more of the specific details may be omitted in practicing the technical solutions of this disclosure, or other methods, components, devices, steps, etc. may be used. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0030] In addition, the accompanying drawings are only schematic illustrations of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0031] It should be noted that in the technical solutions of this disclosure, in terms of the collection, gathering, updating, analysis, processing, use, transmission, storage, etc. of the user's personal information, they all comply with the provisions of relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. Necessary measures are taken for the user's personal information to prevent illegal access to the user's personal information data, and to safeguard the security of the user's personal information, network security, and national security.

[0032] Figure 1 It is a schematic diagram of the system architecture of an application deployment method shown according to an exemplary embodiment. The system architecture includes an application server 101, a proxy server 102, a terminal device 103, and an application proxy service component 104.

[0033] Among them, the application server 101 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some practical applications, the application server 101 can also be a server of a network platform, and the network platform can be, for example, a trading platform, a live broadcast platform, a social platform or a music platform, etc. The embodiments of the present disclosure do not limit this. Among them, the server can be a single server or a cluster formed by multiple servers. The present disclosure does not limit the specific architecture of the server.

[0034] The proxy server 102 can be Nginx, that is, a high-performance HTTP (Hyper Text Transfer Protocol) and reverse proxy Web (World Wide Web) server, or it can also be NP, that is, Nginx Plus, a product that combines a software load balancer, a reverse proxy, content caching, and a Web server.

[0035] The terminal device 103 can include, but is not limited to, electronic devices such as smartphones, desktop computers, tablet computers, laptop computers, smart speakers, digital assistants, AR (Augmented Reality) devices, VR (Virtual Reality) devices, and smart wearable devices. Alternatively, the terminal device 103 can also be a personal computer, such as a laptop portable computer and a desktop computer, etc. Optionally, the operating system running on the electronic device can include, but is not limited to, Android system, IOS system, linux, windows, etc.

[0036] The terminal device 103 sends an access request to the application server 101 through the proxy server 102; the proxy server 102 can send the access request to the application server 101 in a round-robin manner, then obtain the request response from the application server 101, and forward the request response to the terminal device 103.

[0037] The application proxy service component 104 can be used to provide an application proxy service. It can be a component independent of the proxy server 102 and the application server 103, or a component integrated on the proxy server 102. In the embodiments of the present disclosure, the application proxy service component 104 can perform the following operations: after receiving a deployment request for a target application, start the application proxy service, where the application proxy service includes a traffic detection service; through the traffic detection service, collect traffic data of the target application machine, where the target application machine is the machine on which the target application is to be deployed; through the traffic detection service, trigger the proxy server to set the backup status of the target application to cold backup; if it is detected that the traffic of the target application has cleared based on the traffic data of the target application machine, then deploy the target application on the target application machine through the application deployment service of the target application.

[0038] It should be understood that Figure 1 the number of the application server 101 and the terminal device 103 in

[0039] is merely illustrative, and there can be any number of application servers and terminal devices according to actual needs.

[0040] Figure 2 is a flowchart of an application deployment method shown according to an exemplary embodiment. Refer to Figure 2 ,the method is applied to Figure 1 the application proxy service component shown in

[0041] Step S210, after receiving a deployment request for a target application, start the application proxy service.

[0042] Step S220, through the traffic detection service, collect traffic data of the target application machine.

[0043] In the embodiments of the present disclosure, the target application is the application to be deployed, and the target application machine is the machine on which the target application is to be deployed. It should be noted that the deployment in the embodiments of the present disclosure can be understood as the deployment of the target application instance information, or can be understood as the update of the target application instance information.

[0044] Among them, the application proxy service is used to detect traffic and load, and the application proxy service can include a traffic detection service. Specifically, the application proxy service can be JavaAgent, and the traffic detection service can be JavaAgent - traffic detector, and traffic data is collected through the JavaAgent - traffic detector.

[0045] After receiving the deployment request of the target application, the JavaAgent can be started. For example, the JavaAgent is triggered by a message. Then, according to the application-related instructions in the message, the JavaAgent - traffic detector automatically collects the traffic data of the target application machine, so as to analyze the collected traffic data subsequently, and then trigger the deployment of the target application when the traffic data is completed and disconnected.

[0046] In an alternative embodiment of the present disclosure, collecting the traffic data of the target application machine through the traffic detection service in step S220 may further include: monitoring the service ports of the target application machine through the network monitoring middleware of the traffic detection service, and then collecting the traffic data of the target application machine according to the service ports.

[0047] The principle of the JavaAgent - traffic detector collecting traffic data is as follows: automatically monitor the service ports of the target application machine through JPCap, such as port 1601, and automatically obtain the traffic data of this port on the target application machine. Among them, JPCap is a middleware that can monitor the current network situation.

[0048] Further, after collecting the traffic data of the target application machine, the application deployment method of the embodiment of the present disclosure may further include: reporting the traffic data of the target application machine to the data storage service according to a preset time period, so as to detect whether the traffic of the target application has been cleared to zero through the data storage service.

[0049] Among them, the data storage service may be an ETCD service. ETCD is an open-source distributed unified key-value storage, which is used for shared configuration, service discovery, and scheduling coordination of distributed systems or computer clusters. ECTD helps to promote more secure automatic updates, coordinate the work of scheduling to hosts, and help set up the overlay network of containers.

[0050] In the embodiment of the present disclosure, the data reporting time period, that is, the preset time period, can be preset. According to the preset time period, the collected traffic data of the target application machine is reported to the ETCD service. For example, the JavaAgent - traffic detector reports the collected traffic data to the data storage service every 5 seconds. The ETCD service analyzes the reported traffic data to detect whether the traffic of the target application has been cleared to zero.

[0051] Specifically, the JavaAgent - traffic detector can load the classes with annotations such as controller / service in the current classpath (that is, an environment variable to be set in the Java environment configuration), and add a counter at the entrance of the method. Each time traffic is detected, the call count is incremented, and information is reported and stored in the ETCD service according to the window time of 5 seconds (that is, the preset time period).

[0052] In the embodiments of the present disclosure, detecting whether the traffic of the target application has been cleared through the ETCD service may include: detecting whether there is no traffic data of the target application in the traffic data of the target application machine within the current N seconds through the ETCD service, that is, detecting that the target application machine has not received an application request for the target application within the current N seconds; if not, it is determined that the traffic of the target application has been cleared. Among them, the value of N can be set according to actual needs.

[0053] In the embodiments of the present disclosure, the traffic data of the target application machine is collected through the traffic detection service of the application proxy service, and the collected traffic data is reported to the data storage service, so as to analyze the collected traffic data through the data storage service, detect whether the traffic of the target application has been cleared, and then trigger the application deployment service to complete the deployment of the target application when the traffic of the target application has been cleared.

[0054] Step S230, trigger the proxy server to set the backup state of the target application to cold backup through the traffic detection service.

[0055] In the embodiments of the present disclosure, the proxy server can be Nginx or NP, that is, Nginx Plus. In the following, the proxy server is NP for description.

[0056] Moreover, cold backup can be understood as a state where no read and write operations are performed. After receiving the deployment request of the target application, JavaAgent can be started, such as triggering JavaAgent through a message, and then the JavaAgent-traffic detector triggers NP to set the backup state of the target application to cold backup according to the application-related instructions in the message.

[0057] In an alternative embodiment of the present disclosure, triggering the proxy server to set the backup state of the target application to cold backup in step S230 through the traffic detection service may further include: triggering the cold backup interface of the proxy server through the traffic detection service; using the cold backup interface, setting the backup state of the target application on the proxy server to cold backup according to the identification information of the target application.

[0058] The JavaAgent-traffic detector triggers the cold backup interface provided by NP according to the application-related instructions in the message, and through this cold backup interface, changes the backup state of the target application on NP to cold backup according to the identification information of the target application.

[0059] In the embodiments of the present disclosure, a traffic detection service of an application proxy service is used to trigger a cold standby interface on the proxy server side, so as to change the backup status of the target application on the proxy server to cold backup through the cold standby interface. In this way, after the proxy server receives an application request of the target application, it can not process the application request of the target application, providing conditions for the application deployment service to deploy the target application.

[0060] Step S240, if it is detected according to the traffic data of the target application machine that the traffic of the target application has been cleared, then the target application is deployed on the target application machine through the application deployment service of the target application.

[0061] If it is detected according to the traffic data of the target application machine that the traffic of the target application has been cleared, the application deployment service of the target application can be triggered to deploy the target application on the target application machine through this application deployment service.

[0062] In an alternative embodiment of the present disclosure, the number of target application machines is one or more. Further, the application deployment method may further include: deploying the target application on one or more target application machines through the application deployment service according to the grouping information and scheduling order of one or more pre-set target application machines.

[0063] In the embodiments of the present disclosure, the number of target application machines is one or more, and the grouping information and scheduling order of these target application machines can be pre-set. For example, the target application needs to be deployed on 10 target application machines, and these 10 target application machines are divided into five groups, namely A1, A2, A3, A4, and A5, with two target application machines in each group, and the set scheduling order is A1 - A2 - A3 - A4 - A5 in sequence. And, through the application deployment service, the target application is deployed on the target application machines according to the pre-set grouping information and scheduling order.

[0064] In the embodiments of the present disclosure, the grouping information and scheduling order of one or more target application machines can be pre-set, so that the application deployment service can deploy the target application on one or more target application machines according to the grouping information and scheduling order. In this way, deploying the application by group and by machine can control the deployment order of the target application on the target application machines at any time.

[0065] In an alternative embodiment of the present disclosure, after deploying the target application on the target application machine through the application deployment service of the target application, the application deployment method may further include: triggering the proxy server to set the backup status of the target application to hot backup through the traffic detection service; detecting whether the traffic data of the target application has reached the target application machine through the traffic detection service, and if so, closing the traffic detection service.

[0066] Among them, hot backup can be understood as a state in which both read and write operations can be executed. After the target application is deployed on the target application machine through the application deployment service, the NP can be triggered by the JavaAgent - traffic detector to set the backup state of the target application to hot backup; and, the JavaAgent - traffic detector can be used to detect whether the traffic data of the target application has reached the target application machine, that is, whether the target application machine has received the application request of the target application. If so, the JavaAgent - traffic detector is closed, that is, the traffic detection is stopped.

[0067] In an alternative embodiment of the present disclosure, triggering the proxy server to set the backup state of the target application to hot backup through the traffic detection service may further include: triggering the hot standby interface of the proxy server through the traffic detection service; using the hot standby interface, according to the identification information of the target application, setting the backup state of the target application on the proxy server to hot backup.

[0068] The JavaAgent - traffic detector triggers the hot standby interface provided by the NP according to the application - related instructions in the message. Through this hot standby interface, according to the identification information of the target application, the backup state of the target application on the NP is changed to hot backup. It should be noted that the cold standby interface and the hot standby interface may be the same interface or different interfaces, which are used to change the backup state of the target application on the NP.

[0069] Triggering the hot standby interface on the proxy server side through the traffic detection service of the application proxy service, so as to change the backup state of the target application on the proxy server to hot backup through the hot standby interface, realizing the automatic hot standby of the target application on the proxy server. It can be seen that in the embodiments of the present disclosure, through the detection and collection of traffic data by the traffic detection service of the application proxy service, the switching between the cold backup and hot backup of the target application on the proxy server can be realized.

[0070] In addition, after the proxy server receives the application request of the target application, it can process the application request of the target application. And, after it is detected through the traffic detection service that the target application machine has received the application request of the target application, the traffic detection service can be stopped.

[0071] Figure 3 is a flowchart of an application deployment method shown according to another exemplary embodiment. As Figure 3 shown, the application deployment method may specifically include the following steps.

[0072] Step S301, after receiving the deployment request of the target application, start the JavaAgent.

[0073] Step S302, use the traffic detector of JavaAgent to collect the traffic data of the target application machine, and the traffic detector of JavaAgent reports the traffic data of the target application machine to the ETCD service according to a preset time period, so as to detect whether the traffic of the target application has been cleared to zero through the ETCD service.

[0074] Specifically, the principle of the JavaAgent - traffic detector to collect traffic data is: automatically monitor the business port of the target application machine, such as port 1601, through JPCap, and automatically obtain the traffic data of this port on the target application machine.

[0075] The specific implementation of the ETCD service to detect whether the traffic of the target application has been cleared to zero can be: the ETCD service detects whether there is no traffic data of the target application in the traffic data of the target application machine within the current N seconds, that is, detects that the target application machine has not received an application request for the target application within the current N seconds; if not, it is determined that the traffic of the target application has been cleared to zero. Among them, the value of N can be set according to actual needs.

[0076] Step S303, trigger the cold standby interface of the NP through the traffic detector of JavaAgent, and then use the cold standby interface to set the backup status of the target application on the NP to cold backup according to the identification information of the target application.

[0077] Step S304, if it is detected that the traffic of the target application has been cleared to zero according to the traffic data of the target application machine, then deploy the target application on the target application machine through the application deployment service of the target application.

[0078] Among them, the number of target application machines is one or more, and the grouping information and scheduling order of one or more target application machines can be preset in advance. The application deployment service can deploy the target application on one or more target application machines according to the preset grouping information and scheduling order.

[0079] Step S305, trigger the hot standby interface of the NP through the traffic detector of JavaAgent, and then use the hot standby interface to set the backup status of the target application on the NP to hot backup according to the identification information of the target application.

[0080] Step S306, use the traffic detector of JavaAgent to detect whether the traffic data of the target application has reached the target application machine. If so, turn off the traffic detection service.

[0081] The application deployment method provided by the embodiments of the present disclosure starts an application proxy service when a target application needs to be deployed. The traffic detection service of the application proxy service is used to collect traffic data of the target application machine, and the traffic detection service triggers the proxy server to set the target application to cold backup. Then, when it is detected that the data of the target application is cleared according to the traffic data of the target application machine, the target application is deployed on the target application machine through the application deployment service. On the one hand, the traffic detection service of the application proxy service is used to collect traffic data and trigger the proxy server to perform automatic cold backup, solving the problem that manual cold backup is required in the related art. On the other hand, application deployment is performed when the target application traffic is cleared, which can avoid directly and forcefully destroying the container and restarting the service.

[0082] Figure 4 It is a flowchart showing traffic limiting for a target application machine according to an exemplary embodiment. Figure 4 It shows the process of traffic limiting for a target application machine through the pressure detection service of the application proxy service after the target application is deployed on the target application machine through the application deployment service of the target application.

[0083] The application proxy service can be JavaAgent, and the pressure detection service can be JavaAgent - pressure detector. The JavaAgent - pressure detector is used to collect traffic data for traffic limiting according to the collected traffic data.

[0084] Such as Figure 4 shown, the process of traffic limiting for a target application machine can specifically include the following steps.

[0085] Step S410, obtain the application health data of the target application machine.

[0086] Specifically, the application health data of the target application machine is obtained through the Java extension manager. For example, the CPU usage rate of the target application machine, the heap memory usage rate of the target application machine, the thread situation of the target application machine, and the input / output situation of the target application machine.

[0087] Step S420, if it is determined according to the application health data that the machine load of the target application machine is greater than the preset load threshold, then obtain the historical response data of the target application machine through the pressure detection service.

[0088] In this step, the machine load of the target application machine is determined according to the application health data of the target application machine. If the machine load of the target application machine is greater than the preset load threshold, it means that the load of the target application machine is too high, and at this time, traffic splitting needs to be performed on the target application machine.

[0089] For example, if the memory configuration of the Java extension manager is 2G, and the heap memory usage of the target application machine exceeds 1.8G at this time, it indicates that the load is too high.

[0090] In this step, if it is determined that traffic diversion needs to be performed on the target application machine, the historical response data of the target application machine can be obtained through the JavaAgent - pressure detector, so as to limit the traffic of the target application machine based on the historical response data.

[0091] Among them, the JavaAgent - pressure detector can obtain the historical response data of the target application machine through the JavaAgent - traffic detector. The JavaAgent - pressure detector can also have the function of collecting response data. Each time a response occurs, the call count of the JavaAgent - pressure detector increases, and the response duration is obtained.

[0092] Step S430, based on the historical response data, determine whether there is a target response on the target application machine whose traffic volume is greater than the preset traffic volume threshold or the access duration is greater than the preset access duration threshold.

[0093] Step S440, if there is a target response on the target application machine, perform traffic limiting processing on the target application machine, or trigger the proxy server to adjust the weight of the target application machine.

[0094] Based on the historical response data, determine whether there is a target response on the target application machine with excessive traffic volume (i.e., the traffic volume is greater than the preset traffic volume threshold) or extremely long access duration (i.e., the access duration is greater than the preset access duration). If it is determined that there is a target response, traffic limiting processing can be performed on the target application machine, or trigger the NP to adjust the weight of the target application machine, so that the target application machine can reduce the number of application requests to reduce the load of the target application machine.

[0095] The support capabilities of some problem machines or aging machines are limited, and there is no traffic monitoring for the machines in the application deployment solutions of related technologies, which may lead to the risk of machine downtime. In the embodiments of the present disclosure, after deploying the target application on the target application machine, the application health data of the target application machine can be obtained. When detecting the load of the target application machine through the application health data, the historical response data is collected through the pressure detection service of the application proxy service, and then the traffic of the target application machine is limited according to the historical response data, or trigger the proxy server to adjust the weight of the target application machine, so as to achieve the purpose of limiting the traffic of the target application machine, thereby reducing the load of the target application machine.

[0096] In an alternative embodiment of the present disclosure, the application proxy service includes a retry enhancement service, a traffic limiting enhancement service, and a circuit breaker enhancement service.

[0097] The retry enhancement service can be a JavaAgent - retry enhancer, which is used to set the retry times of service methods again, re - register and broadcast routing information. The traffic - limiting enhancement service can be a JavaAgent - traffic - limiting enhancer, which is used to increase through Java Assit bytecode. When it detects that the traffic is too large and the load of the target application server is too high, it automatically adjusts the threshold and specifies the traffic - limiting metrics of the JSF (Java Server Faces, which provides standard programming interfaces and tag libraries for Java developers developing web - based user interfaces), and re - registers and broadcasts routing information. The circuit - breaker enhancement service can be a JavaAgent - circuit - breaker enhancer, which is used to generate the circuit - breaker callback method of JSF through bytecode enhancement technology, re - register the route and broadcast it.

[0098] In the embodiments of the present disclosure, the retry enhancement service, the traffic - limiting enhancement service, and the circuit - breaker enhancement service can be used for traffic - limiting of the target application machine.

[0099] Figure 5 It is an architecture diagram of an application deployment system shown according to an exemplary embodiment. As Figure 5 shown, the application deployment system can include an application deployment platform, application probes, and basic services.

[0100] Among them, the application deployment platform can include an application deployment service. Through the application deployment service, the grouped release orchestration of applications, the deployment verification processing of applications, and the application coordination processing can be realized.

[0101] The application probe part can include each application and the application proxy service corresponding to the application. Figure 5 In it, the application probe part includes application A and its application proxy service, application B and its application proxy service, application C and its application proxy service.

[0102] The basic service part can include a data storage service, a timed task, JSF, and a proxy server. Among them, the data storage service can be an ECTD service, the timed task is used to report data regularly, JSF is a standard programming interface and tag library provided for Java developers developing web - based user interfaces, and the proxy server can be an NP.

[0103] The application deployment system provided by the embodiments of the present disclosure starts an application proxy service when it is necessary to deploy a target application. The traffic detection service of the application proxy service is used to collect traffic data of the target application machine, and the traffic detection service is used to trigger the proxy server to set the target application to cold backup. Then, when it is detected that the data of the target application is cleared according to the traffic data of the target application machine, the target application is deployed on the target application machine through the application deployment service. On the one hand, the traffic detection service of the application proxy service is used to collect traffic data and trigger the proxy server to perform automatic cold backup, solving the problem that manual cold backup is required in the related art. On the other hand, application deployment is performed when the traffic of the target application is cleared, which can avoid directly and forcefully destroying the container and restarting the service.

[0104] Figure 6 It is a block diagram of an application deployment device shown according to an exemplary embodiment. As Figure 6 shown, the application deployment device 600 includes a proxy service startup module 610, a traffic data collection module 620, a backup status setting module 630, and an application deployment module 640.

[0105] Among them, the proxy service startup module 610 can be used to: start the application proxy service after receiving a deployment request for the target application, where the application proxy service includes a traffic detection service; the traffic data collection module 620 can be used to: collect traffic data of the target application machine through the traffic detection service, where the target application machine is the machine on which the target application is to be deployed; the backup status setting module 630 can be used to: trigger the proxy server to set the backup status of the target application to cold backup through the traffic detection service; the application deployment module 640 can be used to: if it is detected that the traffic of the target application has cleared according to the traffic data of the target application machine, deploy the target application on the target application machine through the application deployment service of the target application.

[0106] In an alternative embodiment of the present disclosure, the backup status setting module 630 can also be used to: trigger the proxy server to set the backup status of the target application to hot backup through the traffic detection service; and, the application deployment module 640 can also be used to: detect whether the traffic data of the target application has reached the target application machine through the traffic detection service, and if so, close the traffic detection service.

[0107] In an alternative embodiment of the present disclosure, the traffic data collection module 620 can also be used to: monitor the service ports of the target application machine through the network monitoring middleware of the traffic detection service, and then collect the traffic data of the target application machine according to the service ports.

[0108] In an alternative embodiment of the present disclosure, the traffic data collection module 620 may also be configured to: report the traffic data of the target application machine to the data storage service according to a preset time period, so as to detect whether the traffic of the target application has been cleared to zero through the data storage service.

[0109] In an alternative embodiment of the present disclosure, the backup status setting module 630 may also be configured to: trigger the cold backup interface of the proxy server through the traffic detection service; use the cold backup interface to set the backup status of the target application on the proxy server to cold backup according to the identification information of the target application; and, trigger the hot backup interface of the proxy server through the traffic detection service; use the hot backup interface to set the backup status of the target application on the proxy server to hot backup according to the identification information of the target application.

[0110] In an alternative embodiment of the present disclosure, the application proxy service includes a pressure detection service, and the application deployment device 600 includes a flow limiting module 650. The flow limiting module 650 may be configured to: obtain the application health data of the target application machine; if it is determined according to the application health data that the machine load of the target application machine is greater than a preset load threshold, obtain the historical response data of the target application machine through the pressure detection service; according to the historical response data, determine whether there is a target response on the target application machine whose access volume is greater than a preset access volume threshold or access duration is greater than a preset access duration threshold; if there is a target response on the target application machine, perform flow limiting processing on the target application machine, or trigger the proxy server to adjust the weight of the target application machine.

[0111] In an alternative embodiment of the present disclosure, the application proxy service includes a retry enhancement service, a flow limiting enhancement service, and a circuit breaker enhancement service.

[0112] In an alternative embodiment of the present disclosure, the number of target application machines is one or more. The application deployment module 640 may also be configured to: deploy the target application on one or more target application machines through the application deployment service according to the pre-set grouping information and scheduling order of the one or more target application machines.

[0113] Regarding the device in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0114] Figure 7 is a block diagram of an electronic device shown according to an exemplary embodiment. The following refers to Figure 7 to describe the electronic device 700 according to this embodiment of the present disclosure. Figure 7 The electronic device 700 shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.

[0115] AsFigure 7 As shown, the electronic device 700 is presented in the form of a general computing device. The components of the electronic device 700 may include, but are not limited to: at least one of the above-mentioned processing units 710, at least one of the above-mentioned storage units 720, a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710), and a display unit 740.

[0116] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 710, so that the processing unit 710 executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification. For example, the processing unit 710 can execute steps such as Figure 2 shown in, after receiving the deployment request of the target application, start the application proxy service, where the application proxy service includes a traffic detection service; step S220, collect traffic data of the target application machine through the traffic detection service, where the target application machine is the machine to be deployed with the target application; step S230, trigger the proxy server to set the backup state of the target application to cold backup through the traffic detection service; step S240, if it is detected that the target application has zero traffic according to the traffic data of the target application machine, then deploy the target application on the target application machine through the application deployment service of the target application.

[0117] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 721 and a cache storage unit 722, and may further include a read-only storage unit (ROM) 723.

[0118] The storage unit 720 may further include a program / utilities 724 having a set (at least one) of program modules 725. Such program modules 725 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0119] The bus 730 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of the various bus structures.

[0120] The electronic device 700 can also communicate with one or more external devices 800 (such as a keyboard, a pointing device, a Bluetooth device, etc.), can also communicate with one or more devices that enable a user to interact with the electronic device 700, and can communicate with any device (such as a router, a modem, etc.) that enables the electronic device 700 to communicate with one or more other computing devices. Such communication can be carried out through the input / output (I / O) interface 750. Moreover, the electronic device 700 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and a public network, such as the Internet) through the network adapter 760. As shown in the figure, the network adapter 760 communicates with other modules of the electronic device 700 through the bus 730. It should be understood that although not shown in the figure, other hardware and software modules can be used in combination with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0121] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0122] In an exemplary embodiment, there is also provided a computer-readable storage medium including instructions, such as a memory including instructions, and the above instructions can be executed by a processor of the device to complete the above method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0123] In an exemplary embodiment, there is also provided a computer program product, including a computer program and instructions, and when the computer program and instructions are executed by a processor, the online file processing method in the above embodiments is implemented.

[0124] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0125] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. An application deployment method, characterized in that, Including: After receiving the deployment request of the target application, start the application proxy service; wherein, the application proxy service includes a traffic detection service; Collect traffic data of the target application machine through the traffic detection service; wherein, the target application machine is the machine on which the target application is to be deployed; Trigger the proxy server to set the backup status of the target application to cold backup through the traffic detection service; If it is detected that the traffic of the target application has cleared based on the traffic data of the target application machine, then deploy the target application on the target application machine through the application deployment service of the target application.

2. The method according to claim 1, characterized in that, After deploying the target application on the target application machine through the application deployment service of the target application, the method further includes: Trigger the proxy server to set the backup status of the target application to hot backup through the traffic detection service; Detect whether the traffic data of the target application has reached the target application machine through the traffic detection service, and if so, close the traffic detection service.

3. The method according to claim 1, characterized in that, The collecting the traffic data of the target application machine through the traffic detection service includes: Monitor the service ports of the target application machine through the network monitoring middleware of the traffic detection service, and then collect the traffic data of the target application machine according to the service ports.

4. The method according to claim 3, characterized in that, After collecting the traffic data of the target application machine, the method further includes: Report the traffic data of the target application machine to the data storage service at a preset time period, so as to detect whether the traffic of the target application has cleared through the data storage service.

5. The method according to claim 2, characterized in that, The triggering the proxy server to set the backup status of the target application to cold backup through the traffic detection service includes: Trigger the cold backup interface of the proxy server through the traffic detection service; Use the cold backup interface to set the backup status of the target application on the proxy server to cold backup according to the identification information of the target application; And, the triggering the proxy server to set the backup status of the target application to hot backup through the traffic detection service includes: Trigger the hot backup interface of the proxy server through the traffic detection service; Use the hot backup interface to set the backup status of the target application on the proxy server to hot backup according to the identification information of the target application.

6. The method according to claim 1, characterized in that, The application proxy service includes a pressure detection service; Wherein, after deploying the target application on the target application machine through the application deployment service of the target application, the method further includes: Obtain the application health data of the target application machine; If it is determined that the machine load of the target application machine is greater than a preset load threshold according to the application health data, then obtain the historical response data of the target application machine through the pressure detection service; Judge whether there is a target response on the target application machine whose access volume is greater than a preset access volume threshold or access duration is greater than a preset access duration threshold according to the historical response data; If the target response exists on the target application machine, perform traffic limiting processing on the target application machine, or trigger the proxy server to adjust the weight of the target application machine.

7. The method according to claim 1, characterized in that, The application proxy service includes a retry enhancement service, a traffic limiting enhancement service, and a circuit breaker enhancement service.

8. The method according to any one of claims 1 to 7, characterized in that, The number of the target application machines is one or more; Wherein, the method further includes: According to the pre-set grouping information and scheduling order of one or more of the target application machines, deploy the target application on one or more of the target application machines through the application deployment service.

9. An application deployment device, characterized in that, Including: A proxy service startup module, configured to start the application proxy service after receiving a deployment request for a target application; wherein, the application proxy service includes a traffic detection service; A traffic data collection module, configured to collect traffic data of a target application machine through the traffic detection service; wherein, the target application machine is a machine on which the target application is to be deployed; A backup status setting module, configured to trigger the proxy server to set the backup status of the target application to cold backup through the traffic detection service; An application deployment module, configured to, if it is detected according to the traffic data of the target application machine that the traffic of the target application has cleared, deploy the target application on the target application machine through the application deployment service of the target application.

10. A computer-readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the application deployment method according to any one of claims 1 to 8.

11. An electronic device, characterized in that Including: A processor; And a memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the application deployment method according to any one of claims 1 to 8 by executing the executable instructions.