CN113778504B - Publishing method, publishing system and routing device - Google Patents

Publishing method, publishing system and routing device Download PDF

Info

Publication number
CN113778504B
CN113778504B CN202110217573.XA CN202110217573A CN113778504B CN 113778504 B CN113778504 B CN 113778504B CN 202110217573 A CN202110217573 A CN 202110217573A CN 113778504 B CN113778504 B CN 113778504B
Authority
CN
China
Prior art keywords
application server
release
information
target application
current
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
CN202110217573.XA
Other languages
Chinese (zh)
Other versions
CN113778504A (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.)
Xi'an Jingxundi Supply Chain Technology Co ltd
Original Assignee
Xi'an Jingxundi Supply Chain Technology Co 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 Xi'an Jingxundi Supply Chain Technology Co ltd filed Critical Xi'an Jingxundi Supply Chain Technology Co ltd
Priority to CN202110217573.XA priority Critical patent/CN113778504B/en
Publication of CN113778504A publication Critical patent/CN113778504A/en
Application granted granted Critical
Publication of CN113778504B publication Critical patent/CN113778504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a release method, a release system and a routing device, and relates to the technical field of computers. One embodiment of the method comprises the following steps: receiving a locking notification sent by an ETCD cluster; wherein, the locking notification includes: information of the target application server; the locking notification is generated by the ETCD cluster according to the locking state of the target application server; according to the information of the target application server, obtaining pre-configured release information from a configuration service platform; determining an installation package according to the release information; updating the application in the target application server according to the installation package; updating priorities of a plurality of application servers in the configuration service platform; and changing the release state of the target application server in the ETCD cluster from locking to unlocking. According to the implementation mode, an application server does not need to be expanded, the probability of service interruption in the release process is reduced, and the service reliability is improved.

Description

Publishing method, publishing system and routing device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a publishing method, a publishing system, and a routing device.
Background
With the increase in the number of requests, application servers typically provide services to the outside in clusters. In order to meet the changing business demands, the application of the application server needs to be adaptively updated.
In the prior art, an extended application server is usually prepared, an application to be published is published to the extended application server, and updating of an application version in the application server is completed in a rolling publishing mode.
However, the method needs to prepare an extended application server, and the release process is complicated. In addition, in the process of updating the application version, service interruption may occur, and user experience is reduced.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a publishing method, a publishing system and a routing device, which do not need to prepare an extended application server, reduce the probability of service interruption in the publishing process and improve the service reliability.
In a first aspect, an embodiment of the present invention provides a publishing method, including:
Receiving a locking notification sent by an ETCD cluster; wherein, the locking notification includes: information of the target application server; the locking notification is generated by the ETCD cluster according to the locking state of the target application server;
According to the information of the target application server, obtaining pre-configured release information from a configuration service platform;
Determining an installation package according to the release information;
updating the application in the target application server according to the installation package;
updating priorities of a plurality of application servers in the configuration service platform;
and changing the release state of the target application server in the ETCD cluster from locking to unlocking.
Alternatively, the process may be carried out in a single-stage,
The updating the priorities of the application servers in the configuration service platform comprises the following steps:
And updating the priority of the application server with the highest priority to be the lowest, and updating the priority of the target application server to be the highest.
Alternatively, the process may be carried out in a single-stage,
Further comprises:
Displaying a configuration page;
responding to the triggering operation for the configuration page, and determining the release information;
and sending the release information to the configuration service platform.
In a second aspect, an embodiment of the present invention provides a routing method, including:
responding to the service request, and acquiring static configuration of a plurality of application servers from a configuration service platform; wherein the static configuration comprises: a priority; the priority is determined by a gray level release platform according to the release state of the application server;
Load information of the application servers is obtained from the ETCD cluster; wherein, the load information includes: the release state;
Selecting a target application server from the application servers according to static configuration and load information of each application server;
and routing the service request to the target application server.
Alternatively, the process may be carried out in a single-stage,
The static configuration further comprises: maximum number of requested connections;
The load information further includes: the number of currently requested connections;
The selecting a target application server from the application servers according to the static configuration and load information of each application server comprises the following steps:
the application server with the highest priority is used as the current application server to execute:
And determining whether the current request connection number of the current application server is smaller than the maximum request connection number of the current application server, if so, determining whether the release state of the current application server is unlocking, and if so, determining that the current application server is the target application server.
Alternatively, the process may be carried out in a single-stage,
Further comprises:
And if the current request connection number of the current application server is not less than the maximum request connection number of the current application server, or the release state of the current application server is locked, updating the current application server according to the order of the priority from high to low, and executing the determination of whether the current request connection number of the current application server is less than the maximum request connection number of the current application server.
Alternatively, the process may be carried out in a single-stage,
Further comprises:
Determining whether the sum of the residual request connection numbers of each application server is smaller than a connection number threshold value, and if so, sending alarm information to a monitoring platform, wherein the alarm information is used for prompting the addition of the application server; wherein the remaining number of requested connections is a difference between the maximum number of requested connections and the current number of requested connections.
In a third aspect, an embodiment of the present invention provides a gray scale publishing platform, including:
The receiving module is configured to receive a locking notification sent by the ETCD cluster; wherein, the locking notification includes: information of the target application server; the locking notification is generated by the ETCD cluster according to the locking state of the target application server;
The release module is configured to acquire pre-configured release information from the configuration service platform according to the information of the target application server; determining an installation package according to the release information; updating the application in the target application server according to the installation package;
the updating module is configured to update the priorities of a plurality of application servers in the configuration service platform; and changing the release state of the target application server in the ETCD cluster from locking to unlocking.
In a fourth aspect, an embodiment of the present invention provides a routing device, including:
The acquisition module is configured to respond to the service request and acquire static configuration of a plurality of application servers from the configuration service platform; load information of the application servers is obtained from the ETCD cluster; wherein the static configuration comprises: a priority; the priority is determined by a gray level release platform according to the release state of the application server; the load information includes: the release state;
A determining module configured to select a target application server from the plurality of application servers according to static configuration and load information of each of the application servers;
and the routing module is configured to route the service request to the target application server.
In a fifth aspect, an embodiment of the present invention provides a publishing system, including: the gray scale publishing platform, the ETCD cluster, the configuration service platform and the routing device cluster formed by the routing devices in any embodiment.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including:
one or more processors;
Storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described in any of the embodiments above.
In a seventh aspect, an embodiment of the present invention provides a computer readable medium, on which a computer program is stored, wherein the program is executed by a processor to implement a method according to any of the embodiments above.
One embodiment of the above invention has the following advantages or benefits: and acquiring pre-configured release information from a configuration service platform according to the information of the target application server in the locking notification, and updating the application in the target application server based on the release information. In addition, the method determines the release time according to the release state of the application server, and updates the release state and the priority of the application server in time after the release is completed, so that the routing device can route the request according to the updated release state and priority, the probability of service interruption in the release process is reduced, and the service reliability is improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a flow chart of a publication method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of a routing method provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of a gray scale distribution platform according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a routing device provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of a publication system provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of a publication system provided in accordance with another embodiment of the present invention;
FIG. 7 is a flow chart of a method of publishing provided by another embodiment of the invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
Fig. 9 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The prior art adopts a rolling mode for publishing, but the method not only needs to prepare an application server in advance, but also can cause service interruption in the publishing process.
In view of this, as shown in fig. 1, an embodiment of the present invention provides a publishing method applied to a gray scale publishing platform, including:
Step 101: receiving a locking notification sent by an ETCD cluster; the locking notification includes: information of the target application server; the lock notification is generated by the ETCD cluster based on the lock status of the target application server.
ETCD is a highly available distributed key-value database. In the embodiment of the invention, the ETCD cluster determines the release state of the application server according to the current request connection number reported by the application server. For example, if the number of currently requested connections is 0, the release state of the application server is determined to be locked, otherwise, the release state thereof is unlocked. When the ETCD cluster determines that the release state is locked, it means that the grayscale release platform can update the application in the application server, and the ETCD cluster sends a locking notification to the grayscale release platform so as to trigger the grayscale release platform to execute the release process.
The information of the target application server may include: name, number, distribution status, etc. of the target application server.
Step 102: and acquiring pre-configured release information from the configuration service platform according to the information of the target application server.
The publishing information may include: a Git address, an application server packet, a name of an application server, an SSH (Secure Shell) key, a version number, etc.
Step 103: and determining the installation package according to the release information.
Step 104: and updating the application in the target application server according to the installation package.
Step 105: and updating the priorities of a plurality of application servers in the configuration service platform.
The embodiment of the invention enables the request to be preferentially routed to the application server which completes updating by improving the priority of the target application server.
Step 106: and changing the release state of the target application server in the ETCD cluster from locking to unlocking.
After the update of the application is completed, the embodiment of the invention can record the updated version number of the target application server and store the record information to the configuration service platform. The order of steps 105 and 106 may be reversed or performed concurrently.
And acquiring pre-configured release information from a configuration service platform according to the information of the target application server in the locking notification, and updating the application in the target application server based on the release information. In addition, the method determines the release time according to the release state of the application server, and updates the release state and the priority of the application server in time after the release is completed, so that the routing device can route the request according to the updated release state and priority, the probability of service interruption in the release process is reduced, and the service reliability is improved.
In one embodiment of the present invention, determining an installation package based on published information includes:
acquiring an application code according to the release information;
compiling the application code;
and packaging the compiling result to obtain the installation package.
According to the embodiment of the invention, the application code is acquired from the Git address according to the information such as the name of the application server. The process of determining the installation package is completely and automatically executed by the gray level release platform, human participation is not needed, and the application updating efficiency is improved.
In one embodiment of the present invention, updating priorities of a plurality of application servers in a configuration service platform includes:
And updating the priority of the application server with the highest priority to be the lowest, and updating the priority of the target application server to be the highest.
The priority order of the application servers is adjusted, and the request is preferentially routed to the application servers which finish updating so as to improve the service quality.
In one embodiment of the invention, the method further comprises:
Displaying a configuration page;
determining release information in response to a triggering operation for a configuration page;
and sending the release information to the configuration service platform.
The gray level release platform provides a configuration page, a user can input release information through the configuration page, and the gray level release platform can send the release information to the configuration service platform so as to enable the configuration service platform to store the release information. Through the embodiment of the invention, the user can configure the release information in the visual interface, and the operation is convenient.
In one embodiment of the present invention, the method may also present information of the application server, such as a release status, a current number of requested connections, a maximum number of requested connections, a current version number, load information, and the like. The user can monitor the release process of the application server through the displayed information.
In one embodiment of the invention, the method may further determine a requested traffic, and prompt the user to add the application server if the requested traffic exceeds a traffic threshold. The method can also display the request flow or directly send out prompt tones to the user so as to prompt the user that the current request flow is higher.
In one embodiment of the invention, the method can also display the history release record so as to facilitate the user to check the history release condition.
In one embodiment of the present invention, the user may also specify a version number through an interface provided by the grayscale publishing platform, which updates the application in the application server according to the specified version number. By the method, the user can realize version rollback.
As shown in fig. 2, an embodiment of the present invention provides a routing method, including:
Step 201: responding to the service request, and acquiring static configuration of a plurality of application servers from a configuration service platform; wherein, the static configuration comprises: a priority; the priority is determined by the gray level publishing platform according to the publishing state of the application server.
The method is applied to a routing device, and the routing device is obtained by the secondary development of the nginx. In a practical application scenario, the routing device generally provides services to the outside in the form of clusters.
Step 202: load information of a plurality of application servers is obtained from an ETCD cluster; the load information includes: the status is published.
Step 203: and selecting a target application server from the application servers according to the static configuration and the load information of each application server.
Step 204: the service request is routed to the target application server.
Because the gray level release platform can update the priority of the application server according to the release condition, the method can process the service request according to the updated priority in the routing process, and the service quality is improved. In addition, the running conditions of different application servers are considered through the load information, the service requests are reasonably distributed, the probability of service interruption in the release process is reduced, and the service request processing efficiency is improved.
In one embodiment of the present invention, the static configuration further comprises: maximum number of requested connections;
the load information further includes: the number of currently requested connections;
selecting a target application server from a plurality of application servers according to static configuration and load information of each application server, wherein the method comprises the following steps:
the application server with the highest priority is used as the current application server to execute:
And determining whether the current request connection number of the current application server is smaller than the maximum request connection number of the current application server, if so, determining whether the release state of the current application server is unlocking, and if so, determining that the current application server is a target application server.
If the current request connection number is smaller than the maximum request connection number, the application server can process other requests and can be used as a candidate target application server. Meanwhile, in the routing process, the release state of the application server is also considered, so that the request is prevented from being routed to the locked application server, and the failure of the request is avoided.
In one embodiment of the invention, the method further comprises:
if the current request connection number of the current application server is not less than the maximum request connection number of the current application server, or the release state of the current application server is locked, updating the current application server according to the order of the priority from high to low, and executing the determination of whether the current request connection number of the current application server is less than the maximum request connection number of the current application server.
According to the embodiment of the invention, the request is preferentially routed to the application server with higher priority according to the order of the priority from high to low, so that the application release process is quickened.
In one embodiment of the invention, the method further comprises:
Determining whether the sum of the residual request connection numbers of each application server is smaller than a connection number threshold value, and if so, sending alarm information to a monitoring platform, wherein the alarm information is used for prompting the addition of the application server; wherein the remaining number of requested connections is the difference between the maximum number of requested connections and the current number of requested connections.
When the sum of the remaining request connection numbers of each application server is smaller than the connection number threshold value, the current request number is larger, and the gray level release platform can add the application server to meet the request processing requirement. The invention can send alarm information to an external monitoring platform, and can display the alarm information through a page provided by the gray level release platform.
As shown in fig. 3, an embodiment of the present invention provides a gray scale distribution platform, including:
A receiving module 301, configured to receive a lock notification sent by the ETCD cluster; the locking notification includes: information of the target application server; the locking notification is generated by the ETCD cluster according to the locking state of the target application server;
The release module 302 is configured to obtain pre-configured release information from the configuration service platform according to the information of the target application server; determining an installation package according to the release information; updating the application in the target application server according to the installation package;
an updating module 303, configured to update priorities of a plurality of application servers in the configuration service platform; and changing the release state of the target application server in the ETCD cluster from locking to unlocking.
In one embodiment of the present invention, the publishing module 302 is configured to obtain the application code according to the publishing information; compiling the application code; and packaging the compiling result to obtain the installation package.
In one embodiment of the present invention, the update module 303 is configured to update the priority of the application server with the highest priority to the lowest and update the priority of the target application server to the highest.
In one embodiment of the present invention, further comprising: the display module is configured to display the configuration page; determining release information in response to a triggering operation for a configuration page; and sending the release information to the configuration service platform.
As shown in fig. 4, an embodiment of the present invention provides a routing device, including:
an obtaining module 401 configured to obtain static configuration of a plurality of application servers from a configuration service platform in response to a service request; load information of a plurality of application servers is obtained from an ETCD cluster; wherein, the static configuration comprises: a priority; the priority is determined by the gray level release platform according to the release state of the application server; the load information includes: a release state;
a determining module 402 configured to select a target application server among the plurality of application servers according to the static configuration and load information of each application server;
A routing module 403 configured to route the service request to the target application server.
In one embodiment of the present invention, the static configuration further comprises: maximum number of requested connections; the load information further includes: number of currently requested connections
A determining module 402, configured to execute, as the current application server, the application server with the highest priority: and determining whether the current request connection number of the current application server is smaller than the maximum request connection number of the current application server, if so, determining whether the release state of the current application server is unlocking, and if so, determining that the current application server is a target application server.
In one embodiment of the present invention, the determining module 402 is configured to update the current application server in order of priority from high to low if the current requested connection number of the current application server is not less than the maximum requested connection number thereof or the release state of the current application server is a lock, and perform determining whether the current requested connection number of the current application server is less than the maximum requested connection number thereof.
In one embodiment of the present invention, the determining module 402 is configured to determine whether the sum of the remaining requested connection numbers of each application server is smaller than the connection number threshold, and if so, send alarm information to the monitoring platform, where the alarm information is used to prompt for adding an application server; wherein the remaining number of requested connections is the difference between the maximum number of requested connections and the current number of requested connections.
As shown in fig. 5, an embodiment of the present invention provides a publishing system, including: the grayscale distribution platform 501, the ETCD cluster 502, the configuration service platform 503 of any of the above embodiments, and the routing device cluster 504 formed by the routing devices of any of the above embodiments.
The gray level release platform can acquire pre-configured release information from the configuration service platform according to the locking notification sent by the ETCD cluster, release the application to the target application server, change the release state of the target application server in the ETCD cluster after release is completed, and change the priority order in the service configuration platform, so that the routing device routes the request according to the updated release state and priority. The method does not need to prepare an extended application server, can reduce the probability of service interruption in the release process, and improves the service reliability.
In one embodiment of the invention, as shown in FIG. 6, the system further includes a queue service cluster 505. The application server extends and adds an automatic reporting module in logback log frames, and the automatic reporting module reports jvm information, network information, connection information and the like of the application server to the queue service cluster.
Specifically, the application server counts data such as the number of currently requested connections of different interfaces, where the different interfaces include: webSocket and HTTP (Hyper Text Transfer Protocol ). The application server reports the data to the queue service cluster at preset time intervals. The queue service cluster aggregates the information reported by the same application server, and calls the ETCD client to report the aggregated information to the ETCD cluster according to a preset time sliding window. If the queue service cluster detects that the information quantity reported by the application server exceeds a preset reporting threshold, the queue service cluster can send prompt information to the monitoring platform or display the prompt information through the gray level release platform.
According to the embodiment of the invention, the information reported by the queue service clusters corresponding to the application server is integrated, the data volume of the reported ETCD clusters is controlled, the data transmission is prevented from being blocked, and the data transmission quality and efficiency are improved.
As shown in fig. 7, an embodiment of the present invention provides a publishing method, which includes:
step 701: the gray level release platform displays a configuration page, and determines release information and static configuration of a plurality of application servers in response to triggering operation for the configuration page.
The static configuration of the application server may include: machine name, maximum number of requested connections, priority, etc.
Step 702: and the application servers report the current request connection quantity through the queue service cluster.
Step 703: the queue service cluster invokes the ETCD client to store the current number of requested connections to the ETCD cluster.
Step 704: the ETCD cluster determines the release state of each application server according to the current request connection number.
Step 705: when the release state of the target application server is determined to be locked, the ETCD cluster sends a locking notification to the gray release platform; the locking notification includes: information of the target application server.
Step 706: and the gray level release platform acquires release information from the configuration service platform according to the information of the target application server.
Step 707: and the gray level release platform determines the installation package according to release information.
Step 708: and the gray level release platform updates the application in the target application server according to the installation package.
Step 709: the gray level release platform updates the priority of the application server with the highest priority to be the lowest, and updates the priority of the target application server to be the highest.
Step 710: and the gray level release platform calls the ETCD client to change the release state of the target application server in the ETCD cluster from locking to unlocking.
Step 711: when receiving a service request, the routing device cluster acquires static configuration of a plurality of application servers from the configuration service platform, and acquires load information of the plurality of application servers from the ETCD cluster.
Step 712: the routing device cluster selects a target application server from a plurality of application servers according to static configuration and load information of each application server.
Step 713: the routing device cluster routes the service request to the target application server.
In the embodiment of the invention, a user can input release information through the interface provided by the gray release platform, then the gray release platform realizes application release, and the compiling and packaging processes and the like do not need manual intervention, so that the degree of automation is higher. And the gray level release platform can timely update the priority of the configuration service platform so that the routing device cluster processes the service request according to the updated priority.
The embodiment of the invention provides electronic equipment, which comprises:
one or more processors;
Storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of the embodiments described above.
The present invention provides a computer readable medium having stored thereon a computer program which when executed by a processor implements a method as in any of the embodiments described above.
Fig. 8 illustrates an exemplary system architecture 800 in which the publishing method or routing method or grayscale publishing platform or routing device of embodiments of the present invention may be applied.
As shown in fig. 8, a system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves as a medium for providing communication links between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 805 through the network 804 using the terminal devices 801, 802, 803 to receive or send messages or the like. Various communication client applications such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 801, 802, 803.
The terminal devices 801, 802, 803 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 805 may be a server providing various services, such as a background management server (by way of example only) that provides support for shopping-type websites browsed by users using the terminal devices 801, 802, 803. The background management server may analyze and process the received data such as the product information query request, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
It should be noted that, the publishing method or the routing method provided by the embodiment of the present invention is generally executed by the server 805, and accordingly, the gray scale publishing platform or the routing device is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, there is illustrated a schematic diagram of a computer system 900 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU) 901, which can execute various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
The following components are connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 901.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not in some cases limit the module itself, and for example, the transmitting module may also be described as "a module that transmits a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
Receiving a locking notification sent by an ETCD cluster; wherein, the locking notification includes: information of the target application server; the locking notification is generated by the ETCD cluster according to the locking state of the target application server; according to the information of the target application server, obtaining pre-configured release information from a configuration service platform;
Determining an installation package according to the release information;
updating the application in the target application server according to the installation package;
updating priorities of a plurality of application servers in the configuration service platform;
and changing the release state of the target application server in the ETCD cluster from locking to unlocking.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
responding to the service request, and acquiring static configuration of a plurality of application servers from a configuration service platform; wherein the static configuration comprises: a priority; the priority is determined by a gray level release platform according to the release state of the application server;
Load information of the application servers is obtained from the ETCD cluster; wherein, the load information includes: the release state;
Selecting a target application server from the application servers according to static configuration and load information of each application server;
and routing the service request to the target application server.
According to the technical scheme of the embodiment of the invention, the pre-configured release information is acquired from the configuration service platform according to the information of the target application server in the locking notification, and the application in the target application server is updated based on the release information. In addition, the method determines the release time according to the release state of the application server, and updates the release state and the priority of the application server in time after the release is completed, so that the routing device can route the request according to the updated release state and priority, the probability of service interruption in the release process is reduced, and the service reliability is improved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method of publishing comprising:
Receiving a locking notification sent by an ETCD cluster; wherein, the locking notification includes: information of the target application server; the locking notification is generated by the ETCD cluster according to the locking state of the target application server; according to the information of the target application server, obtaining pre-configured release information from a configuration service platform;
Determining an installation package according to the release information;
updating the application in the target application server according to the installation package;
updating priorities of a plurality of application servers in the configuration service platform;
and changing the release state of the target application server in the ETCD cluster from locking to unlocking.
2. The method of claim 1, wherein,
The updating the priorities of the application servers in the configuration service platform comprises the following steps:
And updating the priority of the application server with the highest priority to be the lowest, and updating the priority of the target application server to be the highest.
3. The method of claim 1 or 2, further comprising:
Displaying a configuration page;
responding to the triggering operation for the configuration page, and determining the release information;
and sending the release information to the configuration service platform.
4. A method of routing, comprising:
responding to the service request, and acquiring static configuration of a plurality of application servers from a configuration service platform; wherein the static configuration comprises: a priority; the priority is determined by a gray level release platform according to the release state of the application server;
Load information of the application servers is obtained from the ETCD cluster; wherein, the load information includes: the release state;
Selecting a target application server from the application servers according to static configuration and load information of each application server;
routing the service request to the target application server;
the static configuration further comprises: maximum number of requested connections;
The load information further includes: the number of currently requested connections;
The selecting a target application server from the application servers according to the static configuration and load information of each application server comprises the following steps:
the application server with the highest priority is used as the current application server to execute:
And determining whether the current request connection number of the current application server is smaller than the maximum request connection number of the current application server, if so, determining whether the release state of the current application server is unlocking, and if so, determining that the current application server is the target application server.
5. The method as recited in claim 4, further comprising:
And if the current request connection number of the current application server is not less than the maximum request connection number of the current application server, or the release state of the current application server is locked, updating the current application server according to the order of the priority from high to low, and executing the determination of whether the current request connection number of the current application server is less than the maximum request connection number of the current application server.
6. The method as recited in claim 4 or 5, further comprising:
Determining whether the sum of the residual request connection numbers of each application server is smaller than a connection number threshold value, and if so, sending alarm information to a monitoring platform, wherein the alarm information is used for prompting the addition of the application server; wherein the remaining number of requested connections is a difference between the maximum number of requested connections and the current number of requested connections.
7. A gradation release platform, comprising:
The receiving module is configured to receive a locking notification sent by the ETCD cluster; wherein, the locking notification includes: information of the target application server; the locking notification is generated by the ETCD cluster according to the locking state of the target application server;
The release module is configured to acquire pre-configured release information from the configuration service platform according to the information of the target application server; determining an installation package according to the release information; updating the application in the target application server according to the installation package;
the updating module is configured to update the priorities of a plurality of application servers in the configuration service platform; and changing the release state of the target application server in the ETCD cluster from locking to unlocking.
8. A routing apparatus, comprising:
The acquisition module is configured to respond to the service request and acquire static configuration of a plurality of application servers from the configuration service platform; load information of the application servers is obtained from the ETCD cluster; wherein the static configuration comprises: a priority; the priority is determined by a gray level release platform according to the release state of the application server; the load information includes: the release state;
A determining module configured to select a target application server from the plurality of application servers according to static configuration and load information of each of the application servers;
a routing module configured to route the service request to the target application server;
the static configuration further comprises: maximum number of requested connections;
the load information further includes: the number of currently requested connections;
The determining module is configured to execute the application server with the highest priority as the current application server: and determining whether the current request connection number of the current application server is smaller than the maximum request connection number of the current application server, if so, determining whether the release state of the current application server is unlocking, and if so, determining that the current application server is a target application server.
9. A distribution system, comprising: the greyscale publishing platform, ETCD cluster, configuration service platform of claim 7, and routing device cluster comprised of the routing devices of claim 8.
10. An electronic device, comprising:
one or more processors;
Storage means for storing one or more programs,
When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
11. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN202110217573.XA 2021-02-26 2021-02-26 Publishing method, publishing system and routing device Active CN113778504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110217573.XA CN113778504B (en) 2021-02-26 2021-02-26 Publishing method, publishing system and routing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110217573.XA CN113778504B (en) 2021-02-26 2021-02-26 Publishing method, publishing system and routing device

Publications (2)

Publication Number Publication Date
CN113778504A CN113778504A (en) 2021-12-10
CN113778504B true CN113778504B (en) 2024-05-17

Family

ID=78835644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110217573.XA Active CN113778504B (en) 2021-02-26 2021-02-26 Publishing method, publishing system and routing device

Country Status (1)

Country Link
CN (1) CN113778504B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032755A (en) * 2018-06-29 2018-12-18 优刻得科技股份有限公司 A kind of container service mandatory system and provide the method for container service
CN110740162A (en) * 2019-08-30 2020-01-31 上海连尚网络科技有限公司 Communication link establishing method, device, electronic equipment and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6944678B2 (en) * 2001-06-18 2005-09-13 Transtech Networks Usa, Inc. Content-aware application switch and methods thereof
US10944654B2 (en) * 2018-06-06 2021-03-09 Servicenow, Inc. Discovery and mapping of containerized software applications

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032755A (en) * 2018-06-29 2018-12-18 优刻得科技股份有限公司 A kind of container service mandatory system and provide the method for container service
CN110740162A (en) * 2019-08-30 2020-01-31 上海连尚网络科技有限公司 Communication link establishing method, device, electronic equipment and medium

Also Published As

Publication number Publication date
CN113778504A (en) 2021-12-10

Similar Documents

Publication Publication Date Title
CN111427701A (en) Workflow engine system and business processing method
CN110650209B (en) Method and device for realizing load balancing
CN109428926B (en) Method and device for scheduling task nodes
CN112084042B (en) Message processing method and device
US11463549B2 (en) Facilitating inter-proxy communication via an existing protocol
CN114827280A (en) Request processing method, device, equipment and medium
CN110071952B (en) Service call quantity control method and device
US9679262B2 (en) Image index routing
CN113778504B (en) Publishing method, publishing system and routing device
CN106933449B (en) Icon processing method and device
CN113760487B (en) Service processing method and device
CN113138943B (en) Method and device for processing request
CN112688982B (en) User request processing method and device
CN113238808A (en) Message pushing method and device
CN110909269B (en) Log reporting method and device
CN113282455A (en) Monitoring processing method and device
CN113572704A (en) Information processing method, production end, consumption end and server
CN113742617A (en) Cache updating method and device
CN112559001A (en) Method and device for updating application
CN116436855B (en) Data information processing method, device, electronic equipment and medium
CN115174588B (en) Bandwidth control method, device, apparatus, storage medium and program product
CN116112880B (en) MQ-based high concurrency short message sending method and device
CN112162868B (en) Data communication method, device and storage medium applied to cluster processing
CN113472565B (en) Method, apparatus, device and computer readable medium for expanding server function
CN111179097B (en) Method, device, electronic equipment and storage medium for modifying warranty

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