CN107682205B - Online message publishing method and device and electronic equipment - Google Patents
Online message publishing method and device and electronic equipment Download PDFInfo
- Publication number
- CN107682205B CN107682205B CN201711059531.8A CN201711059531A CN107682205B CN 107682205 B CN107682205 B CN 107682205B CN 201711059531 A CN201711059531 A CN 201711059531A CN 107682205 B CN107682205 B CN 107682205B
- Authority
- CN
- China
- Prior art keywords
- online
- message
- service
- resource
- proxy server
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
- H04L41/5041—Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
- H04L41/5045—Making service definitions prior to deployment
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the invention provides an online message publishing method, an online message publishing device and electronic equipment, wherein the method comprises the following steps: acquiring a service resource to be online; according to a preset configuration rule, the service resources are divided into fine-grained units and weight configuration is carried out, and a plurality of batches of resource units to be online are obtained; generating an online message for identifying each batch of resource units to be online of the service resources according to a preset release rule; and sending the online information to a reverse proxy server so that the reverse proxy server configures the resource units to be online in batches according to the online information. And issuing the online information of each batch of resource units to be online of the service resources so that the reverse proxy server configures the online resource units of the service resources in batches, batch online of the service resource flow is realized, and the stability of the service during online can be improved.
Description
Technical Field
The invention relates to the technical field of internet, in particular to an online message publishing method, an online message publishing device and electronic equipment.
Background
In network services, a service provider needs to publish the services it provides onto the network. Firstly, a service resource to be online is issued through a service system, and then the service resource to be online is configured through a reverse proxy server so as to complete the online of the service resource.
However, the inventor finds that the prior art has at least the following problems in the process of implementing the invention:
with the increase of the service complexity and the requirement of the service concurrency capability, the dependence of the service on resources is higher and higher. A large number of services highly depend on resource services such as a thread pool, a distributed cache, a distributed message middleware, and an external RPC (Remote Procedure Call Protocol) service to improve the performance of the services themselves.
For services heavily dependent on resources, the services are slowly preheated when being started and released, and service jitter phenomena such as interface calling overtime and the like are easily caused when the traffic on an access line is instantly received.
Disclosure of Invention
The embodiment of the invention aims to provide an online message issuing method, an online message issuing device and electronic equipment so as to improve the stability of service during online. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an online message publishing method, where the method includes:
acquiring a service resource to be online;
according to a preset configuration rule, the service resources are divided into fine-grained units and weight configuration is carried out, and a plurality of batches of resource units to be online are obtained;
generating an online message for identifying each batch of resource units to be online of the service resources according to a preset release rule;
and sending the online information to a reverse proxy server so that the reverse proxy server configures the resource units to be online in batches according to the online information.
Optionally, before sending the online message to the reverse proxy server, the method further includes:
determining the online delay of the service resources according to a preset delay rule;
correspondingly, the sending the online message to the reverse proxy server includes:
and after waiting for the time length of the online delay, sending the online message to the reverse proxy server.
Optionally, the generating, according to a preset publishing rule, an online message identifying each batch of resource units to be online of the service resource includes:
respectively generating first online messages for marking the resource units to be online of each batch of the service resources according to a preset release rule;
correspondingly, the sending the online message to the reverse proxy server includes:
acquiring preset interval time;
and sending each first online message to the reverse proxy server in batches by taking the interval time as a publishing interval.
Optionally, the sending, in batches, each of the first online messages to the reverse proxy server with the interval time as the release interval includes:
acquiring the deployment state of the resource unit to be on-line of the service resource fed back by the reverse proxy server;
updating the publishing interval of each remaining first online message according to the deployment state, wherein the remaining first online messages are first online messages which are not sent of the service resources;
and sending each remaining first online message to the reverse proxy server in batches according to the current release interval.
Optionally, the generating, according to a preset publishing rule, an online message identifying each batch of resource units to be online of the service resource includes:
acquiring preset interval time;
and generating a second online message for identifying the interval time and identifying the resource units to be online of each batch of the service resources.
In a second aspect, an embodiment of the present invention provides an online message publishing device, where the device includes:
the resource acquisition module is used for acquiring service resources to be online;
the weight configuration module is used for splitting the service resources into fine-grained units according to a preset configuration rule and performing weight configuration to obtain a plurality of batches of resource units to be online;
the message generating module is used for generating an online message for identifying each batch of resource units to be online of the service resources according to a preset release rule;
and the message publishing module is used for sending the online message to a reverse proxy server so that the reverse proxy server configures the resource units to be online in batches according to the online message.
Optionally, the online message publishing device further includes:
a delay determining module, configured to determine an online delay of the service resource according to a preset delay rule;
correspondingly, the message publishing module is specifically configured to: and after waiting for the time length of the online delay, sending the online message to the reverse proxy server.
Optionally, the message generating module is specifically configured to:
respectively generating first online messages for marking the resource units to be online of each batch of the service resources according to a preset release rule;
correspondingly, the message publishing module includes:
the time acquisition submodule is used for acquiring preset interval time;
and the message sending submodule is used for sending each first online message to the reverse proxy server in batches by taking the interval time as a publishing interval.
Optionally, the message sending sub-module includes:
the deployment acquisition unit is used for acquiring the deployment state of the resource unit to be on-line of the service resource fed back by the reverse proxy server;
an interval updating unit, configured to update a publishing interval of each remaining first online message according to the deployment status, where the remaining first online message is a first online message that has not been sent by the service resource;
and the message sending unit is used for sending each residual first online message to the reverse proxy server in batches according to the current publishing interval.
Optionally, the message generating module includes:
the interval acquisition submodule is used for acquiring preset interval time;
and the message generation submodule is used for generating a second online message for identifying the interval time and identifying the resource units to be online of each batch of the service resources.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method steps of any of the first aspect described above when executing a program stored in the memory.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute the online message publishing method according to any one of the above first aspects.
In a fifth aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the online message publishing method according to any one of the above first aspects.
The embodiment of the invention provides an online message publishing method, an online message publishing device and electronic equipment, wherein the method comprises the following steps: acquiring a service resource to be online; according to a preset configuration rule, the service resources are divided into fine-grained units and weight configuration is carried out, and a plurality of batches of resource units to be online are obtained; generating an online message for identifying each batch of resource units to be online of the service resources according to a preset release rule; and sending the online information to a reverse proxy server so that the reverse proxy server configures the resource units to be online in batches according to the online information. And issuing the online information of each batch of resource units to be online of the service resources so that the reverse proxy server configures the online resource units of the service resources in batches, batch online of the service resource flow is realized, and the stability of the service during online can be improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic flow chart of an online message publishing method according to an embodiment of the present invention;
fig. 2 is another flowchart illustrating an online message publishing method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an online message publishing device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
With the increase of the service complexity and the requirement of the service concurrency capability, the dependence of the service on resources is higher and higher. The service relies on a large amount of resources to improve the performance of the service, and meanwhile, the service is slowly preheated when the service is started and released, and service jitter phenomena such as overtime of interface calling and the like occur when the traffic on an access line is instantaneous.
In order to solve the problem of abnormal conditions such as timeout or jitter generated during the release of a service heavily dependent on resources and provide better user experience, the embodiment of the invention provides an online message release method. Referring to fig. 1, the above online message publishing method includes:
s101, obtaining service resources to be online.
The online message publishing method of the embodiment of the invention can be realized by an online policy system, and the online policy system is any system capable of executing the online message publishing method of the embodiment of the invention, such as: the online policy system may be a device comprising: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through a bus and complete mutual communication; the memory stores executable program code; the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the online message publishing method of the embodiment of the invention.
The online policy system may also be an application program, configured to execute the online message publishing method according to the embodiment of the present invention during running.
The online policy system may also be a storage medium, configured to store an executable code, where the executable code is used to execute the online message publishing method according to the embodiment of the present invention.
The online policy system acquires service resources to be online, wherein the service resources refer to various resources supporting services, such as a thread pool, a distributed cache, a distributed message middleware, an external RPC service and the like.
S102, according to a preset configuration rule, dividing the service resource into fine-grained units and performing weight configuration to obtain a plurality of batches of resource units to be online.
The online policy system subdivides the service resources to be online according to a preset configuration rule, and divides the service resources into a plurality of fine-grained units (fine-grained resource units). And dividing each fine-grained unit into a plurality of batches, and configuring the weight of the fine-grained unit in each batch to obtain resource units to be online in the plurality of batches. That is, the total traffic of the service resources to be online is split into small traffic of a plurality of batches. The preset configuration rule is any rule capable of splitting the service resource into a plurality of batches of resource units, and the weight of the resource units in each batch can be freely configured.
For example, the service resource may be split into four batches of resource units to be online according to the number of the resource, where the number of the resource units in the first batch is 10% of the total number of the resource units, the number of the resource units in the second batch is 20% of the total number of the resource units, the number of the resource units in the third batch is 30% of the total number of the resource units, and the number of the resource units in the fourth batch is 40% of the total number of the resource units; the service resource can also be divided into five batches of resource units to be online according to the flow rate that the resource can support, and the flow rate that the resource unit in each batch can support is 20% of the total flow rate of the service resource.
S103, generating an online message for identifying each batch of resource units to be online of the service resources according to a preset release rule.
The preset publication rule is a rule for generating an online message at will, for example, an online message is generated for each batch of resource units to be online. The online message can identify the identifiers of all resource units to be online in the corresponding batch, so that the reverse proxy server can directly acquire the resource units to be online in the batch from the online message conveniently. The online message can also identify the identification of the batch corresponding to the resource unit to be online, so that the reverse proxy server can pull the online list of the batch corresponding to the online message from the online policy system according to the online message.
Or, generating an online message for each batch of resource units to be online, where the online message can identify the resource units to be online of each batch and the online time or release interval of each batch of resource units to be online, so that the reverse proxy server batches the resource units to be online of the online service resource according to the online message and the online time or release interval.
S104, sending an online message to the reverse proxy server, so that the reverse proxy server configures each batch of resource units to be online in batches according to the online message.
The online policy system sends the online message to the reverse proxy server, which may be directional sending or broadcast sending, and is not limited specifically here.
In the embodiment of the invention, the online information of each batch of resource units to be online of the service resources is issued, so that the reverse proxy server configures the resource units online of the service resources in batches, and the flow of the service resources can be online in batches by configuring the resource units in batches, thereby improving the stability of the service during online.
Optionally, before sending the online message to the reverse proxy server, the method further includes:
and determining the online delay of the service resources according to a preset delay rule.
The preset delay rule is a rule for delaying the on-line of the service resource at will. For example, the online delay may be set according to the type of the service, and the online delay should be relatively short for the service with high instantaneity requirement; the real-time requirement is low, and the on-line delay can be set slightly longer.
Optionally, determining an online delay of the service resource according to a preset delay rule includes:
and taking the preset time delay as the online delay of the service resource.
The predetermined time delay is any time, such as 1 second, 30 seconds, 1 minute, 5 minutes or more.
Optionally, determining an online delay of the service resource according to a preset delay rule includes:
acquiring the current running condition of the deployed online service resource fed back by the reverse proxy server; and when the deployed online service resources are abnormal, increasing the online delay of the service resources to be online in the batch.
After the reverse proxy server configures each service resource on line, the reverse proxy server monitors the operation condition of each service resource and feeds back the operation condition to the on-line policy system, and if the configured on-line service resource has service jitter such as interface calling overtime, the on-line policy system can increase the on-line delay of the corresponding service resource to be on line. For example, the preset online delay of the service resources to be online in the batch is 30 seconds, and when the interface call timeout condition exists in the service resources deployed online and fed back by the reverse proxy server, the online delay of the service resources to be online in the batch is adjusted to 1 minute.
When the online delay of the service resources to be online in the batch is increased, only the online delay of the service resources corresponding to the abnormal service resources can be increased. And determining abnormal service resources according to the current running condition of the deployed on-line service resources fed back by the reverse proxy server, and increasing the on-line delay of the related service resources when the service resources related to the abnormal service resources exist in the batch of service resources to be on-line.
For example, both the server a and the server B send data to the client through the switch a, the client requests the service a in the server a, the reverse proxy server has configured the server a and the switch a to be online, and at this time, the switch a has a service jitter phenomenon such as call timeout, and the reverse proxy server feeds back the service jitter phenomenon such as call timeout to the online policy system, and if the client requests the service B in the server B, the online policy system increases the online delay of the server B.
According to the feedback of the reverse proxy server, the online delay of the service resources is correspondingly increased, the online pertinence of the service resource delay is increased, and the stability of the service during online can be improved.
Correspondingly, the sending the online message to the reverse proxy server includes:
and after waiting for the time length of the online delay, sending an online message to the reverse proxy server.
In the embodiment of the invention, the time length of the on-line delay is waited, the on-line of the service resource is delayed, the burden of the service resource can be lightened, and the stability of the on-line service can be improved.
Optionally, generating an online message identifying each batch of resource units to be online of the service resource according to a preset publishing rule, where the online message includes:
and respectively generating a first online message for identifying the resource units to be online in each batch of the service resources according to a preset release rule.
Correspondingly, sending an online message to the reverse proxy server includes:
step one, acquiring preset interval time.
The interval time is any time, such as 1 second, 30 seconds, 1 minute, 5 minutes or more.
And step two, sending each first online message to the reverse proxy server in batches by taking the interval time as a release interval.
And each batch of resource units to be online corresponds to a first online message, and after the online policy system finishes publishing the first online message and waits for the duration of the publishing interval, a first online message is published again until all the first online messages are published. For example, the resource units of the three batches, i.e., the first batch of resource units to be online, the second batch of resource units to be online, and the third batch of resource units to be online are shared, and the interval time is 5 minutes. Generating a first online message of a first batch of resource units to be online by an online strategy system, generating a first online message of a second batch of resource units to be online, generating a first online message of a third batch of resource units to be online, and immediately sending the first online message of the first batch of resource units to be online; then after 5 minutes, sending a first online message of a second batch of resource units to be online; and sending a first online message of a third batch of resource units to be online in 5 minutes. And after the reverse proxy server receives the first online message each time, deploying the online resource units according to the current first online message.
In the implementation of the invention, the interval time is taken as the release interval, the first online messages are sent in batches, batch online of the resource units of the service resources can be realized, and the configuration of the reverse proxy server is not required to be modified, and the existing reverse proxy server can be directly applied.
Optionally, the sending each first online message to the reverse proxy server in batches with the interval time as the release interval includes:
step one, acquiring the deployment state of the resource unit to be on-line of the service resource fed back by the reverse proxy server.
After receiving the first online message each time, the reverse proxy server deploys the resource units of the online service resources according to the current first online message, and feeds back the deployment state of the online resource units to the online policy system, where the deployment state records the operation condition of the resource units configured to be online, and may include CPU usage, memory usage, port call condition, and the like corresponding to the corresponding resource units.
And step two, updating the release interval of each remaining first online message according to the deployment state, wherein the remaining first online messages are the unsent first online messages of the service resources.
The online policy system may adjust the publication interval of the remaining first online messages according to the deployment status. For example, if the resource occupancy rates of the CPU, the port, the memory, and the like of the online service resource are higher than a set first threshold, the issue interval of each remaining first online message is correspondingly increased, and if the resource occupancy rates of the CPU, the port, the memory, and the like of the online service resource are lower than a set second threshold, the issue interval of each remaining first online message may be correspondingly decreased. The first threshold is greater than the second threshold, and the first threshold and the second threshold in the embodiment of the present invention may be set respectively as needed.
And step three, sending each remaining first online message to the reverse proxy server in batches according to the current release interval.
And for the service resources to be online currently, the corresponding first online messages are issued in batches. And the online strategy system correspondingly adjusts the release interval of each residual first online message according to the deployment state fed back by the reverse proxy server.
For example, the service resource to be online is the server a, the server a is split into two batches, namely, a first batch of resource units and a second batch of resource units, and after the online policy system issues a first online message of the first batch of resource units, the deployment state fed back by the reverse proxy server is obtained as follows: the first batch of resource units of the deployed server A are on line, and the current load of the server A is 100%. And the online policy system adjusts the release interval from the preset 5 minutes to 8 minutes, and releases the first online message of the second batch of resource units 8 minutes after the first online message of the first batch of resource units is released.
In the embodiment of the invention, the release interval of each remaining first online message is flexibly adjusted according to the deployment state, so that the load of service resources can be reduced, the performance of the service resources can be improved, and the stability of the service during online can be improved.
Optionally, generating an online message identifying each batch of resource units to be online of the service resource according to a preset publishing rule, where the online message includes:
step one, acquiring preset interval time.
And step two, generating a second online message for identifying the interval time and identifying the resource units to be online of each batch of the service resources.
And the online policy system writes the interval time and the resource units to be online of each batch of service resources into the second online message, so that the reverse proxy server batches the resource units to be online of each batch of online resources in batches by taking the interval time in the second online message as an online interval after receiving the second online message.
In the embodiment of the invention, the second online message is only sent once for the current service resource, and compared with the first online message sent in batch, the signaling can be saved.
The online message publishing method according to the embodiment of the present invention is specifically described below with reference to the persistent integrated publishing system and the reverse proxy server, and with reference to fig. 2, the method includes:
s201, the continuous integration issuing system executes the continuous integration issuing service.
CI (Continuous Integration) is an arbitrary publication system, such as Jenkins. And the continuous integration issuing system compiles and packages the service resources to be online, continuously compiles and packages the service resources to be online and sends the service resources to be online.
S202, the deployment system deploys the service resources to be online to an online pre-release environment and informs the online policy system in a message mode.
S203, the online strategy system performs delay configuration, weight configuration and message splitting processing on the service resource to be online, and obtains and sends an online message.
Optionally, S203 includes:
s2031, the online policy system executes the online policy service, performs delayed online configuration on the service resource to be online this time, divides the service resource into fine-grained resource units, and performs weight configuration to obtain a plurality of batches of resource units to be online.
The online policy system is used for executing the online policy service, and the online policy system determines the online delay according to a preset delay rule and waits for the duration of the online delay to complete the service resource delay online configuration. The online delay is any time, such as 1 second, 5 seconds and 30 seconds or more, and can be specifically set according to the type of the guest service.
The online strategy system performs weight configuration on the service resource to be online, divides the service resource into a plurality of resource unit sets, and one resource unit set is the same batch of resource units to be online. And generating an online message of each resource unit set of the service resources to be online according to the weight configuration result. The online policy system can also record the resource unit set corresponding to each online message into the corresponding online list.
For example, for a service resource to be on-line this time, according to a flow that can be supported by the resource, the service resource to be on-line this time is split into resource unit sets of four batches, where a flow supported by a resource unit set of a first batch accounts for 10% of a total flow of the service resource to be on-line this time, a flow supported by a resource unit set of a second batch accounts for 20% of the total flow of the service resource to be on-line this time, a flow supported by a resource unit set of a third batch accounts for 40% of the total flow of the service resource to be on-line this time, and a flow supported by a resource unit set of a fourth batch accounts for 30% of the total flow of the service resource to be on-line; and respectively generating the online messages of the resource unit sets of the four batches in the service resources to be online.
S2032, the online policy system executes the online message broadcasting service.
The online strategy system publishes the resource units to be online of each batch of the service resources in batches, acquires preset interval time, and publishes online messages corresponding to the resource units to be online of each batch of the service resources to be online in batches by taking the interval time as a publishing interval. The online policy system publishes the online message, which can be published in a broadcast form, so that a plurality of servers (such as a reverse proxy server, a monitoring server and the like) can acquire the online message conveniently.
S204, the reverse proxy server executes a reverse proxy configuration service and a reverse proxy service, wherein the reverse proxy configuration service comprises an online message monitoring service, an online list service and an updating configuration service.
The reverse proxy server obtains the on-line information, updates the configuration of the reverse proxy server according to the on-line information, and deploys the service resources on line.
Optionally, S204 includes:
s2041, the reverse proxy server performs an online message listening service.
The reverse proxy server keeps monitoring whether the online message exists, and acquires the online message after monitoring the online message.
S2042, the reverse proxy server performs an online listing service.
And the reverse proxy server determines the online list according to the online message. For example, the reverse proxy server pulls an online list corresponding to the online message from the online policy system according to the online message, and the online list records a resource unit set of the online service resources in the batch.
S2043, the reverse proxy server performs the update configuration service.
And the reverse proxy server updates the reverse proxy service configuration according to the online list. And the reverse proxy server correspondingly updates the reverse proxy service configuration according to the resource units of the service resources on line in the batch recorded in the on-line list, so as to realize that the resource units of the service resources on line in the batch recorded in the on-line list are deployed on line.
S2044, the reverse proxy server performs the reverse proxy service.
The reverse proxy server executes the current reverse proxy service configuration to realize the corresponding service provided for the client.
For example, if the current service resource to be online is divided into four batches of resource units: the flow supported by the resource units in the first batch accounts for 10% of the total flow of the service resources to be on-line this time, the flow supported by the resource units in the second batch accounts for 20% of the total flow of the service resources to be on-line this time, the flow supported by the resource units in the third batch accounts for 40% of the total flow of the service resources to be on-line this time, and the flow supported by the resource units in the fourth batch accounts for 30% of the total flow of the service resources to be on-line this time; the reverse proxy server will update the reverse proxy service configuration after monitoring the online message of the first batch of resource units, deploy the first batch of resource units online, and similarly deploy the corresponding resource units online after monitoring the online message of the second batch of resource units, the third batch of resource units, or the fourth batch of resource units. Thus, for the service resource to be on-line at this time, the on-line of 10% of the flow of the service resource is completed after the first deployment, the on-line of 30% of the flow of the service resource is completed accumulatively after the second deployment, the on-line of 70% of the flow of the service resource is completed accumulatively after the third deployment, and finally the on-line of 100% of the flow of the service resource is completed after the fourth deployment, thereby realizing the gradient on-line of the service provided by the service resource.
In order to further improve the service quality, a load balancing server can be added between the reverse proxy server and the client to provide load balancing service and prevent the reverse proxy server from being locally overloaded.
In the embodiment of the invention, the service gradient provided by the service resource delays online, the reverse proxy server deploys the online message monitoring service, acquires the change condition of the service resource in real time, and gradually increases the flow of the service by changing the configuration of the reverse proxy service, thereby completing the full preheating of the service resource depending on the service and smoothly online.
Referring to fig. 3, fig. 3 is a schematic diagram of an online message publishing device according to an embodiment of the present invention, where the device includes:
a resource obtaining module 301, configured to obtain a service resource to be online;
the weight configuration module 302 is configured to split the service resources into fine-grained units according to a preset configuration rule, and perform weight configuration to obtain multiple batches of resource units to be online;
a message generating module 303, configured to generate an online message identifying each batch of resource units to be online of the service resource according to a preset publishing rule;
the message publishing module 304 is configured to send an online message to the reverse proxy server, so that the reverse proxy server configures resource units to be online in batches according to the online message.
In the embodiment of the invention, the online information of each batch of resource units to be online of the service resources is issued, so that the reverse proxy server configures the resource units online of the service resources in batches, and the flow of the service resources can be online in batches by configuring the resource units in batches, thereby improving the stability of the service during online.
Optionally, the above online message publishing device further includes:
the delay determining module is used for determining the online delay of the service resources according to a preset delay rule;
correspondingly, the message publishing module 304 is specifically configured to: and after waiting for the time length of the online delay, sending an online message to the reverse proxy server.
In the embodiment of the invention, the time length of the on-line delay is waited, the on-line of the service resource is delayed, the burden of the service resource can be lightened, and the stability of the on-line service can be improved.
Optionally, the message generating module 303 is specifically configured to:
respectively generating first online messages for identifying the resource units to be online of each batch of the service resources according to a preset release rule;
accordingly, the message publishing module 304 includes:
the time acquisition submodule is used for acquiring preset interval time;
and the message sending submodule is used for sending each first online message to the reverse proxy server in batches by taking the interval time as a publishing interval.
In the implementation of the invention, the interval time is taken as the release interval, the first online messages are sent in batches, batch online of the resource units of the service resources can be realized, and the configuration of the reverse proxy server is not required to be modified, and the existing reverse proxy server can be directly applied.
Optionally, the message sending sub-module includes:
the deployment acquisition unit is used for acquiring the deployment state of the resource unit to be on-line of the service resource fed back by the reverse proxy server;
the interval updating unit is used for updating the issuing intervals of all the remaining first online messages according to the deployment state, wherein the remaining first online messages are the first online messages which are not sent yet of the service resources;
and the message sending unit is used for sending each residual first online message to the reverse proxy server in batches according to the current publishing interval.
In the embodiment of the invention, the release interval of each remaining first online message is flexibly adjusted according to the deployment state, so that the load of service resources can be reduced, the performance of the service resources can be improved, and the stability of the service during online can be improved.
Optionally, the message generating module 303 includes:
the interval acquisition submodule is used for acquiring preset interval time;
and the message generation submodule is used for generating a second online message for identifying the interval time and identifying the resource units to be online in each batch of the service resources.
In the embodiment of the invention, the second online message is only sent once for the current service resource, and compared with the first online message sent in batch, the signaling can be saved.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401, when executing the program stored in the memory 403, implements the following steps:
acquiring a service resource to be online;
according to a preset configuration rule, carrying out weight configuration on resource units corresponding to service resources to obtain a plurality of batches of resource units to be on-line;
generating an online message for identifying each batch of resource units to be online of the service resources according to a preset release rule;
and sending an online message to the reverse proxy server so that the reverse proxy server configures each batch of resource units to be online in batches according to the online message.
In the embodiment of the invention, the online information of each batch of resource units to be online of the service resources is issued, so that the reverse proxy server configures the resource units online of the service resources in batches, and the flow of the service resources can be online in batches by configuring the resource units in batches, thereby improving the stability of the service during online.
Optionally, when the processor 401 executes the program stored in the memory 403, it can also implement any of the above online message publishing methods.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which instructions are stored, and when the instructions are executed on a computer, the computer is enabled to execute the online message publishing method described in any one of the above embodiments.
In another embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the online message publishing method described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
As for the embodiments of the online message publishing device/electronic device/computer readable storage medium/computer program product, since they are substantially similar to the embodiments of the online message publishing method, the description is simple, and the relevant points can be referred to the partial description of the embodiments of the online message publishing method.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (11)
1. An online message publishing method, the method comprising:
acquiring service resources to be online, wherein the service resources are various resources supporting services;
according to a preset configuration rule, the service resources are divided into fine-grained units and weight configuration is carried out, and a plurality of batches of resource units to be online are obtained;
generating an online message for identifying each batch of resource units to be online of the service resources according to a preset release rule;
and sending the online information to a reverse proxy server so that the reverse proxy server configures the resource units to be online in batches according to the online information.
2. The method of claim 1, wherein prior to said sending said online message to a reverse proxy server, said method further comprises:
determining the online delay of the service resources according to a preset delay rule;
correspondingly, the sending the online message to the reverse proxy server includes:
and after waiting for the time length of the online delay, sending the online message to the reverse proxy server.
3. The method according to claim 1, wherein the generating an online message identifying each batch of resource units to be online of the service resource according to a preset publishing rule comprises:
respectively generating first online messages for marking the resource units to be online of each batch of the service resources according to a preset release rule;
correspondingly, the sending the online message to the reverse proxy server includes:
acquiring preset interval time;
and sending each first online message to the reverse proxy server in batches by taking the interval time as a publishing interval.
4. The method of claim 3, wherein sending each of the first online messages to the reverse proxy server in batches at the distribution interval of the interval time comprises:
acquiring the deployment state of the resource unit to be on-line of the service resource fed back by the reverse proxy server;
updating the publishing interval of each remaining first online message according to the deployment state, wherein the remaining first online messages are first online messages which are not sent of the service resources;
and sending each remaining first online message to the reverse proxy server in batches according to the current release interval.
5. The method according to claim 1, wherein the generating an online message identifying each batch of resource units to be online of the service resource according to a preset publishing rule comprises:
acquiring preset interval time;
and generating a second online message for identifying the interval time and identifying the resource units to be online of each batch of the service resources.
6. An online message publishing device, the device comprising:
the system comprises a resource acquisition module, a service processing module and a service processing module, wherein the resource acquisition module is used for acquiring service resources to be online, and the service resources are various resources of support services;
the weight configuration module is used for splitting the service resources into fine-grained units according to a preset configuration rule and performing weight configuration to obtain a plurality of batches of resource units to be online;
the message generating module is used for generating an online message for identifying each batch of resource units to be online of the service resources according to a preset release rule;
and the message publishing module is used for sending the online message to a reverse proxy server so that the reverse proxy server configures the resource units to be online in batches according to the online message.
7. The apparatus of claim 6, further comprising:
a delay determining module, configured to determine an online delay of the service resource according to a preset delay rule;
correspondingly, the message publishing module is specifically configured to: and after waiting for the time length of the online delay, sending the online message to the reverse proxy server.
8. The apparatus of claim 6, wherein the message generation module is specifically configured to:
respectively generating first online messages for marking the resource units to be online of each batch of the service resources according to a preset release rule;
correspondingly, the message publishing module includes:
the time acquisition submodule is used for acquiring preset interval time;
and the message sending submodule is used for sending each first online message to the reverse proxy server in batches by taking the interval time as a publishing interval.
9. The apparatus of claim 8, wherein the messaging submodule comprises:
the deployment acquisition unit is used for acquiring the deployment state of the resource unit to be on-line of the service resource fed back by the reverse proxy server;
an interval updating unit, configured to update a publishing interval of each remaining first online message according to the deployment status, where the remaining first online message is a first online message that has not been sent by the service resource;
and the message sending unit is used for sending each residual first online message to the reverse proxy server in batches according to the current publishing interval.
10. The apparatus of claim 6, wherein the message generation module comprises:
the interval acquisition submodule is used for acquiring preset interval time;
and the message generation submodule is used for generating a second online message for identifying the interval time and identifying the resource units to be online of each batch of the service resources.
11. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, is adapted to perform the method steps of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711059531.8A CN107682205B (en) | 2017-11-01 | 2017-11-01 | Online message publishing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711059531.8A CN107682205B (en) | 2017-11-01 | 2017-11-01 | Online message publishing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107682205A CN107682205A (en) | 2018-02-09 |
CN107682205B true CN107682205B (en) | 2021-06-22 |
Family
ID=61144141
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711059531.8A Active CN107682205B (en) | 2017-11-01 | 2017-11-01 | Online message publishing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107682205B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113765960B (en) * | 2020-07-01 | 2023-12-05 | 北京京东尚科信息技术有限公司 | Operation and maintenance tangential flow method, system and computer readable medium |
CN112134734B (en) * | 2020-09-15 | 2023-05-23 | 网宿科技股份有限公司 | Configuration method and device of network equipment |
CN113467788B (en) * | 2021-07-06 | 2024-08-23 | 北京有竹居网络技术有限公司 | Service online method and device, electronic equipment and storage medium |
CN114785760A (en) * | 2022-05-07 | 2022-07-22 | 阿里巴巴(中国)有限公司 | Service preheating method, device, medium and product |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106020991A (en) * | 2016-05-13 | 2016-10-12 | 北京思特奇信息技术股份有限公司 | Application synchronization and release method and system based on cloud environment |
CN106331106A (en) * | 2016-08-25 | 2017-01-11 | 广州小百合信息技术有限公司 | Information issuing method and system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8560554B2 (en) * | 2010-09-23 | 2013-10-15 | Salesforce.Com, Inc. | Methods and apparatus for selecting updates to associated records to publish on an information feed using importance weights in an on-demand database service environment |
CN103096146B (en) * | 2011-11-04 | 2016-08-10 | 华为软件技术有限公司 | Media content releasing method and release management server |
CN103442269B (en) * | 2013-09-17 | 2017-03-15 | 北京奇艺世纪科技有限公司 | A kind of method and device for pushing programme information |
CN104994151B (en) * | 2015-06-30 | 2018-09-04 | 小米科技有限责任公司 | information issuing method and device |
-
2017
- 2017-11-01 CN CN201711059531.8A patent/CN107682205B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106020991A (en) * | 2016-05-13 | 2016-10-12 | 北京思特奇信息技术股份有限公司 | Application synchronization and release method and system based on cloud environment |
CN106331106A (en) * | 2016-08-25 | 2017-01-11 | 广州小百合信息技术有限公司 | Information issuing method and system |
Also Published As
Publication number | Publication date |
---|---|
CN107682205A (en) | 2018-02-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107682205B (en) | Online message publishing method and device and electronic equipment | |
CN109688235B (en) | Virtual network method for processing business, device and system, controller, storage medium | |
US9270521B2 (en) | Provisioning and managing a cluster deployed on a cloud | |
US20210176310A1 (en) | Data synchronization method and system | |
CN108173774B (en) | Client upgrading method and system | |
US10313473B2 (en) | Efficient processing of purge requests in content delivery network | |
CN105450757A (en) | Service management method and system | |
CN108737132B (en) | Alarm information processing method and device | |
US10120673B2 (en) | Method and device for remotely updating application program | |
CN111355971B (en) | Live streaming transmission method and device, CDN server and computer readable medium | |
CN106657259B (en) | Routing server and routing service method for server cluster | |
US20230079314A1 (en) | Service server switching control method and apparatus, electronic device, and storage medium | |
CN111478781B (en) | Message broadcasting method and device | |
CN105610939A (en) | Client and server file downloading control method, device and system | |
CN113676514A (en) | File source returning method and device | |
CN111212135A (en) | Message subscription method, device, system, electronic equipment and storage medium | |
CN114760304B (en) | Processing method, processing system and computing gateway of computing information | |
CN113517985A (en) | File data processing method and device, electronic equipment and computer readable medium | |
CN110874314A (en) | Pressure measurement method, apparatus, device and medium | |
CN112860505A (en) | Method and device for regulating and controlling distributed clusters | |
CN110913270B (en) | Live broadcasting method and device | |
CN112788076A (en) | Method and device for deploying multi-service load | |
CN109587068B (en) | Flow switching method, device, equipment and computer readable storage medium | |
CN108132836B (en) | Task distribution method and device and electronic equipment | |
CN112751689A (en) | Network connectivity detection method, monitoring server and monitoring agent 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 |