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

Publishing method, publishing system and routing device Download PDF

Info

Publication number
CN113778504A
CN113778504A CN202110217573.XA CN202110217573A CN113778504A CN 113778504 A CN113778504 A CN 113778504A CN 202110217573 A CN202110217573 A CN 202110217573A CN 113778504 A CN113778504 A CN 113778504A
Authority
CN
China
Prior art keywords
application server
information
target application
current
priority
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.)
Granted
Application number
CN202110217573.XA
Other languages
Chinese (zh)
Other versions
CN113778504B (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

Images

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 publishing method, a publishing system and a routing device, and relates to the technical field of computers. One embodiment of the method comprises: receiving a locking notice sent by the ETCD cluster; wherein the lock notification includes: information of the target application server; the lock notification is generated by the ETCD cluster according to a lock state of the target application server; acquiring pre-configured release information from a 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; updating 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. The implementation method does not need to prepare an extended application server, reduces the probability of service interruption in the issuing process and improves the service reliability.

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 distribution method, a distribution system, and a routing device.
Background
As the number of requests increases, application servers are typically served externally in clusters. To meet the changing business demands, the applications of the application server need to be updated adaptively.
In the prior art, an extended application server is generally prepared, an application to be published is published to the extended application server, and the update of an application version in the application server is completed in a rolling publishing manner.
However, this method requires the preparation of an extended application server, and the release process is cumbersome. In addition, service interruption may occur during the update of the application version, reducing user experience.
Disclosure of Invention
In view of this, embodiments of the present invention provide a distribution method, a distribution system, and a routing apparatus, which do not need to prepare an extended application server, reduce the probability of service interruption in the distribution process, and improve service reliability.
In a first aspect, an embodiment of the present invention provides a publishing method, including:
receiving a locking notice sent by the ETCD cluster; wherein the lock notification includes: information of the target application server; the lock notification is generated by the ETCD cluster according to a lock state of the target application server;
acquiring pre-configured release information from a 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;
updating 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.
Alternatively,
the updating the priorities of a plurality of application servers in the configuration service platform comprises:
and updating the priority of the application server with the highest priority to be the lowest priority, and updating the priority of the target application server to be the highest priority.
Alternatively,
further comprising:
displaying a configuration page;
determining the publishing information in response to a triggering operation for the configuration page;
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 publishing platform according to the publishing state of the application server;
acquiring load information of the plurality of application servers from the ETCD cluster; wherein the load information includes: the release state;
selecting a target application server from the plurality of application servers according to the static configuration and the load information of each application server;
routing the service request to the target application server.
Alternatively,
the static configuration further comprises: a maximum number of requested connections;
the load information further includes: the number of currently requested connections;
selecting a target application server from the plurality of application servers according to the static configuration and the load information of each application server, including:
and taking the application server with the highest priority as the current application server to execute the following steps:
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 unlocked, and if so, determining that the current application server is the target application server.
Alternatively,
further comprising:
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 sequence of the priority from high to low, and executing the determination 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,
further comprising:
determining whether the sum of the remaining connection request numbers of the application servers is smaller than a connection number threshold value, if so, sending alarm information to a monitoring platform, wherein the alarm information is used for prompting the addition of the application servers; wherein the remaining requested connection number is a difference between the maximum requested connection number and the current requested connection number.
In a third aspect, an embodiment of the present invention provides a grayscale publishing platform, including:
the receiving module is configured to receive a locking notification sent by the ETCD cluster; wherein the lock notification includes: information of the target application server; the lock notification is generated by the ETCD cluster according to a lock state of the target application server;
the release module is configured to acquire pre-configured release information from a 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 apparatus, including:
the acquisition module is configured to respond to the service request and acquire the static configuration of the plurality of application servers from the configuration service platform; acquiring load information of the plurality of application servers from the ETCD cluster; wherein the static configuration comprises: a priority; the priority is determined by a gray level publishing platform according to the publishing state of the application server; the load information includes: the release state;
the determining module is configured to select a target application server from the plurality of application servers according to the static configuration and the load information of each application server;
a routing module 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 distribution platform, the ETCD cluster and the configuration service platform in any embodiment, 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;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method as in any one of the embodiments described above.
In a seventh aspect, an embodiment of the present invention provides a computer-readable medium, on which a computer program is stored, where the computer program is configured to, when executed by a processor, implement the method in any of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: and acquiring pre-configured release information from the 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. The method does not need to prepare an extended application server, in addition, the method determines the issuing time according to the issuing state of the application server, and updates the issuing state and the priority of the application server in time after the issuing is finished, so that the routing device can route the request according to the updated issuing state and the priority, the probability of service interruption in the issuing process is reduced, and the service reliability is improved.
Further effects of the above-mentioned non-conventional alternatives will be 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 diagram of a publication method provided by one embodiment of the invention;
fig. 2 is a flow chart of a routing method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a gray scale publishing platform according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a routing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a publication system provided by one embodiment of the invention;
FIG. 6 is a schematic diagram of a publication system provided by another embodiment of the invention;
FIG. 7 is a flow chart of a method of publication provided by another embodiment of the invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as 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.
In the prior art, the publication is performed in a rolling manner, but the method not only needs to prepare the application server in advance, but also can cause service interruption in the publication process.
In view of this, as shown in fig. 1, an embodiment of the present invention provides a publishing method applied to a grayscale publishing platform, including:
step 101: receiving a locking notice sent by the ETCD cluster; wherein, the locking notification includes: information of the target application server; the lock notification is generated by the ETCD cluster according to the lock state 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 status of the application server is determined to be locked, otherwise, the release status thereof is unlocked. When the ETCD cluster determines that the release state is locked, the gray scale release platform can update the application in the application server, and the ETCD cluster sends a locking notice to the gray scale release platform so as to trigger the gray scale release platform to execute the release process.
The information of the target application server may include: name, number, release 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, a group of application servers, a name of an application server, an SSH (Secure Shell protocol) 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 leads the request to be preferentially routed to the application server completing the 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 application update is completed, the embodiment of the present invention may further 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 the 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. The method does not need to prepare an extended application server, in addition, the method determines the issuing time according to the issuing state of the application server, and updates the issuing state and the priority of the application server in time after the issuing is finished, so that the routing device can route the request according to the updated issuing state and the priority, the probability of service interruption in the issuing process is reduced, and the service reliability is improved.
In one embodiment of the present invention, determining an installation package according to the publishing information includes:
acquiring an application code according to the release information;
compiling the application code;
and packaging the compiling result to obtain an installation package.
According to the embodiment of the invention, the application code is obtained 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 automatically executed by the gray scale publishing platform, human participation is not needed, and the application updating efficiency is improved.
In one embodiment of the present invention, updating the 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 priority, and updating the priority of the target application server to be the highest priority.
And adjusting the priority order of the application servers, and preferentially routing the requests to the application servers completing the 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 trigger operation for a configuration page;
and sending the release information to a configuration service platform.
The gray scale publishing platform provides a configuration page, a user can input publishing information through the configuration page, and the gray scale publishing platform can send the publishing information to the configuration service platform so as to enable the configuration service platform to store the publishing information. Through the embodiment of the invention, the user can configure the published information on the visual interface, and the operation is convenient.
In an embodiment of the present invention, the method may further expose information of the application server, such as a release status, a current requested connection number, a maximum requested connection number, a current version number, load information, and the like. The user can monitor the issuing process of the application server through the displayed information.
In one embodiment of the invention, the method may also determine a requested traffic and prompt the user to add an application server if the requested traffic exceeds a traffic threshold. The method can also display the requested flow or directly send a prompt tone to the user to prompt the user that the current requested flow is higher.
In one embodiment of the invention, the method can also display the historical publishing records so as to facilitate the user to view the historical publishing conditions.
In an embodiment of the present invention, the user may further designate a version number through an interface provided by the grayscale issuing platform, and the grayscale issuing platform updates the application in the application server according to the designated 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 secondary development of nginx. In a practical application scenario, the routing device generally provides services to the outside in a cluster form.
Step 202: acquiring load information of a plurality of application servers from the ETCD cluster; wherein, the load information includes: and issuing the state.
Step 203: and selecting a target application server from the plurality of 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 publishing platform can update the priority of the application server according to the publishing 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 operation conditions of different application servers are considered through the load information, the service requests are reasonably distributed, the probability of service interruption in the issuing process is reduced, and the service request processing efficiency is improved.
In one embodiment of the present invention, the static configuration further comprises: a maximum number of requested connections;
the load information also comprises: the number of currently requested connections;
selecting a target application server from a plurality of application servers according to the static configuration and the load information of each application server, wherein the selection comprises the following steps:
and taking the application server with the highest priority as the current application server to execute the following steps:
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 unlocked, and if so, determining that the current application server is the target application server.
If the current number of requested connections is less than the maximum number of requested connections, the application server can process other requests and can be used as a candidate target application server. Meanwhile, in the routing process, the issuing state of the application server is also considered, and the request is prevented from being routed to the locked application server, so that the request is prevented from failing.
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 sequence of the priority from high to low, and executing to determine 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 sequence of the priority from high to low, so that the application issuing process is accelerated.
In one embodiment of the invention, the method further comprises:
determining whether the sum of the residual connection request numbers of all the application servers is smaller than a connection number threshold value, if so, sending alarm information to the monitoring platform, wherein the alarm information is used for prompting the addition of the application servers; wherein, the residual request connection number is the difference between the maximum request connection number and the current request connection number.
When the sum of the remaining request connection numbers of all the application servers is smaller than the connection number threshold, which indicates that the current request number is large, the gray scale publishing platform can add the application servers to meet the request processing requirement. The invention can send the alarm information to an external monitoring platform and can also display the alarm information through the page provided by the gray release platform.
As shown in fig. 3, an embodiment of the present invention provides a gray scale publishing platform, including:
a receiving module 301 configured to receive a lock 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;
a publishing module 302 configured to obtain pre-configured publishing 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 the priorities of the 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 an 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 an installation package.
In an embodiment of the present invention, the updating module 303 is configured to update the priority of the application server with the highest priority to be the lowest priority and update the priority of the target application server to be the highest priority.
In one embodiment of the present invention, further comprising: a presentation module configured to present a configuration page; determining release information in response to a trigger operation for a configuration page; and sending the release information to a configuration service platform.
As shown in fig. 4, an embodiment of the present invention provides a routing apparatus, including:
an obtaining module 401 configured to respond to the service request, and obtain static configurations of the plurality of application servers from the configuration service platform; acquiring load information of a plurality of application servers from the ETCD cluster; 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 load information includes: issuing a 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: a maximum number of requested connections; the load information also comprises: number of currently requested connections
A determining module 402 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 unlocked, and if so, determining that the current application server is the target application server.
In an embodiment of the present invention, the determining module 402 is configured to update the current application server according to the order from high priority to low priority if the current number of requested connections of the current application server is not less than the maximum number of requested connections thereof, or the release status of the current application server is locked, and perform the determination whether the current number of requested connections of the current application server is less than the maximum number of requested connections thereof.
In an embodiment of the present invention, the determining module 402 is configured to determine whether the sum of the remaining connection number requested by each application server is less than a connection number threshold, and if so, send an alarm message to the monitoring platform, where the alarm message is used to prompt addition of an application server; wherein, the residual request connection number is the difference between the maximum request connection number and the current request connection number.
As shown in fig. 5, an embodiment of the present invention provides a publishing system, including: the system comprises a grayscale distribution platform 501, an ETCD cluster 502, a configuration service platform 503 of any embodiment, and a routing device cluster 504 formed by the routing device of any embodiment.
The gray scale publishing platform can obtain pre-configured publishing information from the configuration service platform according to the locking notice sent by the ETCD cluster, publish the application to the target application server, and change the publishing state of the target application server in the ETCD cluster and the priority order in the service configuration platform after the publishing is completed, so that the routing device routes the request according to the updated publishing state and priority. The method does not need to prepare an extended application server, can reduce the probability of service interruption in the issuing process and improve 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 expands and adds an automatic reporting module in a logback log frame, 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 current request connection number of different interfaces, where the different interfaces include: WebSocket and HTTP (Hyper Text Transfer Protocol). And the application server reports the data to the queue service cluster at preset time intervals. And 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 value, the queue service cluster can send prompt information to the monitoring platform or display the prompt information through the gray scale release platform.
According to the embodiment of the invention, the information reported by the application server is integrated through the queue service cluster, the reported data volume of the ETCD cluster 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, where the method includes:
step 701: the gray scale publishing platform displays a configuration page, and determines static configuration of publishing information and a plurality of application servers in response to a trigger operation for the configuration page.
The static configuration of the application server can comprise: machine name, maximum number of requested connections, priority, etc.
Step 702: and reporting the current connection request quantity by the plurality of application servers through the queue service cluster.
Step 703: and the queue service cluster calls the ETCD client to store the current request connection quantity to the ETCD cluster.
Step 704: and 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 notice to the gray scale release platform; wherein, the locking notification includes: information of the target application server.
Step 706: and the gray release platform acquires release information from the configuration service platform according to the information of the target application server.
Step 707: and the gray scale publishing platform determines the installation package according to the publishing information.
Step 708: and the gray scale release platform updates the application in the target application server according to the installation package.
Step 709: and the gray scale release platform updates the priority of the application server with the highest priority to be the lowest priority and updates the priority of the target application server to be the highest priority.
Step 710: and the gray scale issuing platform calls the ETCD client to change the issuing state of the target application server in the ETCD cluster from locking to unlocking.
Step 711: when a business request is received, 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 the plurality of application servers according to the static configuration and the load information of each application server.
Step 713: the cluster of routing devices routes the service request to the target application server.
In the embodiment of the invention, a user can input release information through an interface provided by the gray release platform, then the gray release platform realizes application release, and the processes of compiling, packaging and the like do not need manual intervention, so that the automation degree is higher. And the gray level issuing platform updates the priority of the configuration service platform in time so that the routing device cluster processes the service request according to the updated priority.
An embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method of any of the embodiments as described above.
Embodiments of the present invention provide a computer-readable medium, on which a computer program is stored, which when executed by a processor implements the method according to any of the above embodiments.
Fig. 8 shows an exemplary system architecture 800 of a publication method or routing method or a grayscale publication platform or routing apparatus to which embodiments of the invention may be applied.
As shown in fig. 8, the system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 801, 802, 803 to interact with a server 805 over a network 804 to receive or send messages or the like. The terminal devices 801, 802, 803 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 805 may be a server that provides various services, such as a back-office management server (for example only) that supports shopping-like websites browsed by users using the terminal devices 801, 802, 803. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the distribution method or the routing method provided by the embodiment of the present invention is generally executed by the server 805, and accordingly, the grayscale distribution platform or the routing apparatus 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, shown is a block diagram of a computer system 900 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with 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 via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and 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 necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the 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 illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present invention, 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, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 flowchart 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 described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described 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 form a limitation on the modules themselves in some cases, and for example, the sending module may also be described as a "module sending 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 separate and not incorporated into the device.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
receiving a locking notice sent by the ETCD cluster; wherein the lock notification includes: information of the target application server; the lock notification is generated by the ETCD cluster according to a lock state of the target application server; acquiring pre-configured release information from a 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;
updating 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.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
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 publishing platform according to the publishing state of the application server;
acquiring load information of the plurality of application servers from the ETCD cluster; wherein the load information includes: the release state;
selecting a target application server from the plurality of application servers according to the static configuration and the load information of each application server;
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 notice, and the application in the target application server is updated based on the release information. The method does not need to prepare an extended application server, in addition, the method determines the issuing time according to the issuing state of the application server, and updates the issuing state and the priority of the application server in time after the issuing is finished, so that the routing device can route the request according to the updated issuing state and the priority, the probability of service interruption in the issuing process is reduced, and the service reliability is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method of publishing, comprising:
receiving a locking notice sent by the ETCD cluster; wherein the lock notification includes: information of the target application server; the lock notification is generated by the ETCD cluster according to a lock state of the target application server; acquiring pre-configured release information from a 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;
updating 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.
2. The method of claim 1,
the updating the priorities of a plurality of application servers in the configuration service platform comprises:
and updating the priority of the application server with the highest priority to be the lowest priority, and updating the priority of the target application server to be the highest priority.
3. The method of claim 1 or 2, further comprising:
displaying a configuration page;
determining the publishing information in response to a triggering operation for the configuration page;
and sending the release information to the configuration service platform.
4. A routing method, 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 publishing platform according to the publishing state of the application server;
acquiring load information of the plurality of application servers from the ETCD cluster; wherein the load information includes: the release state;
selecting a target application server from the plurality of application servers according to the static configuration and the load information of each application server;
routing the service request to the target application server.
5. The method of claim 4,
the static configuration further comprises: a maximum number of requested connections;
the load information further includes: the number of currently requested connections;
selecting a target application server from the plurality of application servers according to the static configuration and the load information of each application server, including:
and taking the application server with the highest priority as the current application server to execute the following steps:
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 unlocked, and if so, determining that the current application server is the target application server.
6. The method of claim 5, further comprising:
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 sequence of the priority from high to low, and executing the determination whether the current request connection number of the current application server is less than the maximum request connection number of the current application server.
7. The method of claim 5 or 6, further comprising:
determining whether the sum of the remaining connection request numbers of the application servers is smaller than a connection number threshold value, if so, sending alarm information to a monitoring platform, wherein the alarm information is used for prompting the addition of the application servers; wherein the remaining requested connection number is a difference between the maximum requested connection number and the current requested connection number.
8. A gray scale publishing platform, comprising:
the receiving module is configured to receive a locking notification sent by the ETCD cluster; wherein the lock notification includes: information of the target application server; the lock notification is generated by the ETCD cluster according to a lock state of the target application server;
the release module is configured to acquire pre-configured release information from a 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.
9. A routing device, comprising:
the acquisition module is configured to respond to the service request and acquire the static configuration of the plurality of application servers from the configuration service platform; acquiring load information of the plurality of application servers from the ETCD cluster; wherein the static configuration comprises: a priority; the priority is determined by a gray level publishing platform according to the publishing state of the application server; the load information includes: the release state;
the determining module is configured to select a target application server from the plurality of application servers according to the static configuration and the load information of each application server;
a routing module configured to route the service request to the target application server.
10. A publication system, comprising: the gray scale distribution platform, the ETCD cluster, the configuration service platform of claim 8, and the routing device cluster comprised of the routing device of claim 9.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
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 true CN113778504A (en) 2021-12-10
CN113778504B 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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020194350A1 (en) * 2001-06-18 2002-12-19 Lu Leonard L. Content-aware web switch without delayed binding and methods thereof
CN109032755A (en) * 2018-06-29 2018-12-18 优刻得科技股份有限公司 A kind of container service mandatory system and provide the method for container service
US20190379590A1 (en) * 2018-06-06 2019-12-12 Servicenow, Inc. Discovery and Mapping of Containerized Software Applications
CN110740162A (en) * 2019-08-30 2020-01-31 上海连尚网络科技有限公司 Communication link establishing method, device, electronic equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020194350A1 (en) * 2001-06-18 2002-12-19 Lu Leonard L. Content-aware web switch without delayed binding and methods thereof
US20190379590A1 (en) * 2018-06-06 2019-12-12 Servicenow, Inc. Discovery and Mapping of Containerized Software Applications
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
CN113778504B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
CN108696374B (en) Method and device for updating client configuration
CN111427701A (en) Workflow engine system and business processing method
CN109257320A (en) Message storage method and device
CN109428926B (en) Method and device for scheduling task nodes
CN112084042A (en) Message processing method and device
CN108764866B (en) Method and equipment for allocating resources and drawing resources
CN110071952B (en) Service call quantity control method and device
US9679262B2 (en) Image index routing
CN113783913A (en) Message pushing management method and device
CN112688982B (en) User request processing method and device
CN115190125A (en) Monitoring method and device for cache cluster
CN113127561B (en) Method and device for generating service single number, electronic equipment and storage medium
CN113778504B (en) Publishing method, publishing system and routing device
CN112306791B (en) Performance monitoring method and device
CN113282455A (en) Monitoring processing method and device
CN113448652A (en) Request processing method and device
CN113572704A (en) Information processing method, production end, consumption end and server
CN113238808A (en) Message pushing method and device
CN112788075A (en) Business service monitoring method and device
CN112214500A (en) Data comparison method and device, electronic equipment and storage medium
CN113766437B (en) Short message sending method and device
CN110262756B (en) Method and device for caching data
CN114979187B (en) Data processing method and device
CN112966008B (en) Data caching method, loading method, updating method and related devices
CN113296982A (en) Interface calling method and device

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