Application cluster data preloading method, device, storage medium, equipment and system

By using random numbers to determine the delay time in large-scale cluster applications and controlling the pause status of data preload events, the problem of resource and network bandwidth peaks is solved, and effective scheduling of cluster resources and efficient and stable operation is achieved.

CN111478933BActive Publication Date: 2025-03-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910069591.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-01-24
Publication Date
2025-03-18
Estimated Expiration
2039-01-24

Smart Images

  • Figure CN111478933B_ABST
    Figure CN111478933B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an application cluster data preloading method, device, storage medium, equipment and system. The method includes: when it is detected that a data preloading event is triggered, determining a delay time based on a method of obtaining a random number; controlling the preloading event to remain in a pause state during the delay time; and starting a data preloading operation after the pause state ends. The embodiment of the present invention adopts the above technical solution. When the application nodes in the application cluster need to preload data, they first determine the delay time by obtaining a random number, and then perform the preloading operation after the delay time. Since the random number has the characteristic of average distribution, the delay time of different application nodes is different, which can ensure that only some application nodes in the cluster can perform data preloading operations within a period of time, and can achieve the technical effect of alleviating resource peaks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, storage medium, equipment and system for preloading application cluster data. Background Art

[0002] With the gradual popularization of distributed technology, more and more application systems are based on distributed technology. An application cluster system refers to a system composed of applications deployed on multiple machines. Clustered deployment facilitates horizontal expansion of application systems and linearly improves performance. In actual software project development, it is usually necessary to preload business data into the local memory of the application at startup, or preload updated business data into the local memory of the application at regular intervals after startup, in order to improve the response speed of application access and reduce the load of application resources and network consumption.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art: the existing technical solutions are only applicable to small-scale cluster applications, scenarios with a small number of nodes and a small amount of data loaded. When a small-scale cluster is started or restarted, the peak of resources and bandwidth is not large, and the impact on other systems is small. However, when the cluster scale is large, exceeds a certain number of nodes or the amount of data loaded is large, there will be peaks of various application resources (including databases, distributed cache middleware, etc.) and network bandwidth. After the application resources and bandwidth are preempted, other application system requests will be blocked, thereby affecting other applications that are providing business services. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide an application cluster data preloading method, apparatus, storage medium, device and system, which can optimize the existing application cluster data preloading solution.

[0005] In a first aspect, an embodiment of the present invention provides an application cluster data preloading method, which is applied to an application node in an application cluster system, comprising:

[0006] When it is detected that a data preloading event is triggered, a delay time is determined based on a method of obtaining a random number;

[0007] Control the preloading event to remain in a pause state during the delay time;

[0008] When the pause state ends, the data preloading operation starts.

[0009] In a second aspect, an embodiment of the present invention provides an application cluster data preloading device, which is integrated into an application node in an application cluster system, and includes:

[0010] A delay time acquisition module, used to determine the delay time based on obtaining a random number when detecting that a data preloading event is triggered;

[0011] A pause control module, used for controlling the preloading event to remain in a pause state within the delay time;

[0012] The preloading module is used to start the data preloading operation after the pause state ends.

[0013] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the application cluster data preloading method provided in the embodiment of the present invention.

[0014] In a fourth aspect, an embodiment of the present invention provides a computer device configured as an application node in an application cluster system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements an application cluster data preloading method as provided in an embodiment of the present invention when executing the computer program.

[0015] In a fifth aspect, an embodiment of the present invention provides an application cluster system, comprising a plurality of computer devices provided by embodiments of the present invention.

[0016] The application cluster data preloading scheme provided in the embodiment of the present invention determines the delay time based on the method of obtaining random numbers when detecting that the data preloading event is triggered, controls the preloading event to remain in a pause state during the delay time, and starts the data preloading operation when the pause state ends. By adopting the above technical scheme, when the application nodes in the application cluster need to preload data, they first determine the delay time by obtaining random numbers, and then perform the preloading operation after the delay time has passed. Since the random numbers have the characteristic of average distribution, the delay time of different application nodes is different, which can ensure that only some application nodes in the cluster can perform data preloading operations within a period of time, and can achieve the technical effect of alleviating resource peaks. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of a flow chart of a method for preloading application cluster data provided by an embodiment of the present invention;

[0018] Figure 2 A schematic diagram of a flow chart of another application cluster data preloading method provided by an embodiment of the present invention;

[0019] Figure 3 A schematic diagram of a flow chart of another application cluster data preloading method provided by an embodiment of the present invention;

[0020] Figure 4 A structural block diagram of an application cluster data preloading device provided by an embodiment of the present invention;

[0021] Figure 5 A structural block diagram of a computer device provided by an embodiment of the present invention;

[0022] Figure 6 A structural block diagram of an application cluster system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and through specific implementation methods. It is understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It is also necessary to explain that, for ease of description, only parts related to the present invention are shown in the accompanying drawings, rather than all structures.

[0024] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0025] Figure 1 The present invention provides a flowchart of a method for preloading application cluster data, which can be performed by an application cluster data preloading device, wherein the device can be implemented by software and / or hardware, and can generally be integrated in a computer device that serves as an application node in a cluster system. Figure 1 As shown, the method includes:

[0026] Step 101: When it is detected that a data preloading event is triggered, a delay time is determined based on a method of obtaining a random number.

[0027] In the embodiment of the present invention, the timing and detection method of the data preloading event being triggered are not limited and can be set according to actual needs. For example, when the application cluster system is detected to be started or restarted, it can be determined that the data preloading event is triggered; for another example, after the application cluster system is started or restarted, when the timer corresponding to the data preloading event is detected to be triggered, it can be determined that the data preloading event is triggered.

[0028] In the related art, there are two main data preloading schemes adopted by the application cluster system: the first is to load the database data into the memory. Taking the loading and updating of data after the application cluster system is started as an example, the database data can be loaded into the memory by periodic polling, such as establishing a timer in the application, calling the database reading program at regular intervals, and realizing the periodic loading of the database data into the memory. The application directly reads the memory data and does not participate in the reading of the database, thereby improving the application performance. The second is to load the business data from the database to the distributed memory middleware, and then load it from the middleware to the local memory. Also taking the loading and updating of data after the application cluster system is started as an example, the business data is periodically loaded from the database to the distributed memory middleware, such as the remote data server Redis (Remote Dictionary Server), and then Redis is periodically polled to load the business data into the local memory, thereby avoiding direct communication with the remote database to improve the performance of the application. For the above two data preloading solutions, when the number of cluster nodes is large, the first solution will cause a peak in the central processing unit (CPU) resources of the database software when preloading data, and the network bandwidth will be instantly occupied; the second solution relies on the cache middleware to alleviate the database pressure. Although it has a certain effect, it will still quickly occupy the network bandwidth when preloading data into the local memory, affecting the normal use of other applications.

[0029] In order to alleviate resource peaks, cluster application nodes can be preloaded in batches to eliminate peaks. Large clusters can be divided into multiple partitions, each of which includes a certain number of application nodes. Data is then preloaded partition by partition to avoid the occurrence of various resource peaks. However, in this way, application nodes in each partition need to be set in advance. When the cluster system is restarted, adding or deleting cluster nodes requires re-modifying the partition restart script, which requires a lot of manual operations and is inefficient.

[0030] In an embodiment of the present invention, when an application node detects that a data preloading event is triggered, it will not immediately start the data preloading operation, but first determine its own corresponding delay time, and then determine when to start the data preloading operation based on the delay time. When determining the delay time, it is determined based on the method of obtaining a random number. The random number of the computer has a regular distribution. By using this regularity, the delay time determined by each application node in the application cluster system can be evenly distributed in a certain time period according to a certain ratio. In other words, the application nodes in the cluster system are logically divided into multiple partitions according to time slices, and each partition contains a roughly equal number of application nodes, thereby ensuring that only some application nodes in the cluster system can perform data preloading operations within a certain period of time, thereby achieving the purpose of peak elimination.

[0031] Optionally, random numbers can be obtained by calling a random data production function. For example, when the random data production function is called 10,000 times (for example, a random number between 0 and 1 is generated each time), there will be about 1,000 results that are less than 0.1, and about 1,000 results that are greater than 0.1 and less than 0.2. This ensures that after the application node in the cluster system calls the random number production function, the obtained random numbers will be approximately evenly distributed between 0 and 1 according to a certain ratio, and then the corresponding delay time is determined based on the obtained random number, ensuring that the delay time is also approximately distributed within a certain time period according to a certain ratio.

[0032] Step 102: Control the preloading event to remain in a pause state within the delay time.

[0033] After the delay time is determined, the application node will not perform data preloading operations during the delay time. For example, if the delay time is 3 seconds, the current application node will start timing when it detects that the data preloading event is triggered, and will not perform data preloading operations in the next 3 seconds to avoid simultaneous data preloading operations with many other application nodes, resulting in resource peaks.

[0034] Optionally, this step may specifically include: controlling the thread corresponding to the preloading event to remain in a dormant state during the delay time. Exemplarily, when it is detected that a data preloading event is triggered, a thread for data preloading can be established, and delayed preloading can be achieved by thread dormancy. Here, the delay time can also be understood as the thread dormancy time, that is, the thread dormancy time can be set before the logic of preloading needs to be executed, so as to achieve the purpose of thread dormancy. In this way, the preloading event can be conveniently and accurately controlled to remain in a paused state according to the delay time.

[0035] Step 103: After the pause state ends, start the data preloading operation.

[0036] Exemplarily, after the delay time, it means that in the next period of time, only a small number of application nodes will synchronize the data preloading operation with the current application node. Therefore, the data preloading operation can be started after the pause state ends. The embodiment of the present invention does not limit the specific details of the data preloading operation, and any one of the two preloading methods mentioned above can be used, that is, loading database data into the memory, or loading business data from the database into the distributed memory middleware, and then loading the business data into the local memory. Of course, other preloading methods can also be used.

[0037] The application cluster data preloading method provided in the embodiment of the present invention determines the delay time based on the method of obtaining random numbers when detecting that the data preloading event is triggered, controls the preloading event to remain in a pause state within the delay time, and starts the data preloading operation when the pause state ends. By adopting the above technical solution, when the application nodes in the application cluster need to preload data, they first determine the delay time by obtaining random numbers, and then perform the preloading operation after the delay time. Since the random numbers have the characteristic of average distribution, the delay time of different application nodes is different, which can ensure that only some application nodes in the cluster can perform data preloading operations within a period of time, and can achieve the technical effect of alleviating resource peaks.

[0038] Figure 2 A flowchart of another method for preloading application cluster data provided by an embodiment of the present invention includes the following steps:

[0039] Step 201: When it is detected that a data preloading event is triggered, a preset total delay time is obtained.

[0040] The preset total delay time can be understood as the longest delay time of the application node, that is, the application node that performs the data preloading operation the latest will start the data preloading operation after the preset total delay time. Exemplarily, the preset total delay time can be determined by the hardware parameters of the application node and / or the maximum bandwidth of the application cluster system. Among them, the hardware parameters may include, for example, the parameters of components such as the CPU, memory or network card in the computer device serving as the application node. The higher the configuration of the computer device and the faster the running speed, the shorter the preset total delay time can be set. The larger the maximum bandwidth of the application cluster system, the shorter the preset total delay time can be set.

[0041] Generally, the longer the preset total delay time is, the better the peak elimination effect is, but it will affect the overall data preloading efficiency of the cluster, and further affect the startup speed, restart speed or data update speed of the cluster. Therefore, the preset user tolerance time can be set according to the actual operation requirements of the cluster system, so as to control the overall time of data preloading within the acceptable range for users. Optionally, the preset user tolerance time is 10 seconds. Optionally, when the preset total delay time is determined by the maximum bandwidth of the application cluster system, the preset total delay time is determined by the minimum value of the first time (which can be recorded as T1) and the second time (which can be recorded as T2), wherein the first time is the preset user tolerance time, and the second time is the time determined according to the maximum bandwidth of the application cluster system. The advantage of such a setting is that the preset total delay time can be determined more reasonably.

[0042] Exemplarily, the second time is the quotient of the total amount of data corresponding to the preloading operation of the application cluster system and the maximum bandwidth, wherein the total amount of data is the product of the amount of data corresponding to the preloading operation of the application node and the number of nodes of the application cluster system.

[0043] Specifically, the second time can be determined using the following formula:

[0044] T2=N w *N c / M w

[0045] Among them, N c Indicates the number of nodes in the application cluster system; N w Indicates the amount of data corresponding to the preloading operation of the application node (in M), that is, the total amount of data for each preloading operation; M w Indicates the maximum bandwidth of the application cluster system (in M / s), that is, the maximum bandwidth available in the current cluster system.

[0046] In this way, the preset total delay time T can be determined using the following formula:

[0047] T=Min(T1,T2)=(T1,N w *N c / M w )

[0048] Where Min represents a function that obtains the minimum value of a known value. Optionally, if the partition is performed according to a unit time slice (1 second), then the number of logical partitions of the application nodes in the cluster system C t It is equal to the preset total delay time T.

[0049] Step 202: Get a random number between 0 and 1.

[0050] For example, the random number can be obtained by calling a production function of random data. The production function can be, for example, a Rand function, where Rand represents obtaining a random number between 0 and 1.

[0051] Step 203: Determine the delay time according to the product of the obtained random number and the preset total delay time.

[0052] Exemplarily, delay time=Rand()*T.

[0053] Step 204: Control the preloading event to remain in a pause state within the delay time.

[0054] Step 205: After the pause state ends, the data preloading operation begins.

[0055] The application cluster data preloading method provided by the embodiment of the present invention detects that a data preloading event is triggered, obtains a preset total delay time and a random number between 0 and 1, and determines the delay time according to the product of the obtained random number and the preset total delay time, so as to quickly and reasonably determine the delay time corresponding to the current application node, and perform the preloading operation after the delay time, so that each application node in the cluster system can be randomly delayed for a certain time before executing the data preloading operation, and utilizes the average distribution principle of random numbers to logically divide the cluster into multiple partitions according to time slices, and each partition contains a roughly equal number of nodes, so as to ensure that only nodes in a certain logical partition of the cluster perform loading operations per second, so as to achieve the purpose of peak elimination.

[0056] Figure 3 A flow chart of another application cluster data preloading method provided by an embodiment of the present invention, the method comprises the following steps:

[0057] Step 301: When it is detected that the application cluster system is started or restarted, it is determined that a first preloading event is triggered, and a first thread is created.

[0058] Step 302: Obtain a first preset total delay time, obtain a first random number between 0 and 1, and determine a first delay time according to the product of the first random number and the first preset total delay time.

[0059] Exemplarily, a delay time (delay factor) formula may be set, and when executing this step, the delay time formula is directly called to obtain the first delay time.

[0060] Step 303: Control the first thread to remain in a dormant state within the first delay time.

[0061] Step 304: After the first delay time ends, control the first thread to start the data preloading operation.

[0062] Step 305: When it is detected that the timer corresponding to the data preloading event is triggered, it is determined that the second preloading event is triggered, and a second thread is created.

[0063] For example, after the cluster system is started or restarted, there may be business data updates, and a preloading operation is also required at this time. The data can be updated by using a timed polling method, and the timed polling can be implemented by using a timer.

[0064] Optionally, the second thread may be multiplexed with the first thread, and in this case, there is no need to create the second thread.

[0065] Step 306: Obtain a second preset total delay time, obtain a second random number between 0 and 1, and determine the second delay time according to the product of the second random number and the second preset total delay time.

[0066] The second preset total delay time may be the same as or different from the first preset total delay time. Generally, since data update may only involve partial data, the amount of data that needs to be preloaded is relatively small compared to cluster startup or restart, and therefore, the second preset total delay time may be less than the first preset total delay time.

[0067] Step 307: Control the second thread to remain in a dormant state within the second delay time.

[0068] Step 308: After the second delay time ends, control the second thread to start a preloading operation for data update.

[0069] The application cluster data preloading method provided by the embodiment of the present invention determines the delay time based on obtaining a random number when the application cluster system is started or restarted, and when the timer corresponding to the data preloading event is detected to be triggered. Therefore, when the cluster system is started or restarted, and when the business data is updated, the application nodes can dynamically perform data preloading operations in batches, avoiding resource peaks and ensuring efficient and stable operation of the entire application cluster.

[0070] Figure 4 This is a structural block diagram of an application cluster data preloading device provided by an embodiment of the present invention. The device can be implemented by software and / or hardware, and can generally be integrated in a computer device configured as an application node in an application cluster system. Data can be preloaded by executing an application cluster data preloading method. Figure 4 As shown, the device comprises:

[0071] The delay time acquisition module 401 is used to determine the delay time based on obtaining a random number when detecting that a data preloading event is triggered;

[0072] A pause control module 402, used for controlling the preloading event to remain in a pause state within the delay time;

[0073] The preloading module 403 is used to start the data preloading operation after the pause state ends.

[0074] The application cluster data preloading device provided in the embodiment of the present invention determines the delay time based on the method of obtaining random numbers when detecting that the data preloading event is triggered, controls the preloading event to remain in a pause state during the delay time, and starts the data preloading operation when the pause state ends. By adopting the above technical solution, when the application nodes in the application cluster need to preload data, they first determine the delay time by obtaining random numbers, and then perform the preloading operation after the delay time has passed. Since the random numbers have the characteristic of average distribution, the delay time of different application nodes is different, which can ensure that only some application nodes in the cluster can perform data preloading operations within a period of time, and can achieve the technical effect of alleviating resource peaks.

[0075] Optionally, the determining of the delay time based on obtaining a random number includes:

[0076] Get the preset total delay time;

[0077] Get a random number between 0 and 1;

[0078] The delay time is determined according to the product of the random number and the preset total delay time.

[0079] Optionally, the preset total delay time is determined by hardware parameters of the application node and / or a maximum bandwidth of the application cluster system.

[0080] Optionally, when the preset total delay time is determined by the maximum bandwidth of the application cluster system, the preset total delay time is determined by the minimum value of a first time and a second time, wherein the first time is a preset user tolerance time, and the second time is a time determined according to the maximum bandwidth of the application cluster system.

[0081] Optionally, the second time is the quotient of the total amount of data corresponding to the preloading operation of the application cluster system and the maximum bandwidth, wherein the total amount of data is the product of the amount of data corresponding to the preloading operation of the application node and the number of nodes of the application cluster system.

[0082] Optionally, controlling the preloading event to remain in a paused state within the delay time includes:

[0083] The thread corresponding to the preloading event is controlled to remain in a dormant state within the delay time.

[0084] Optionally, the detecting that a data preloading event is triggered includes:

[0085] When detecting that the application cluster system is started or restarted, determining that a data preloading event is triggered; and / or,

[0086] After the application cluster system is started or restarted, when it is detected that a timer corresponding to a data preloading event is triggered, it is determined that the data preloading event is detected to be triggered.

[0087] An embodiment of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute an application cluster data preloading method when executed by a computer processor, the method comprising:

[0088] When it is detected that a data preloading event is triggered, a delay time is determined based on a method of obtaining a random number;

[0089] Control the preloading event to remain in a pause state during the delay time;

[0090] When the pause state ends, the data preloading operation starts.

[0091] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.

[0092] Of course, the computer executable instructions of a storage medium including computer executable instructions provided by an embodiment of the present invention are not limited to the application cluster data preloading operation described above, and can also execute related operations in the application cluster data preloading method provided by any embodiment of the present invention.

[0093] An embodiment of the present invention provides a computer device, in which the application cluster data preloading device provided by the embodiment of the present invention can be integrated. Figure 5The computer device 500 may include: a memory 501, a processor 502, and a computer program stored in the memory 501 and executable on the processor, and the processor 502 implements the application cluster data preloading method as described in the embodiment of the present invention when executing the computer program.

[0094] In the computer device provided by the embodiment of the present invention, when the application nodes in the application cluster need to preload data, they first determine the delay time by obtaining a random number, and then perform the preloading operation after the delay time has passed. Since the random number has the characteristic of even distribution, the delay time of different application nodes is different, which can ensure that only some application nodes in the cluster can perform data preloading operations within a period of time, thereby achieving the technical effect of alleviating resource peaks.

[0095] Figure 6 This is a structural block diagram of an application cluster system provided by an embodiment of the present invention. The application cluster system 600 includes multiple computer devices provided by an embodiment of the present invention as application nodes.

[0096] The application cluster system provided by the embodiment of the present invention, when the application nodes therein need to preload data, first determine the delay time by obtaining a random number, and then perform the preloading operation after the delay time has passed. Since the random number has the characteristic of even distribution, the delay time of different application nodes is different, which can ensure that only some application nodes in the cluster can perform data preloading operations within a period of time, and can achieve the technical effect of alleviating resource peaks.

[0097] The application cluster data preloading device, storage medium, computer equipment, and application cluster system provided in the above embodiments can execute the application cluster data preloading method provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiments, please refer to the application cluster data preloading method provided in any embodiment of the present invention.

[0098] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for preloading application cluster data, characterized in that: Applied to each application node in the application cluster system, the method comprises: When it is detected that a data preloading event is triggered, a delay time is determined based on a method of obtaining a random number; Control the preloading event to remain in a pause state during the delay time; When the pause state ends, a data preloading operation is started, wherein the data preloading operation is used to load the business data from the database into the local memory of the application node; Wherein, the method of determining the delay time based on obtaining a random number includes: Obtaining a preset total delay time, wherein the preset total delay time is the longest delay time of the application node; Get a random number between 0 and 1; Determine the delay time according to the product of the random number and the preset total delay time; Among them, when the preset total delay time is determined by the maximum bandwidth of the application cluster system, the preset total delay time is determined by the minimum value of the first time and the second time, the first time is the preset user tolerance time, the second time is the quotient of the total amount of data corresponding to the preloading operation of the application cluster system and the maximum bandwidth, and the total amount of data is the product of the amount of data corresponding to the preloading operation of the application node and the number of nodes of the application cluster system.

2. The method according to claim 1, characterized in that: The controlling the preloading event to remain in a paused state during the delay time comprises: The thread corresponding to the preloading event is controlled to remain in a dormant state within the delay time.

3. The method according to claim 1 or 2, characterized in that: The detecting that a data preloading event is triggered includes: When detecting that the application cluster system is started or restarted, determining that a data preloading event is triggered; and / or, After the application cluster system is started or restarted, when it is detected that a timer corresponding to a data preloading event is triggered, it is determined that the data preloading event is detected to be triggered.

4. An application cluster data preloading device, characterized in that: Integrated in each application node in the application cluster system, the device includes: A delay time acquisition module, used to determine the delay time based on obtaining a random number when detecting that a data preloading event is triggered; A pause control module, used for controlling the preloading event to remain in a pause state within the delay time; A preloading module, used to start a data preloading operation after the pause state ends, wherein the data preloading operation is used to load business data from a database into a local memory of the application node; Wherein, the method of determining the delay time based on obtaining a random number includes: Obtaining a preset total delay time, wherein the preset total delay time is the longest delay time of the application node; Get a random number between 0 and 1; Determine the delay time according to the product of the random number and the preset total delay time; Among them, when the preset total delay time is determined by the maximum bandwidth of the application cluster system, the preset total delay time is determined by the minimum value of the first time and the second time, the first time is the preset user tolerance time, the second time is the quotient of the total amount of data corresponding to the preloading operation of the application cluster system and the maximum bandwidth, and the total amount of data is the product of the amount of data corresponding to the preloading operation of the application node and the number of nodes of the application cluster system.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

6. A computer device configured as an application node in an application cluster system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.

7. An application cluster system, characterized in that: Comprising a plurality of computer devices as claimed in claim 6.

Citation Information

Patent Citations

  • Component rendering method and device

    CN101996073A

  • Method of avoiding network transmission data collision, and system of avoiding network transmission data collision

    CN107041015A