Nothing Special   »   [go: up one dir, main page]

CN110113187B - Configuration updating method and device, configuration server and configuration system - Google Patents

Configuration updating method and device, configuration server and configuration system Download PDF

Info

Publication number
CN110113187B
CN110113187B CN201910317551.3A CN201910317551A CN110113187B CN 110113187 B CN110113187 B CN 110113187B CN 201910317551 A CN201910317551 A CN 201910317551A CN 110113187 B CN110113187 B CN 110113187B
Authority
CN
China
Prior art keywords
license
latest version
configuration
configuration information
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910317551.3A
Other languages
Chinese (zh)
Other versions
CN110113187A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910317551.3A priority Critical patent/CN110113187B/en
Publication of CN110113187A publication Critical patent/CN110113187A/en
Application granted granted Critical
Publication of CN110113187B publication Critical patent/CN110113187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a configuration updating method, a device and a system, which comprises the following steps: receiving a configuration updating request sent by a service server to be configured in a plurality of service servers; extracting a first license from a preset number of licenses with timestamp information, which are established in advance and correspond to the latest version configuration information; if the current time is later than or equal to the timestamp information of the first license, sending latest version configuration information to the service server to be configured; creating a new second license corresponding to the latest version configuration information, wherein the timestamp information of the second license is the time when the latest version configuration information is sent to the service server to be configured plus a preset time interval; and if the current time is earlier than the timestamp information of the first license, creating a new third license corresponding to the latest version configuration information and stopping configuration updating, wherein the timestamp information of the third license is the timestamp information of the first license. The occurrence of service function unavailability can be reduced.

Description

Configuration updating method and device, configuration server and configuration system
Technical Field
The present invention relates to the field of network application technologies, and in particular, to a configuration updating method, apparatus, configuration server, and configuration system.
Background
In a service server communicatively connected to a client where an application program is located, a service program is generally installed to provide various service functions for the client, and for maintenance, generally, one service program provides one service function, and for one service program, one service program instance is generated by opening one program. For example: in a service server in communication connection with a client where a certain short video application program is located, a plurality of service programs are installed, and are respectively used for providing service functions such as video recommendation, playing, comment and the like for the service server, and a plurality of service program examples used for providing the service functions can be provided corresponding to each service program.
When affected by factors such as application requirements, some configuration information of the service program needs to be updated, referring to fig. 1, where fig. 1 is a schematic structural diagram of an existing configuration system, and the configuration system includes: the configuration server 110 and the plurality of business servers 120 running instances of the service program providing the same service function are generally required to be dynamically effective for configuration update, and objects in the program are required to be destroyed and reinitialized again. Typically by the service program instance periodically sending a configuration update request to the configuration server. During the period of dynamic validation, the service program in the service server temporarily loses the capability of providing service to the outside. In some cases, this process takes a long time, which may take from one to two minutes.
Since it takes a certain time for the latest configuration to take effect in the service program instance, the service program instance temporarily loses its ability to externally provide the service function during this time period. If all service servers providing the same service function perform configuration update simultaneously in a certain time period, a situation may occur in which the service function is unavailable in the time period.
Disclosure of Invention
The embodiment of the invention aims to provide a configuration updating method, a configuration updating device, a configuration server and a configuration system, so as to reduce the occurrence of the situation that a service function is unavailable. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a configuration updating method, which is applied to a configuration server in a configuration system, where the configuration system further includes: a plurality of service servers providing the same service function, the method comprising:
receiving a configuration updating request sent by a service server to be configured in the plurality of service servers;
extracting a first license from a preset number of licenses with timestamp information corresponding to the latest version configuration information; the first license is the license with the minimum timestamp information in the preset number of licenses; the initial timestamp information of the preset number of licenses is the generation time of the latest version configuration information; the preset number is smaller than the total number of the service servers to be configured; the preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version information is obtained;
judging whether the current time is later than or equal to the timestamp information of the first license;
if the current time is later than or equal to the timestamp information of the first license, sending the latest version configuration information to the service server to be configured so as to enable the service server to be configured to perform configuration updating;
creating a new second license corresponding to the latest version configuration information, wherein the timestamp information of the second license is the time when the latest version configuration information is sent to the service server to be configured plus a preset time interval;
and if the current time is less than the timestamp information of the first license, creating a new third license corresponding to the latest version configuration information and stopping configuration updating, wherein the timestamp information of the third license is the timestamp information of the first license.
Furthermore, one or more service program instances to be configured run in the service server to be configured; the preset number is smaller than the total number of the service program examples to be configured running in the service server to be configured;
the step of receiving a configuration update request sent by a service server to be configured in the plurality of service servers includes:
receiving a configuration updating request sent by a service program instance to be configured;
if the current time is later than or equal to the timestamp information of the first license, the step of sending the latest version configuration information to the service server to be configured so as to enable the service server to be configured to perform configuration updating comprises the following steps:
if the current time is later than or equal to the timestamp information of the first license, sending the latest version configuration information to the service program instance to be configured so as to update the configuration of the service program instance to be configured;
the creating a new second license corresponding to the latest version of configuration information, where the timestamp information of the second license is a step of adding a preset time interval to the time when the latest version of configuration information is sent to the service server to be configured, and includes:
and creating a new second license corresponding to the latest version configuration information, wherein the timestamp information of the second license is the moment when the latest version configuration information is sent to the service program instance to be configured plus a preset time interval.
Further, the configuration update request includes the current version configuration information of the service program instance to be configured;
the step of extracting a first license from a preset number of licenses having timestamp information corresponding to the latest version configuration information includes:
judging whether the latest version configuration information higher than the current version configuration of the service program example to be configured exists or not;
when latest version configuration information higher than the current version configuration of the service program instance to be configured exists, extracting a first license in a preset number of licenses with timestamp information corresponding to the latest version configuration information.
Further, the licenses corresponding to the latest version configuration information have the same expiration time, and when the expiration time is reached, each license corresponding to the latest version configuration information is deleted;
the step of extracting a first license from a preset number of licenses having timestamp information corresponding to the latest version configuration information includes:
judging whether a license corresponding to the latest version configuration information exists;
if the license corresponding to the latest version configuration information does not exist, the latest version configuration information is sent to the service program instance to be configured, so that the service program instance to be configured is configured and updated;
and if the license corresponding to the latest version configuration information exists, extracting a first license in a preset number of licenses with timestamp information corresponding to the latest version configuration information.
Further, the configuration system further includes: a cache server; the preset number of licenses with timestamp information corresponding to the latest version configuration information are stored in the cache server;
the step of extracting a first license from a preset number of licenses having timestamp information corresponding to the latest version configuration information includes:
sending a license acquisition request to the cache server so that the cache server extracts a first license from a preset number of licenses with timestamp information corresponding to the latest version configuration information and returns the first license to the configuration server;
the creating a new second license corresponding to the latest version of configuration information, where the timestamp information of the second license is a preset time interval added to the time when the latest version of configuration information is sent to the service program to be configured instance, and includes:
sending a first request for creating a new license to the cache server, so that the cache server creates a new second license corresponding to the latest version of configuration information, wherein timestamp information of the second license is a preset time interval added to the time when the latest version of configuration information is sent to the service program to be configured;
the step of creating a new third license corresponding to the latest version of configuration information and stopping configuration updating, where the timestamp information of the third license is the timestamp information of the first license, includes:
and sending a second new license request to the cache server and stopping configuration updating so that the cache server creates a new third license corresponding to the latest version of configuration information, wherein the timestamp information of the third license is the timestamp information of the first license.
Further, the license is stored in a priority queue with a priority queue expiration time, which is pre-established by the cache server, and when the priority queue expiration time is reached, the priority queue is deleted by the cache server;
the step of sending a license acquisition request to the cache server to enable the cache server to extract a first license from a preset number of licenses with timestamp information corresponding to the latest version of configuration information and return the first license to the configuration server includes:
sending a license acquisition request aiming at the latest version configuration information to the cache server so that the cache server judges whether a priority queue corresponding to the latest version configuration information exists at the current moment; if so, extracting a first license in a pre-established priority queue corresponding to the configuration information of the latest version, and returning the first license to the configuration server; if not, sending a notification that a priority queue corresponding to the latest version of configuration information does not exist to the configuration server;
the step of sending a first request for creating a new license to the cache server to enable the cache server to create a new second license corresponding to the latest version of configuration information, where timestamp information of the second license is a preset time interval added to a time when the latest version of configuration information is sent to the service program to be configured instance, includes:
sending a first new license request to the cache server, so that the cache server creates a new second license corresponding to the latest version of configuration information in the priority queue, wherein timestamp information of the second license is obtained by adding a preset time interval to the time when the latest version of configuration information is sent to the service program to be configured;
the step of sending a second new license request to the cache server and stopping configuration update, so that the cache server creates a new third license corresponding to the latest version of configuration information, where timestamp information of the third license is timestamp information of the first license, includes:
sending a second new license request to the cache server and stopping configuration updating so that the cache server creates a new third license corresponding to the latest version configuration information in the priority queue, wherein timestamp information of the third license is timestamp information of the first license;
the method further comprises the following steps:
after receiving the notification that the priority queue corresponding to the latest version configuration information does not exist and sent by the cache server, sending the latest version configuration information to the service program instance to be configured, so that the service program instance to be configured performs configuration updating.
In a second aspect, an embodiment of the present invention provides a configuration updating method, which is applied to a cache server in a configuration system, where the configuration system further includes: a configuration server and a plurality of business servers running instances of a service program providing the same service function, the method comprising:
receiving a license acquisition request sent by the configuration server, wherein the license acquisition request is sent when the configuration server receives a configuration update request sent by a service program instance to be configured, and the service program instance to be configured is a service program instance to be configured and updated, which runs in a service server to be configured in the plurality of service servers;
extracting a first license from a preset number of licenses with timestamp information corresponding to the latest version configuration information; the first license is the license with the minimum timestamp information in the preset number of licenses; the initial timestamp information of the preset number of licenses is the generation time of the latest version configuration information; the preset number is smaller than the total number of the service program instances to be configured; the preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version information is obtained;
sending the first license to the configuration server to enable the configuration server to judge whether the current time is later than or equal to the timestamp information of the first license, if the current time is later than or equal to the timestamp information of the first license, sending the latest version of configuration information to the service program instance to enable the service program instance to be configured to carry out configuration updating, sending a first new license request to the cache server, and if the current time is earlier than the timestamp information of the first license, stopping configuration updating and sending a second new license request to the cache server;
when a first newly-built license request sent by the configuration server is received, creating a new second license corresponding to the latest version of configuration information, wherein the timestamp information of the second license is the sum of the moment of sending the latest version of configuration information to the service program instance to be configured and a preset time interval; or,
and when a second new license request sent by the configuration server is received, creating a new third license corresponding to the latest version of configuration information, wherein the timestamp information of the third license is the timestamp information of the first license.
Further, the step of extracting a first license from the preset number of licenses having timestamp information corresponding to the latest version configuration information includes:
extracting a first license in a pre-established priority queue corresponding to the latest version configuration information, wherein the first license is a license positioned at the head of the priority queue, and the priority queue comprises the preset number of licenses with timestamp information;
the creating a new second license corresponding to the latest version of configuration information, where the timestamp information of the second license is a preset time interval added to the time when the latest version of configuration information is sent to the service program to be configured instance, and includes:
creating a new second license corresponding to the latest version configuration information in the priority queue, wherein the timestamp information of the second license is the time when the latest version configuration information is sent to the service program example to be configured plus a preset time interval;
the step of creating a new third license corresponding to the latest version of configuration information, where the timestamp information of the third license is the timestamp information of the first license, includes:
and creating a new third license corresponding to the latest version configuration information in the priority queue, wherein the timestamp information of the third license is the timestamp information of the first license.
Further, the priority queue has a priority queue expiration time; when the expiration time of the priority queue is reached, the priority queue is deleted by the cache server;
the step of extracting the first license in the pre-established priority queue corresponding to the latest version of configuration information includes:
judging whether a priority queue corresponding to the latest version configuration information exists at the current moment;
if the priority queue corresponding to the latest version configuration information exists, extracting a first license in a pre-established priority queue corresponding to the latest version configuration information;
the method further comprises the following steps:
if the priority queue corresponding to the latest version of configuration information does not exist, sending a notification that the priority queue corresponding to the latest version of configuration information does not exist to the configuration server, so that the configuration server sends the latest version of configuration information to the service program instance to be configured, so that the service program instance to be configured performs configuration updating.
In a third aspect, an embodiment of the present invention provides a configuration updating apparatus, which is applied to a configuration server in a configuration system, where the configuration system further includes: a plurality of service servers providing the same service function, the apparatus comprising:
a configuration update request receiving module, configured to receive a configuration update request sent by a service server to be configured in the plurality of service servers;
the first license extraction module is used for extracting first licenses in a preset number of licenses with timestamp information corresponding to the latest version configuration information; the first license is the license with the minimum timestamp information in the preset number of licenses; the initial timestamp information of the preset number of licenses is the generation time of the latest version configuration information; the preset number is smaller than the total number of the service servers to be configured; the preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version information is obtained;
the first judgment module is used for judging whether the current time is later than or equal to the timestamp information of the first license;
the first latest version configuration information sending module is used for sending the latest version configuration information to the service server to be configured if the current time is later than or the timestamp information of the first license so as to update the configuration of the service server to be configured;
the first license creating module is used for creating a new second license corresponding to the latest version configuration information if the current time is greater than the timestamp information of the first license, and the timestamp information of the second license is the time for sending the latest version configuration information to the service server to be configured plus a preset time interval;
and the second license creating module is used for creating a new third license corresponding to the configuration information of the latest version and stopping configuration updating if the current time is earlier than the timestamp information of the first license, wherein the timestamp information of the third license is the timestamp information of the first license.
Furthermore, one or more service program instances to be configured run in the service server to be configured; the preset number is smaller than the total number of the service program examples to be configured running in the service server to be configured;
the configuration update request receiving module is specifically configured to receive a configuration update request sent by a service program instance to be configured;
the first latest version configuration information sending module is specifically configured to send the latest version configuration information to the service program instance to be configured if the current time is later than or equal to the timestamp information of the first license, so that the service program instance to be configured performs configuration update;
the first license creating module is specifically configured to create a new second license corresponding to the latest version configuration information, and the timestamp information of the second license is obtained by adding a preset time interval to the time when the latest version configuration information is sent to the service program to be configured.
Further, the configuration update request includes the current version configuration information of the service program instance to be configured;
the first license extraction module includes: the version judgment sub-module and the first extraction sub-module;
the version judgment submodule is used for judging whether the latest version configuration information higher than the current version configuration of the service program example to be configured exists;
the first extraction submodule is used for extracting a first license in a preset number of licenses with timestamp information corresponding to the latest version configuration information when the latest version configuration information higher than the current configuration version of the service program instance to be configured exists.
Further, the licenses corresponding to the latest version configuration information have the same expiration time, and when the expiration time is reached, each license corresponding to the latest version configuration information is deleted;
the first license extraction module includes: a corresponding license judgment sub-module, a latest version configuration information sending sub-module and a second extraction sub-module;
the corresponding license judgment submodule is used for judging whether a license corresponding to the latest version configuration information exists at the current moment;
the latest version configuration information sending submodule is used for sending the latest version configuration information to the service program instance to be configured if the license corresponding to the latest version configuration information does not exist, so that the service program instance to be configured is configured and updated;
the second extraction sub-module is configured to, if a license corresponding to the latest version configuration information exists, extract a first license from a preset number of licenses having timestamp information and being pre-established corresponding to the latest version configuration information.
Further, the configuration system further includes: a cache server; the preset number of licenses with timestamp information corresponding to the latest version configuration information are stored in the cache server;
the first license extracting module is specifically configured to send a license acquiring request to the cache server, so that the cache server extracts first licenses of a preset number of licenses with timestamp information corresponding to the latest version configuration information, and returns the first licenses to the configuration server;
the first license creating module is specifically configured to send a first request for creating a new license to the cache server, so that the cache server creates a new license corresponding to the latest version configuration information, and timestamp information of the newly created license is obtained by adding a preset time interval to a time when the latest version configuration information is sent to the service program instance to be configured;
the second license creating module is specifically configured to send a second new license request to the cache server and stop configuration updating, so that the cache server creates a new third license corresponding to the latest version configuration information, where timestamp information of the third license is timestamp information of the first license.
Further, the license is stored in a priority queue with a priority queue expiration time, which is pre-established by the cache server, and when the priority queue expiration time is reached, the priority queue is deleted by the cache server;
the first license extraction module is specifically configured to send a license acquisition request for the latest version configuration information to the cache server, so that the cache server determines whether a priority queue corresponding to the latest version configuration information exists at the current time; if so, extracting a first license in a pre-established priority queue corresponding to the configuration information of the latest version, and returning the first license to the configuration server; if not, sending a notification that a priority queue corresponding to the latest version of configuration information does not exist to the configuration server;
the first license creating module is specifically configured to send a first new license request to the cache server, so that the cache server creates a new second license corresponding to the latest version configuration information in the priority queue, where timestamp information of the second license is obtained by adding a preset time interval to a time when the latest version configuration information is sent to the service program instance to be configured;
the second license creating module is specifically configured to send a second new license request to the cache server and stop configuration updating, so that the cache server creates a new third license corresponding to the latest version configuration information in the priority queue, where timestamp information of the third license is timestamp information of the first license;
the device further comprises:
and the second latest version configuration information sending module is configured to send the latest version configuration information to the service program instance to be configured, after receiving the notification that the priority queue corresponding to the latest version configuration information does not exist and sent by the cache server, so that the service program instance to be configured performs configuration update.
In a fourth aspect, an embodiment of the present invention provides a configuration updating apparatus, which is applied to a cache server in a configuration system, where the configuration system further includes: a configuration server and a plurality of business servers running instances of a service program providing the same service function, the apparatus comprising:
a license acquisition request receiving module, configured to receive a license acquisition request sent by the configuration server, where the license acquisition request is sent when the configuration server receives a configuration update request sent by a service program instance to be configured, and the service program instance to be configured is a service program instance to be configured and updated, which runs in a service server to be configured among the plurality of service servers;
the second license extraction module is used for extracting the first licenses in the preset number of licenses with the timestamp information corresponding to the latest version configuration information; the first license is the license with the minimum timestamp information in the preset number of licenses; the initial timestamp information of the preset number of licenses is the generation time of the latest version configuration information; the preset number is smaller than the total number of the service program instances to be configured; the preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version information is obtained;
a license sending module, configured to send the first license to the configuration server, so that the configuration server determines whether a current time is later than or equal to timestamp information of the first license, and if the current time is later than or equal to the timestamp information of the first license, send the latest version of configuration information to the service program instance, so that the service program instance to be configured performs configuration update, and send a first new license request to the cache server, and if the current time is earlier than the timestamp information of the first license, stop configuration update, and send a second new license request to the cache server;
a third license creation module, configured to create a new second license corresponding to the latest version of configuration information when receiving a first new license request sent by the configuration server, where timestamp information of the second license is obtained by adding a preset time interval to a time when the latest version of configuration information is sent to the service program to be configured;
and the fourth license creating module is used for creating a new third license corresponding to the configuration information of the latest version when receiving a second new license request sent by the configuration server, wherein the timestamp information of the third license is the timestamp information of the first license.
Further, the second license extraction module is specifically configured to extract a first license in a pre-established priority queue corresponding to the latest version configuration information, where the first license is a license located at a head of the priority queue, and the priority queue includes the preset number of licenses having timestamp information;
the third license creating module is specifically configured to create a new second license corresponding to the latest version of configuration information in the priority queue when receiving a first new license request sent by the configuration server, where timestamp information of the second license is obtained by adding a preset time interval to a time when the latest version of configuration information is sent to the to-be-configured service program instance;
the fourth license creating module is specifically configured to create a new third license corresponding to the latest version of configuration information in the priority queue when receiving a second new license request sent by the configuration server, where timestamp information of the third license is timestamp information of the first license.
Further, the priority queue has a priority queue expiration time; when the expiration time of the priority queue is reached, the priority queue is deleted by the cache server;
the second license extraction module is specifically configured to determine whether a priority queue corresponding to the latest version configuration information exists at the current time; if the priority queue corresponding to the latest version configuration information exists, extracting a first license in a pre-established priority queue corresponding to the latest version configuration information;
the device further comprises: a notification sending module;
the notification sending module is configured to send, to the configuration server, a notification that the priority queue corresponding to the latest version configuration information does not exist if the priority queue corresponding to the latest version configuration information does not exist, so that the configuration server sends the latest version configuration information to the service program instance to be configured, so that the service program instance to be configured performs configuration update.
In a fifth aspect, an embodiment of the present invention provides a configuration server, including a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor is configured to implement the configuration update method applied to the configuration server when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present invention provides a cache server, including a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor is used for realizing any one of the dial testing methods applied to the cache server when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present invention provides a configuration system, which includes multiple service servers and a configuration server that provide the same service function.
Further, the number of the configuration servers is multiple.
Further, the system further comprises: and a cache server.
Further, the number of the cache servers is multiple.
In an eighth aspect, the 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 any one of the above configuration updating methods.
In the configuration updating method, the configuration updating device, the configuration server and the configuration system provided by the embodiment of the invention, the configuration server receives a configuration updating request sent by a service server to be configured in a plurality of service servers; extracting a first license from a preset number of licenses with timestamp information corresponding to the latest version configuration information; judging whether the current time is later than or equal to the timestamp information of the first license; if the current time is later than or equal to the timestamp information of the first license, sending the latest version configuration information to the service server to be configured so as to enable the service server to be configured to perform configuration updating; creating a new second license corresponding to the latest version configuration information, wherein the timestamp information of the second license is the time when the latest version configuration information is sent to the service server to be configured plus a preset time interval; and if the current time is earlier than the timestamp information of the first license, creating a new third license corresponding to the configuration information of the latest version and stopping configuration updating, wherein the timestamp information of the third license is the timestamp information of the first license. In the embodiment of the invention, when a configuration updating request sent by a service server to be configured is received, the configuration server does not directly send latest version configuration information to the service server to be configured, but extracts a first license, and when the current time is earlier than the timestamp information of the first license, the configuration server indicates that the number of the service servers to be configured requesting configuration updating in a preset time interval has reached a preset number, at the moment, the service server to be configured sending the configuration updating request is not configured and updated, and only when the current time is later than or equal to the timestamp information of the first license, the latest version configuration information is sent to the service server to be configured so as to update the configuration of the service server to be configured. Therefore, the situation that the service function is unavailable due to the fact that all the service servers to be configured which provide the same service function are configured and updated at the same time within the preset time interval can be avoided, and the situation that the service function is unavailable can be reduced.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
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 diagram of a conventional configuration system;
fig. 2 is a schematic flowchart of a configuration server in the configuration system shown in fig. 1, to which the configuration updating method according to the embodiment of the present invention is applied;
FIG. 3 is a schematic structural diagram of a configuration system according to an embodiment of the present invention;
fig. 4 is a schematic flowchart illustrating a configuration server in the configuration system shown in fig. 3 according to an embodiment of the present invention;
fig. 5 is a schematic flowchart illustrating a configuration updating method applied to a cache server in the configuration system shown in fig. 3 according to an embodiment of the present invention;
FIG. 6 is an interaction flow diagram of a specific example of a configuration update method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a configuration update apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of another configuration update apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a configuration server according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a cache server according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
In order to reduce the occurrence of the situation of unavailable service function, embodiments of the present invention provide a configuration updating method, an apparatus, a configuration server, a cache server, and a configuration system, which are described in detail below.
With the rise of micro-service application architecture, for application programs with multiple functions, multiple service programs may be corresponded in corresponding service servers, and each service program provides different functions for the application program, for example, for a certain short video application program, multiple service programs may be provided, and video recommendation, video approval, video comment and the like are provided respectively. By adopting the micro-service application architecture, different service programs can be split, so that the research and development efficiency of the service programs is improved.
The configuration updating method, the configuration updating device, the configuration server, the cache server and the configuration system provided by the embodiment of the invention can be applied to the configuration system in a micro-service architecture so as to reduce the occurrence of unavailable service functions.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a configuration server in the configuration system of fig. 1 applying the configuration updating method according to an embodiment of the present invention;
the method specifically comprises the following steps:
step 201, receiving a configuration update request sent by a service server to be configured in a plurality of service servers.
The service server to be configured may send the configuration update request to the configuration server at regular time according to a certain preset time length, or may send the configuration update request at irregular time according to needs.
Furthermore, one or more service program instances to be configured can run in the service server to be configured. The step of receiving a configuration update request sent by a service server to be configured in the plurality of service servers includes: and receiving a configuration updating request sent by a service program instance to be configured.
Specifically, the configuration update request may include information about a current configuration version of the service program instance to be configured, so that the configuration server may send, to the service program instance to be configured, latest version configuration information that is higher than the current configuration version.
Step 202, extracting a first license from a preset number of pre-established licenses with timestamp information corresponding to the latest version configuration information.
The first license is the license with the earliest timestamp information in the preset number of licenses; presetting the generation time of the latest version configuration information of the initial timestamp information of the licenses; the preset number is smaller than the total number of the service servers to be configured. The preset number of licenses having timestamp information corresponding to the latest version of configuration information may be generated and stored by the configuration server when the configuration server obtains the latest version of information, or may be generated and stored by another server by the configuration server sending a request to another server.
Step 203, determining whether the current time is later than or equal to the timestamp information of the first license.
If the current time is later than or equal to the timestamp information of the first license, executing step 204; if the current time is earlier than the timestamp information of the first license, go to step 206.
And step 204, sending the latest version configuration information to the service server to be configured so as to update the configuration of the service server to be configured.
Corresponding to step 201, since one or more service program instances to be configured may run in the service server to be configured, if the current time is greater than the timestamp information of the first license, the latest version configuration information is sent to the service program instance to be configured, so that the service program instance to be configured performs configuration update.
Step 205, a new second license corresponding to the latest version of configuration information is created, and the timestamp information of the second license is the time when the latest version of configuration information is sent to the service server to be configured plus a preset time interval.
Correspondingly, a new second license corresponding to the latest version of configuration information may be created, and the timestamp information of the second license is the time when the latest version of configuration information is sent to the service program instance to be configured plus a preset time interval.
For example, if the time of sending the latest version of configuration information to the service program instance to be configured is 7:00 am on 4/1/2019, and the preset time interval is 1 minute, the timestamp information of the second license is 7:01 am on 1/4/2019.
In step 206, if the current time is earlier than the timestamp information of the first license, a new third license corresponding to the latest version of configuration information is created and the configuration update is stopped, where the timestamp information of the third license is the timestamp information of the first license.
The initial timestamp information of the license is the generation time of the latest version of the configuration information, so that it can be known that the initial timestamp information of the license is earlier than the current time when the configuration update request is received, and meanwhile, the total number of the licenses is less than the total number of the service servers to be configured.
If the current time of receiving the configuration update request is later than or equal to the timestamp information of the first license, for example: if the timestamp information of the license is the initial timestamp information, it indicates that, before the current configuration update request, the number of the service servers to be configured, which have sent the configuration update request and obtained the latest version of configuration information, to the configuration server is less than the total number of the licenses, and at this time, the latest version of configuration information may be sent to the service servers to be configured, which sent the current configuration update request. Meanwhile, in order to prevent that, in a preset time interval, after the number of the service servers to be configured, which have sent the configuration update request and obtained the latest version configuration information, reaches the total number of the licenses, and the service servers to be configured, which have sent the configuration update request, obtain the latest version configuration information, a second license, which is delayed by the preset time interval after timestamp information, may be created, and in the preset time interval, the latest version configuration information is not sent to the service program instance corresponding to the second license.
If the current moment of receiving the configuration updating request is earlier than the timestamp information of the first license, it indicates that in a preset time interval, before the current configuration updating request, the configuration servers of the service servers to be configured, which have the same number as the total number of the licenses, have sent the configuration updating request, and obtain the configuration information of the latest version. At this time, the configuration update may be stopped to avoid that all the service servers to be configured providing the same service function perform the configuration update at the same time in the same time interval, and the service function is unavailable. Meanwhile, in order to restart sending the latest version of configuration information to the service server to be configured that sends the configuration update request after the preset time interval, a third license whose timestamp information is the timestamp information of the first license extracted this time may be created.
As can be seen from the foregoing embodiments, in the embodiments of the present invention, when receiving a configuration update request sent by a service server to be configured in a service server, a configuration server does not directly send latest version configuration information to the service server to be configured, but extracts a first license, and when a current time is earlier than timestamp information of the first license, it indicates that the service servers to be configured, which request configuration update in a preset time interval, have reached a preset number, and at this time, the configuration update is not performed on the service server to be configured, which sends the configuration update request, so that it is possible to avoid a situation that all service servers to be configured, which provide the same service function, perform configuration update simultaneously in the preset time interval, and the service function is unavailable, that is, to reduce occurrence of a situation that the service function is unavailable.
Referring to fig. 3, the present embodiment further provides a configuration system. As shown in fig. 3, the configuration system is added with a cache server 130 on the basis of the configuration system shown in fig. 1, and is used for storing a license with timestamp information, which is established in advance, corresponding to the configuration version, and when receiving a license creation request from the configuration server, performing corresponding license creation operation according to the request.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating that the configuration updating method according to the embodiment of the present invention is applied to a configuration server in the configuration system shown in fig. 3; the method comprises the following specific steps:
step 401, receiving a configuration update request sent by a service program instance to be configured.
Step 402, determine whether there is the latest version configuration information higher than the current version configuration of the service program to be configured. If the latest version configuration information higher than the current version configuration of the service program instance to be configured does not exist, executing step 403; if the latest version configuration information higher than the current version configuration of the service program instance to be configured exists, step 404 is executed.
At step 403, the configuration update is stopped.
Step 404, sending a license acquisition request for the latest version configuration information to the cache server, so that the cache server judges whether a priority queue corresponding to the latest version configuration information exists at the current moment; if the priority queue corresponding to the latest version configuration information exists, extracting a first license in a pre-established priority queue corresponding to the latest version configuration information, and returning the first license to the configuration server; and if the priority queue corresponding to the latest version of configuration information does not exist, sending a notice that the priority queue corresponding to the latest version of configuration information does not exist to the configuration server.
When receiving a notification that there is no priority queue corresponding to the latest version configuration information sent by the cache server, executing step 405; step 406 is performed when the first license returned by the cache server is received.
Specifically, in the configuration server, when configuration update occurs, a unique version number corresponding to the current version configuration information may be generated, and a priority queue establishment request may be sent to the cache server, where the request may include the version number and the generation time of the latest version configuration information, and when the cache server receives the priority queue establishment request including the version number, a priority queue having expiration time corresponding to the version number may be established, and a license in which a preset number of pieces of initial timestamp information are the generation time of the latest version configuration information is inserted into the priority queue. If the configuration server judges that the latest version configuration information higher than the current version configuration of the service program instance to be configured exists, a license acquisition request containing the version number of the latest configuration version can be sent to the cache server.
Meanwhile, because the priority queue has the priority queue expiration time, when the priority queue expiration time is reached, the priority queue can be deleted by the cache server, so that when a license acquisition request of the configuration server is received, the cache server can firstly judge whether the priority queue corresponding to the latest version configuration information exists at the current moment.
In this embodiment, a distributed cache manner may also be adopted to perform related operations on the priority queue and the licenses in the priority queue, that is: the number of the cache servers can be multiple, when the number of the licenses to be established is large, the total capacity of the cache servers can be improved in a distributed cache mode, and meanwhile, the priority queues and the license data can be backed up to prevent the problem of data loss caused by the fact that a certain cache server fails.
Step 405, when receiving a notification that the priority queue corresponding to the latest version configuration information does not exist and sent by the cache server, sending the latest version configuration information to the service program instance to be configured, so that the service program instance to be configured performs configuration update.
In a certain period of time, in each service program instance providing the same service function, there may be some instances that do not complete configuration updating, in order to avoid that the time for configuration inconsistency of each service program instance is too long, an expiration time may be set for the priority queue, and when the priority queue expires, the latest version configuration information may be sent to the service program instance to be configured, so that the service program instance to be configured performs configuration updating.
Step 406, when receiving the first license returned by the cache server, determining whether the current time is later than or equal to the timestamp information of the first license. If the current time is later than or equal to the timestamp information of the first license, executing step 407; if the current time is earlier than the timestamp information of the first license, go to step 409.
Step 407, sending the latest version configuration information to the service program instance to be configured, so as to perform configuration update on the service program instance to be configured.
Step 408, sending a first request for creating a new license to the cache server, so that the cache server creates a new second license corresponding to the latest version of configuration information in the priority queue, where the timestamp information of the second license is obtained by adding a preset time interval to the time when the latest version of configuration information is sent to the service program to be configured.
Step 409, sending a second new license request to the cache server license and stopping configuration updating, so that the cache server creates a new third license corresponding to the latest version configuration information in the priority queue, and the timestamp information of the third license is the timestamp information of the first license.
At this time, by introducing a priority queue corresponding to the latest version configuration information, it is determined whether the current time is later than or equal to the timestamp information of the first license, and then by setting timestamp information for the newly created license, centralized management of the license can be realized, thereby limiting the number of service instances that can be configured and updated within a preset time interval.
In the embodiment of the invention, the licenses are stored in the cache server in a centralized manner, so that when the total number of the licenses is large due to the large number of all service program instances providing the same service function or the large variety of the service function, the centralized management of the licenses can be facilitated. Meanwhile, when a configuration updating request sent by a service program instance to be configured in the business server is received, the configuration server does not directly send latest version configuration information to the service program instance to be configured, but extracts a first license, and when the current time is earlier than the timestamp information of the first license, the configuration updating of the service program instance to be configured and updated in a preset time interval is indicated to be reached, and at the moment, the configuration updating of the service program instance to be configured and updated which sends the configuration updating request is not performed, so that the situation that the service function is unavailable due to the fact that all service program instances which provide the same service function are simultaneously configured and updated in the preset time interval can be avoided, and the situation that the service function is unavailable can be reduced.
Referring to fig. 5, fig. 5 is a schematic flow chart of the configuration updating method applied to the cache server in the configuration system shown in fig. 3 according to the embodiment of the present invention, which includes the following specific steps:
step 501, a license acquisition request sent by a configuration server is received.
The license acquisition request is sent when the configuration server receives a configuration update request sent by a service program instance to be configured in the business server.
Step 502, extracting a first license from a preset number of licenses having timestamp information corresponding to the latest version configuration information.
The first license is the license with the earliest timestamp information in the preset number of licenses; presetting the generation time of the latest version configuration information of the initial timestamp information of the licenses; the preset number is less than the total number of instances of the service program to be configured. When the latest version information is obtained, the configuration server sends a request to the cache server, and the cache server generates and stores the preset number of licenses with the timestamp information corresponding to the latest version configuration information.
For example, in the configuration server, when a configuration update occurs, a unique version number corresponding to the current update may be generated, and a license establishment request may be sent to the cache server, where the request may include the version number, and when the cache server receives the license establishment request including the version number, a preset number of licenses having timestamp information corresponding to the version number may be established, further, the request may include generation time of the latest version configuration information, and the cache server may establish a priority queue with the version number as a key value, and insert a preset number of licenses having initial timestamp information as generation time of the latest version configuration information into the priority queue.
Step 503, sending the first license to the configuration server, so that the configuration server determines whether the current time is later than or equal to the timestamp information of the first license, if the current time is later than or equal to the timestamp information of the first license, sending the latest version of configuration information to the service program instance to be configured, so that the service program instance to be configured performs configuration update, and sends a first new license request to the cache server, and if the current time is earlier than the timestamp information of the first license, stopping configuration update, and sending a second new license request to the cache server.
Step 504, when receiving the first request for creating a new license sent by the configuration server, creating a new second license corresponding to the latest version of configuration information, where the timestamp information of the second license is the time when the latest version of configuration information is sent to the service program to be configured plus a preset time interval.
And step 505, when a second new license request sent by the configuration server is received, creating a new third license corresponding to the latest version of configuration information, wherein the timestamp information of the third license is the timestamp information of the first license.
In the embodiment of the present invention, after the first license is sent to the configuration server, when the configuration server determines that the current time is earlier than the timestamp information of the first license, it indicates that the number of service program instances requesting configuration update in the preset time interval has reached the preset number, and at this time, the configuration server does not perform configuration update on the service program instances to be configured that send the configuration update request, so that it is possible to avoid a situation that the service function is unavailable due to the fact that all service program instances providing the same service function perform configuration update simultaneously in the preset time interval, that is, the occurrence of a situation that the service function is unavailable can be reduced.
To embody the interaction flow among the devices in the configuration system shown in fig. 3, referring to fig. 6, fig. 6 is a specific example interaction flow diagram of a configuration updating method provided by an embodiment of the present invention, and the specific steps include:
step 601, the service program instance to be configured in the service server to be configured sends a configuration update request to the configuration server.
Specifically, the configuration update request may include information about the current version configuration of the service program instance to be configured, so that the configuration server may send the latest version configuration information higher than the current version configuration to the service program instance to be configured.
In step 602, the configuration server determines whether the latest version configuration information higher than the current version configuration of the service program instance to be configured exists. If the latest version configuration information higher than the current version configuration of the service program instance to be configured exists, step 603 is executed.
In step 603, the configuration server sends a license acquisition request for the latest version of configuration information to the cache server.
In step 604, the cache server determines whether a priority queue corresponding to the latest version configuration information exists at the current time. If there is no priority queue corresponding to the latest version of configuration information, go to step 605; if there is a priority queue corresponding to the latest version of configuration information, go to step 608.
In the configuration server, when configuration update occurs, a unique version number corresponding to the current version configuration information can be generated, a priority queue establishment request can be sent to the cache server, the request can contain the version number and the generation time of the latest version configuration information, when the cache server receives the priority queue establishment request containing the version number, a priority queue with expiration time corresponding to the version number can be established, and a preset number of licenses with initial timestamp information as the generation time of the latest version configuration information are inserted into the priority queue. If the configuration server judges that the latest version configuration information higher than the current version configuration of the service program instance to be configured exists, a license acquisition request containing the version number of the latest configuration version can be sent to the cache server.
Meanwhile, because the priority queue has the priority queue expiration time, when the priority queue expiration time is reached, the priority queue can be deleted by the cache server, so that when a license acquisition request of the configuration server is received, the cache server can firstly judge whether the priority queue corresponding to the latest version configuration information exists at the current moment.
In this embodiment, a distributed cache manner may also be adopted to perform related operations on the priority queue and the licenses in the priority queue, that is: the number of the cache servers can be multiple, when the number of the licenses to be established is large, the total capacity of the cache servers can be improved in a distributed cache mode, and meanwhile, the priority queues and the license data can be backed up to prevent the problem of data loss caused by the fact that a certain cache server fails.
In step 605, the cache server sends a notification to the configuration server that there is no priority queue corresponding to the latest version of configuration information.
In step 606, the configuration server sends the latest version configuration information to the service program to be configured.
Step 607, the service program to be configured is configured and updated.
Step 608, the cache server extracts the first license in the pre-established priority queue corresponding to the latest version of configuration information, and returns the first license to the configuration server.
In step 609, the configuration server determines whether the timestamp information is later than or equal to the first license. If the current time is later than or equal to the timestamp information of the first license, go to step 610; if the current time is earlier than the timestamp information of the first license, go to step 614.
Step 610, the configuration server sends the latest version configuration information to the service program instance to be configured.
Step 611, the service program to be configured instance performs configuration update.
Step 612, the configuration server sends a first request for a new license to the cache server.
Step 613, the cache server creates a new second license corresponding to the latest version configuration information in the priority queue, and the timestamp information of the second license is the time when the latest version configuration information is sent to the service program to be configured, plus a preset time interval.
Step 614, the configuration server sends a second new license request to the cache server and stops the configuration update.
Step 615, the cache server creates a new third license corresponding to the latest version configuration information in the priority queue, and the timestamp information of the third license is the timestamp information of the first license.
In the embodiment of the present invention, when receiving a configuration update request sent by a service program instance to be configured, a configuration server first extracts a first license, and determines whether the current time is later than or equal to timestamp information of the first license, and when the current time is earlier than the timestamp information of the first license, it indicates that the number of service program instances requesting configuration update in a preset time interval has reached a preset number, and at this time, does not perform configuration update on the service program instance to be configured that sends the configuration update request.
Based on the same inventive concept, according to the configuration updating method provided in the above embodiment of the present invention, correspondingly, an embodiment of the present invention further provides a configuration updating apparatus, which is applied to a configuration server in a configuration system, and the configuration system further includes: a schematic structural diagram of a plurality of service servers providing the same service function is shown in fig. 7, and the apparatus includes:
a configuration update request receiving module 701, configured to receive a configuration update request sent by a service server to be configured in a plurality of service servers;
a first license extracting module 702, configured to extract a first license from a preset number of licenses having timestamp information, which are pre-established and correspond to the latest version configuration information; the first license is the license with the earliest timestamp information in the preset number of licenses; presetting the generation time of the latest version configuration information of the initial timestamp information of the licenses; the preset number is smaller than the total number of the service servers to be configured; a preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version information is obtained;
a first determining module 703, configured to determine whether the current time is later than or equal to the timestamp information of the first license;
a first latest version configuration information sending module 704, configured to send latest version configuration information to the service server to be configured if the current time is later than or equal to the timestamp information of the first license, so that the service server to be configured performs configuration update;
a first license creating module 705, configured to create a new second license corresponding to the latest version configuration information if the current time is later than or equal to the timestamp information of the first license, where the timestamp information of the second license is a preset time interval added to the time when the latest version configuration information is sent to the service server to be configured;
the second license creating module 706 is configured to create a new third license corresponding to the latest version of configuration information and stop configuration updating if the current time is earlier than the timestamp information of the first license, where the timestamp information of the third license is the timestamp information of the first license.
Furthermore, one or more service program instances to be configured run in the service server to be configured; the preset number is smaller than the total number of the service program examples to be configured running in the service server to be configured;
a configuration update request receiving module 701, configured to specifically receive a configuration update request sent by a service program instance to be configured;
a first latest version configuration information sending module 704, configured to send latest version configuration information to the service program instance to be configured if the current time is later than or equal to the timestamp information of the first license, so as to perform configuration update on the service program instance to be configured;
the first license creating module 705 is specifically configured to create a new second license corresponding to the latest version configuration information, where the timestamp information of the second license is obtained by adding a preset time interval to the time when the latest version configuration information is sent to the service program instance to be configured.
Further, the configuration update request includes current version configuration information of the service program instance;
the first license extraction module 702 includes: the version judgment sub-module and the first extraction sub-module;
the version judgment submodule is used for judging whether the latest version configuration information higher than the current version configuration of the service program example to be configured exists;
and the first extraction submodule is used for extracting a first license in the preset quantity of licenses with timestamp information corresponding to the latest version configuration information when the latest version configuration information higher than the current version configuration of the service program instance to be configured exists.
Further, the licenses corresponding to the latest version configuration information have the same expiration time, and when the expiration time is reached, each license corresponding to the latest version configuration information is deleted;
the first license extraction module 702 includes: a corresponding license judgment sub-module, a latest version configuration information sending sub-module and a second extraction sub-module;
the corresponding license judgment sub-module is used for judging whether a license corresponding to the latest version configuration information exists at the current moment;
the latest version configuration information sending submodule is used for sending the latest version configuration information to the service program example to be configured if the license corresponding to the latest version configuration information does not exist, so that the service program example to be configured is configured and updated;
and the second extraction submodule is used for extracting the first licenses in the preset quantity of licenses with the timestamp information corresponding to the latest version configuration information if the licenses corresponding to the latest version configuration information exist.
Further, the configuration system further comprises: a cache server; storing a preset number of licenses with timestamp information corresponding to the latest version configuration information in a cache server;
a first license extracting module 702, configured to specifically send a license obtaining request to the cache server, so that the cache server extracts a first license from a preset number of licenses having timestamp information and corresponding to the latest version configuration information, and returns the first license to the configuration server;
the first license creating module 705 is specifically configured to send a first request for creating a new license to the cache server, so that the cache server creates a new second license corresponding to the latest version configuration information, where timestamp information of the second license is a preset time interval added to a time when the latest version configuration information is sent to the service program to be configured;
the second license creating module 706 is specifically configured to send a second new license request to the cache server and stop configuration updating, so that the cache server creates a new third license corresponding to the latest version configuration information, where timestamp information of the third license is timestamp information of the first license.
Further, the license is stored in a priority queue with a priority queue expiration time, which is pre-established by the cache server, and when the priority queue expiration time is reached, the priority queue is deleted by the cache server;
a first license extracting module 702, configured to specifically send a license obtaining request for the latest version configuration information to the cache server, so that the cache server determines whether a priority queue corresponding to the latest version configuration information exists at the current time; if the configuration information exists, extracting a first license in a pre-established priority queue corresponding to the configuration information of the latest version, and returning the first license to the configuration server; if not, sending a notification that the priority queue corresponding to the latest version configuration information does not exist to the configuration server;
the first license creating module 705 is specifically configured to send a first new license request to the cache server, so that the cache server creates a new second license corresponding to the latest version configuration information in the priority queue, where the timestamp information of the first license is obtained by adding a preset time interval to the time when the latest version configuration information is sent to the service program to be configured;
a second license creating module 706, specifically configured to send a second new license request to the cache server and stop configuration updating, so that the cache server creates a new third license corresponding to the latest version configuration information in the priority queue, where timestamp information of the third license is timestamp information of the first license;
the device still includes:
and the second latest version configuration information sending module is used for sending the latest version configuration information to the service program instance to be configured after receiving the notification that the priority queue corresponding to the latest version configuration information does not exist and sent by the cache server, so that the service program instance to be configured is configured and updated.
In this embodiment of the present invention, when the configuration update request receiving module 701 receives a configuration update request sent by a service program instance in a service server, the first license extracting module 702 extracts a first license, the first determining module 703 determines whether the current time is later than or equal to the timestamp information of the first license, when the current time is earlier than the timestamp information of the first license, indicating that the number of service program instances requesting the configuration update within the preset time interval has reached the preset number, the configuration update is not performed on the service program instance sending the configuration update request, and therefore, it is avoided that all service program instances providing the same service function are configured and updated at the same time within a preset time interval, and the situation that the service function is unavailable occurs, namely, the situation that the service function is unavailable can be reduced.
Based on the same inventive concept, according to the configuration updating method provided in the above embodiment of the present invention, correspondingly, an embodiment of the present invention further provides another configuration updating apparatus, which is applied to a cache server in a configuration system, and the configuration system further includes: the configuration server and a plurality of business servers running service program instances providing the same service function are schematically shown in fig. 8, and the device comprises:
a license acquisition request receiving module 801, configured to receive a license acquisition request sent by a configuration server, where the license acquisition request is sent when the configuration server receives a configuration update request sent by a service program instance to be configured, and the service program instance to be configured is a service program instance to be configured and updated, which runs in a service server to be configured among a plurality of service servers;
a second license extracting module 802, configured to extract a first license from a preset number of licenses having timestamp information, which are pre-established and correspond to the latest version configuration information; the first license is the license with the earliest timestamp information in the preset number of licenses; presetting the generation time of the latest version configuration information of the initial timestamp information of the licenses; the preset number is smaller than the total number of the instances of the service program to be configured; a preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version information is obtained;
a license sending module 803, configured to send a first license to a configuration server, so that the configuration server determines whether the current time is later than or equal to timestamp information of the first license, and if the current time is later than or equal to the timestamp information of the first license, send latest version configuration information to a service program instance to be configured, so that the service program instance to be configured performs configuration update, and send a first new license request to a cache server, and if the current time is earlier than the timestamp information of the first license, stop configuration update, and send a second new license request to the cache server;
a third license creating module 804, configured to create a new second license corresponding to the latest version of configuration information when receiving a first new license request sent by the configuration server, where timestamp information of the second license is a preset time interval added to a time when the latest version of configuration information is sent to the service program to be configured;
a fourth license creating module 805, configured to create a new third license corresponding to the latest version of configuration information when receiving a second new license request sent by the configuration server, where timestamp information of the third license is timestamp information of the first license.
Further, the second license extracting module 802 is specifically configured to extract a first license in a pre-established priority queue corresponding to the latest version configuration information, where the first license is a license located at the head of the priority queue, and the priority queue includes a preset number of licenses having timestamp information;
a third license creating module 804, configured to create a new second license corresponding to the latest version of configuration information in the priority queue when receiving a first new license request sent by the configuration server, where timestamp information of the second license is a time at which the latest version of configuration information is sent to the service program to be configured plus a preset time interval;
the fourth license creating module 805 is specifically configured to create a new third license corresponding to the latest version of configuration information in the priority queue when receiving a second new license request sent by the configuration server, where timestamp information of the third license is timestamp information of the first license.
Further, the priority queue has a priority queue expiration time; when the expiration time of the priority queue is reached, the priority queue is deleted by the cache server;
the second license extraction module 802 is specifically configured to determine whether a priority queue corresponding to the latest version configuration information exists at the current time; if the priority queue corresponding to the latest version configuration information exists, extracting a first license in a pre-established priority queue corresponding to the latest version configuration information;
the device still includes: a notification sending module;
and the notification sending module is used for sending a notification that the priority queue corresponding to the latest version configuration information does not exist to the configuration server if the priority queue corresponding to the latest version configuration information does not exist, so that the configuration server sends the latest version configuration information to the service program instance to be configured, and the service program instance to be configured is configured and updated.
In this embodiment of the present invention, after the license sending module 803 sends the first license to the configuration server, when the configuration server determines that the current time is earlier than the timestamp information of the first license, it indicates that the number of service program instances requesting configuration update in the preset time interval has reached the preset number, and at this time, the configuration server does not perform configuration update on the service program instances to be configured that send the configuration update request, so that it is possible to avoid a situation that the service function is unavailable due to simultaneous configuration update of all service program instances that provide the same service function in the preset time interval, that is, it is possible to reduce occurrence of a situation that the service function is unavailable.
The embodiment of the present invention further provides a configuration server, as shown in fig. 9, which includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the following steps when executing the program stored in the memory 903:
receiving a configuration updating request sent by a service server to be configured in a plurality of service servers;
extracting a first license from a preset number of licenses with timestamp information, which are established in advance and correspond to the latest version configuration information; the first license is the license with the earliest timestamp information in the preset number of licenses; presetting the generation time of the latest version configuration information of the initial timestamp information of the licenses; the preset number is smaller than the total number of the service servers to be configured;
judging whether the current time is later than or equal to the timestamp information of the first license;
if the current time is later than or equal to the timestamp information of the first license, sending latest version configuration information to the service server to be configured so as to update the configuration of the service server to be configured;
creating a new second license corresponding to the latest version configuration information, wherein the timestamp information of the second license is the time when the latest version configuration information is sent to the service server to be configured plus a preset time interval;
and if the current time is less than the timestamp information of the first license, creating a new third license corresponding to the latest version configuration information and stopping configuration updating, wherein the timestamp information of the third license is the timestamp information of the first license.
The embodiment of the present invention further provides a cache server, as shown in fig. 10, which includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the following steps when executing the program stored in the memory 1003:
receiving a license acquisition request sent by a configuration server, wherein the license acquisition request is sent when the configuration server receives a configuration updating request sent by a service program instance to be configured, and the service program instance to be configured is a service program instance to be configured and updated, which runs in a service server to be configured in a plurality of service servers;
extracting a first license from a preset number of licenses with timestamp information, which are established in advance and correspond to the latest version configuration information; the first license is the license with the earliest timestamp information in the preset number of licenses; presetting the generation time of the latest version configuration information of the initial timestamp information of the licenses; the preset number is less than the total number of the service program instances;
sending a first license to a configuration server so that the configuration server judges whether the current time is later than or equal to the timestamp information of the first license, if the current time is later than or equal to the timestamp information of the first license, sending latest version configuration information to a service program instance to be configured so that the service program instance to be configured carries out configuration updating, and sending a first newly-built license request to a cache server, and if the current time is earlier than the timestamp information of the first license, stopping the configuration updating and sending a second newly-built license request to the cache server;
when a first newly-built license request sent by a configuration server is received, a new second license corresponding to the latest version configuration information is created, and the timestamp information of the second license is the moment of sending the latest version configuration information to the service program example to be configured and is added with a preset time interval; or,
and when a second new license request sent by the configuration server is received, creating a new third license corresponding to the latest version of configuration information, wherein the timestamp information of the third license is the timestamp information of the first license.
The communication bus mentioned above for the configuration server and the cache server may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. 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 configuration server and the cache server 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 yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to execute the configuration updating method in any one of the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the configuration update method of 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. The procedures or functions according to the embodiments of the invention are brought about in whole or in part when the computer program instructions are loaded and executed on a computer. 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, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (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.
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 embodiments of the apparatus, the configuration server, the cache server and the configuration system, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
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 (18)

1. A configuration updating method is applied to a configuration server in a configuration system, and the configuration system further comprises the following steps: a plurality of service servers providing the same service function, the method comprising:
receiving a configuration updating request sent by a service server to be configured in the plurality of service servers;
extracting a first license from a preset number of licenses with timestamp information corresponding to the latest version configuration information; the first license is the license with the earliest timestamp information in the preset number of licenses; the initial timestamp information of the preset number of licenses is the generation time of the latest version configuration information; the preset number is smaller than the total number of the service servers to be configured; the preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version configuration information is obtained;
judging whether the current time is later than or equal to the timestamp information of the first license;
if the current time is later than or equal to the timestamp information of the first license, sending the latest version configuration information to the service server to be configured so as to enable the service server to be configured to perform configuration updating;
creating a new second license corresponding to the latest version configuration information, wherein the timestamp information of the second license is the time when the latest version configuration information is sent to the service server to be configured plus a preset time interval;
and if the current time is earlier than the timestamp information of the first license, creating a new third license corresponding to the configuration information of the latest version and stopping configuration updating, wherein the timestamp information of the third license is the timestamp information of the first license.
2. The method according to claim 1, wherein one or more instances of the service program to be configured run in the service server to be configured; the preset number is smaller than the total number of the service program examples to be configured running in the service server to be configured;
the step of receiving a configuration update request sent by a service server to be configured in the plurality of service servers includes:
receiving a configuration updating request sent by a service program instance to be configured;
if the current time is later than or equal to the timestamp information of the first license, the step of sending the latest version configuration information to the service server to be configured so as to enable the service server to be configured to perform configuration updating comprises the following steps:
if the current time is later than or equal to the timestamp information of the first license, sending the latest version configuration information to the service program instance to be configured so as to update the configuration of the service program instance to be configured;
the creating a new second license corresponding to the latest version of configuration information, where the timestamp information of the second license is a step of adding a preset time interval to the time when the latest version of configuration information is sent to the service server to be configured, and includes:
and creating a new second license corresponding to the latest version configuration information, wherein the timestamp information of the second license is the moment when the latest version configuration information is sent to the service program instance to be configured plus a preset time interval.
3. The method according to claim 2, wherein the configuration update request includes current version configuration information of the service program instance to be configured;
the step of extracting a first license from a preset number of licenses having timestamp information corresponding to the latest version configuration information includes:
judging whether the latest version configuration information higher than the current version configuration of the service program example to be configured exists or not;
when latest version configuration information higher than the current version configuration of the service program instance to be configured exists, extracting a first license in a preset number of licenses with timestamp information corresponding to the latest version configuration information.
4. The method according to claim 2 or 3, wherein the licenses corresponding to the latest version configuration information have the same expiration time, and when the expiration time is reached, each license corresponding to the latest version configuration information is deleted;
the step of extracting a first license from a preset number of licenses having timestamp information corresponding to the latest version configuration information includes:
judging whether a license corresponding to the latest version configuration information exists;
if the license corresponding to the latest version configuration information does not exist, the latest version configuration information is sent to the service program instance to be configured, so that the service program instance to be configured is configured and updated;
and if the license corresponding to the latest version configuration information exists, extracting a first license in a preset number of licenses with timestamp information corresponding to the latest version configuration information.
5. The method of claim 2 or 3, wherein the configuring system further comprises: a cache server; the preset number of licenses with timestamp information corresponding to the latest version configuration information are stored in the cache server;
the step of extracting a first license from a preset number of licenses having timestamp information corresponding to the latest version configuration information includes:
sending a license acquisition request to the cache server so that the cache server extracts a first license from a preset number of licenses with timestamp information corresponding to the latest version configuration information and returns the first license to the configuration server;
the creating a new second license corresponding to the latest version of configuration information, where the timestamp information of the second license is a preset time interval added to the time when the latest version of configuration information is sent to the service program to be configured instance, and includes:
sending a first request for creating a new license to the cache server, so that the cache server creates a new second license corresponding to the latest version of configuration information, wherein timestamp information of the second license is a preset time interval added to the time when the latest version of configuration information is sent to the service program to be configured;
the step of creating a new third license corresponding to the latest version of configuration information and stopping configuration updating, where the timestamp information of the third license is the timestamp information of the first license, includes:
and sending a second new license request to the cache server and stopping configuration updating so that the cache server creates a new third license corresponding to the latest version of configuration information, wherein the timestamp information of the third license is the timestamp information of the first license.
6. The method of claim 5, wherein the license is stored in a priority queue with a priority queue expiration time pre-established by the cache server, and when the priority queue expiration time is reached, the priority queue is deleted by the cache server;
the step of sending a license acquisition request to the cache server to enable the cache server to extract a first license from a preset number of licenses with timestamp information corresponding to the latest version of configuration information and return the first license to the configuration server includes:
sending a license acquisition request aiming at the latest version configuration information to the cache server so that the cache server judges whether a priority queue corresponding to the latest version configuration information exists at the current moment; if so, extracting a first license in a pre-established priority queue corresponding to the configuration information of the latest version, and returning the first license to the configuration server; if not, sending a notification that a priority queue corresponding to the latest version of configuration information does not exist to the configuration server;
the step of sending a first request for creating a new license to the cache server to enable the cache server to create a new second license corresponding to the latest version of configuration information, where timestamp information of the second license is a preset time interval added to a time when the latest version of configuration information is sent to the service program to be configured instance, includes:
sending a first new license request to the cache server, so that the cache server creates a new second license corresponding to the latest version of configuration information in the priority queue, wherein timestamp information of the second license is obtained by adding a preset time interval to the time when the latest version of configuration information is sent to the service program to be configured;
the step of sending a second new license request to the cache server and stopping configuration update, so that the cache server creates a new third license corresponding to the latest version of configuration information, where timestamp information of the third license is timestamp information of the first license, includes:
sending a second new license request to the cache server and stopping configuration updating so that the cache server creates a new third license corresponding to the latest version configuration information in the priority queue, wherein timestamp information of the third license is timestamp information of the first license;
the method further comprises the following steps:
after receiving the notification that the priority queue corresponding to the latest version configuration information does not exist and sent by the cache server, sending the latest version configuration information to the service program instance to be configured, so that the service program instance to be configured performs configuration updating.
7. A configuration updating method is applied to a cache server in a configuration system, and the configuration system further comprises: a configuration server and a plurality of business servers running instances of a service program providing the same service function, the method comprising:
receiving a license acquisition request sent by the configuration server, wherein the license acquisition request is sent when the configuration server receives a configuration update request sent by a service program instance to be configured, and the service program instance to be configured is a service program instance to be configured and updated, which runs in a service server to be configured in the plurality of service servers;
extracting a first license from a preset number of licenses with timestamp information corresponding to the latest version configuration information; the first license is the license with the earliest timestamp information in the preset number of licenses; the initial timestamp information of the preset number of licenses is the generation time of the latest version configuration information; the preset number is smaller than the total number of the service program instances to be configured; the preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version configuration information is obtained;
sending the first license to the configuration server to enable the configuration server to judge whether the current time is later than or equal to the timestamp information of the first license, if the current time is later than or equal to the timestamp information of the first license, sending the latest version of configuration information to the service program instance to be configured to enable the service program instance to be configured to perform configuration updating and send a first new license request to the cache server, and if the current time is earlier than the timestamp information of the first license, stopping configuration updating and sending a second new license request to the cache server;
when a first newly-built license request sent by the configuration server is received, creating a new second license corresponding to the latest version of configuration information, wherein the timestamp information of the second license is the sum of the moment of sending the latest version of configuration information to the service program instance to be configured and a preset time interval; or,
and when a second new license request sent by the configuration server is received, creating a new third license corresponding to the latest version of configuration information, wherein the timestamp information of the third license is the timestamp information of the first license.
8. The method according to claim 7, wherein the step of extracting a first license among a preset number of licenses having timestamp information corresponding to the latest version configuration information comprises:
extracting a first license in a pre-established priority queue corresponding to the latest version configuration information, wherein the first license is a license positioned at the head of the priority queue, and the priority queue comprises the preset number of licenses with timestamp information;
the creating a new second license corresponding to the latest version of configuration information, where the timestamp information of the second license is a preset time interval added to the time when the latest version of configuration information is sent to the service program to be configured instance, and includes:
creating a new second license corresponding to the latest version configuration information in the priority queue, wherein the timestamp information of the second license is the time when the latest version configuration information is sent to the service program example to be configured plus a preset time interval;
the step of creating a new third license corresponding to the latest version of configuration information, where the timestamp information of the third license is the timestamp information of the first license, includes:
and creating a new third license corresponding to the latest version configuration information in the priority queue, wherein the timestamp information of the third license is the timestamp information of the first license.
9. The method of claim 8, wherein the priority queue has a priority queue expiration time; when the expiration time of the priority queue is reached, the priority queue is deleted by the cache server;
the step of extracting the first license in the pre-established priority queue corresponding to the latest version of configuration information includes:
judging whether a priority queue corresponding to the latest version configuration information exists at the current moment;
if the priority queue corresponding to the latest version configuration information exists, extracting a first license in a pre-established priority queue corresponding to the latest version configuration information;
the method further comprises the following steps:
if the priority queue corresponding to the latest version of configuration information does not exist, sending a notification that the priority queue corresponding to the latest version of configuration information does not exist to the configuration server, so that the configuration server sends the latest version of configuration information to the service program instance to be configured, so that the service program instance to be configured performs configuration updating.
10. A configuration updating device is applied to a configuration server in a configuration system, and the configuration system further comprises: a plurality of service servers providing the same service function, the apparatus comprising:
a configuration update request receiving module, configured to receive a configuration update request sent by a service server to be configured in the plurality of service servers;
the first license extraction module is used for extracting first licenses in a preset number of licenses with timestamp information corresponding to the latest version configuration information; the first license is the license with the earliest timestamp information in the preset number of licenses; the initial timestamp information of the preset number of licenses is the generation time of the latest version configuration information; the preset number is smaller than the total number of the service servers to be configured; the preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version configuration information is obtained;
the first judgment module is used for judging whether the current time is later than or equal to the timestamp information of the first license;
the first latest version configuration information sending module is used for sending the latest version configuration information to the service server to be configured if the current time is later than or equal to the timestamp information of the first license so as to update the configuration of the service server to be configured;
the first license creating module is used for creating a new second license corresponding to the latest version configuration information if the current time is later than or equal to the timestamp information of the first license, and the timestamp information of the second license is the time for sending the latest version configuration information to the service server to be configured plus a preset time interval;
and the second license creating module is used for creating a new third license corresponding to the configuration information of the latest version and stopping configuration updating if the current time is earlier than the timestamp information of the first license, wherein the timestamp information of the third license is the timestamp information of the first license.
11. The apparatus according to claim 10, wherein one or more instances of the service program to be configured run in the service server to be configured; the preset number is smaller than the total number of the service program examples to be configured running in the service server to be configured;
the configuration update request receiving module is specifically configured to receive a configuration update request sent by a service program instance to be configured;
the first latest version configuration information sending module is specifically configured to send the latest version configuration information to the service program instance to be configured if the current time is later than or equal to the timestamp information of the first license, so that the service program instance to be configured performs configuration update;
the first license creating module is specifically configured to create a new second license corresponding to the latest version configuration information, and the timestamp information of the second license is obtained by adding a preset time interval to the time when the latest version configuration information is sent to the service program to be configured.
12. The apparatus according to claim 11, wherein the configuration update request includes configuration information of a current version of the service program instance to be configured;
the first license extraction module includes: the version judgment sub-module and the first extraction sub-module;
the version judgment submodule is used for judging whether the latest version configuration information higher than the current version configuration of the service program example to be configured exists;
the first extraction submodule is used for extracting a first license in a preset number of licenses with timestamp information corresponding to the latest version configuration information when the latest version configuration information higher than the current version configuration of the service program instance to be configured exists.
13. The apparatus according to claim 11 or 12, wherein the licenses corresponding to the latest version configuration information have the same expiration time, and when the expiration time is reached, each license corresponding to the latest version configuration information is deleted;
the first license extraction module includes: a corresponding license judgment sub-module, a latest version configuration information sending sub-module and a second extraction sub-module;
the corresponding license judgment submodule is used for judging whether a license corresponding to the latest version configuration information exists at the current moment;
the latest version configuration information sending submodule is used for sending the latest version configuration information to the service program instance to be configured if the license corresponding to the latest version configuration information does not exist, so that the service program instance to be configured is configured and updated;
the second extraction sub-module is configured to, if a license corresponding to the latest version configuration information exists, extract a first license from a preset number of licenses having timestamp information and being pre-established corresponding to the latest version configuration information.
14. The apparatus of claim 11 or 12, wherein the configuration system further comprises: a cache server; the preset number of licenses with timestamp information corresponding to the latest version configuration information are stored in the cache server;
the first license extracting module is specifically configured to send a license acquiring request to the cache server, so that the cache server extracts first licenses of a preset number of licenses with timestamp information corresponding to the latest version configuration information, and returns the first licenses to the configuration server;
the first license creating module is specifically configured to send a first request for creating a new license to the cache server, so that the cache server creates a new second license corresponding to the latest version configuration information, where timestamp information of the second license is obtained by adding a preset time interval to a time when the latest version configuration information is sent to the service program instance to be configured;
the second license creating module is specifically configured to send a second new license request to the cache server and stop configuration updating, so that the cache server creates a new third license corresponding to the latest version configuration information, where timestamp information of the third license is timestamp information of the first license.
15. The apparatus according to claim 14, wherein the license is stored in a priority queue with a priority queue expiration time pre-established by the cache server, and when the priority queue expiration time is reached, the priority queue is deleted by the cache server;
the first license extraction module is specifically configured to send a license acquisition request for the latest version configuration information to the cache server, so that the cache server determines whether a priority queue corresponding to the latest version configuration information exists at the current time; if so, extracting a first license in a pre-established priority queue corresponding to the configuration information of the latest version, and returning the first license to the configuration server; if not, sending a notification that a priority queue corresponding to the latest version of configuration information does not exist to the configuration server;
the first license creating module is specifically configured to send a first new license request to the cache server, so that the cache server creates a new second license corresponding to the latest version configuration information in the priority queue, where timestamp information of the second license is obtained by adding a preset time interval to a time when the latest version configuration information is sent to the service program instance to be configured;
the second license creating module is specifically configured to send a second new license request to the cache server and stop configuration updating, so that the cache server creates a new third license corresponding to the latest version configuration information in the priority queue, where timestamp information of the third license is timestamp information of the first license;
the device further comprises:
and the second latest version configuration information sending module is configured to send the latest version configuration information to the service program instance to be configured, after receiving the notification that the priority queue corresponding to the latest version configuration information does not exist and sent by the cache server, so that the service program instance to be configured performs configuration update.
16. A configuration updating device is applied to a cache server in a configuration system, and the configuration system further comprises: a configuration server and a plurality of business servers running instances of a service program providing the same service function, the apparatus comprising:
a license acquisition request receiving module, configured to receive a license acquisition request sent by the configuration server, where the license acquisition request is sent when the configuration server receives a configuration update request sent by a service program instance to be configured, and the service program instance to be configured is a service program instance to be configured and updated, which runs in a service server to be configured among the plurality of service servers;
the second license extraction module is used for extracting the first licenses in the preset number of licenses with the timestamp information corresponding to the latest version configuration information; the first license is the license with the minimum timestamp information in the preset number of licenses; the initial timestamp information of the preset number of licenses is the generation time of the latest version configuration information; the preset number is smaller than the total number of the service program instances to be configured; the preset number of licenses with timestamp information corresponding to the latest version configuration information are generated and stored when the latest version configuration information is obtained;
a license sending module, configured to send the first license to the configuration server, so that the configuration server determines whether a current time is later than or equal to timestamp information of the first license, and if the current time is later than or equal to the timestamp information of the first license, send the latest version of configuration information to the service program instance to be configured, so that the service program instance to be configured performs configuration update, and send a first new license request to the cache server, and if the current time is earlier than the timestamp information of the first license, stop configuration update, and send a second new license request to the cache server;
a third license creation module, configured to create a new second license corresponding to the latest version of configuration information when receiving a first new license request sent by the configuration server, where timestamp information of the second license is obtained by adding a preset time interval to a time when the latest version of configuration information is sent to the service program to be configured;
and the fourth license creating module is used for creating a new third license corresponding to the configuration information of the latest version when receiving a second new license request sent by the configuration server, wherein the timestamp information of the third license is the timestamp information of the first license.
17. The apparatus of claim 16,
the second license extraction module is specifically configured to extract a first license in a pre-established priority queue corresponding to the latest version configuration information, where the first license is a license located at a head of the priority queue, and the priority queue includes the preset number of licenses having timestamp information;
the third license creating module is specifically configured to create a new second license corresponding to the latest version of configuration information in the priority queue when receiving a first new license request sent by the configuration server, where timestamp information of the second license is obtained by adding a preset time interval to a time when the latest version of configuration information is sent to the to-be-configured service program instance;
the fourth license creating module is specifically configured to create a new third license corresponding to the latest version of configuration information in the priority queue when receiving a second new license request sent by the configuration server, where timestamp information of the third license is timestamp information of the first license.
18. The apparatus of claim 17, wherein the priority queue has a priority queue expiration time; when the expiration time of the priority queue is reached, the priority queue is deleted by the cache server;
the second license extraction module is specifically configured to determine whether a priority queue corresponding to the latest version configuration information exists at the current time; if the priority queue corresponding to the latest version configuration information exists, extracting a first license in a pre-established priority queue corresponding to the latest version configuration information;
the device further comprises: a notification sending module;
the notification sending module is configured to send, to the configuration server, a notification that the priority queue corresponding to the latest version configuration information does not exist if the priority queue corresponding to the latest version configuration information does not exist, so that the configuration server sends the latest version configuration information to the service program instance to be configured, so that the service program instance to be configured performs configuration update.
CN201910317551.3A 2019-04-19 2019-04-19 Configuration updating method and device, configuration server and configuration system Active CN110113187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910317551.3A CN110113187B (en) 2019-04-19 2019-04-19 Configuration updating method and device, configuration server and configuration system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910317551.3A CN110113187B (en) 2019-04-19 2019-04-19 Configuration updating method and device, configuration server and configuration system

Publications (2)

Publication Number Publication Date
CN110113187A CN110113187A (en) 2019-08-09
CN110113187B true CN110113187B (en) 2022-03-04

Family

ID=67485918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910317551.3A Active CN110113187B (en) 2019-04-19 2019-04-19 Configuration updating method and device, configuration server and configuration system

Country Status (1)

Country Link
CN (1) CN110113187B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115701042A (en) * 2021-07-29 2023-02-07 华为技术有限公司 Method, device, system and computer readable storage medium for updating configuration
CN116208488A (en) * 2023-02-17 2023-06-02 云盾智慧安全科技有限公司 Method and device for upgrading network server program
CN117118830B (en) * 2023-10-16 2024-01-23 北京持安科技有限公司 Distributed gateway configuration method and device based on queues

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107172169A (en) * 2017-05-27 2017-09-15 广东欧珀移动通信有限公司 Method of data synchronization, device, server and storage medium
CN109218054A (en) * 2017-07-03 2019-01-15 腾讯科技(深圳)有限公司 Terminal dynamic configuration, respective server implementation method, device and storage medium
CN109495532A (en) * 2017-09-13 2019-03-19 北京京东尚科信息技术有限公司 Client update method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8800058B2 (en) * 2011-07-27 2014-08-05 Microsoft Corporation Licensing verification for application use
US20130238552A1 (en) * 2012-03-12 2013-09-12 Joseph Saib Systems and methods for synchronizing files in a networked communication system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107172169A (en) * 2017-05-27 2017-09-15 广东欧珀移动通信有限公司 Method of data synchronization, device, server and storage medium
CN109218054A (en) * 2017-07-03 2019-01-15 腾讯科技(深圳)有限公司 Terminal dynamic configuration, respective server implementation method, device and storage medium
CN109495532A (en) * 2017-09-13 2019-03-19 北京京东尚科信息技术有限公司 Client update method and device

Also Published As

Publication number Publication date
CN110113187A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
WO2021180025A1 (en) Message processing method and apparatus, electronic device and medium
CN112650576B (en) Resource scheduling method, device, equipment, storage medium and computer program product
CN110113187B (en) Configuration updating method and device, configuration server and configuration system
CN108897628B (en) Method and device for realizing distributed lock and electronic equipment
CN108255620B (en) Service logic processing method, device, service server and system
US9940598B2 (en) Apparatus and method for controlling execution workflows
CN108737132B (en) Alarm information processing method and device
CN111049928B (en) Data synchronization method, system, electronic device and computer readable storage medium
CN108540533B (en) Request answering method and device
CN110851290A (en) Data synchronization method and device, electronic equipment and storage medium
CN107729213B (en) Background task monitoring method and device
CN108572898A (en) A kind of method, apparatus of control interface, equipment and storage medium
WO2019034095A1 (en) Software processing method and apparatus, electronic device and computer-readable storage medium
CN111355600B (en) Main node determining method and device
CN107040576A (en) Information-pushing method and device, communication system
CN110430070B (en) Service state analysis method, device, server, data analysis equipment and medium
CN108156061B (en) esb monitoring service platform
CN110674153B (en) Data consistency detection method and device and electronic equipment
CN112506896B (en) Data deleting method and device and electronic equipment
CN108924013B (en) Network flow accurate acquisition method and device
CN108628901A (en) A kind of data-updating method and device
CN108234658B (en) Method and device for sensing health condition of server cluster and server
CN110955587A (en) Method and device for determining equipment to be replaced
CN112671590B (en) Data transmission method and device, electronic equipment and computer storage medium
CN111629054B (en) Message processing method, device and system, electronic equipment and readable storage medium

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