CN110933152B - Preheating method, device and system and electronic equipment - Google Patents

Preheating method, device and system and electronic equipment Download PDF

Info

Publication number
CN110933152B
CN110933152B CN201911148744.7A CN201911148744A CN110933152B CN 110933152 B CN110933152 B CN 110933152B CN 201911148744 A CN201911148744 A CN 201911148744A CN 110933152 B CN110933152 B CN 110933152B
Authority
CN
China
Prior art keywords
preheating
request
service
access request
service device
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
CN201911148744.7A
Other languages
Chinese (zh)
Other versions
CN110933152A (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 CN201911148744.7A priority Critical patent/CN110933152B/en
Publication of CN110933152A publication Critical patent/CN110933152A/en
Application granted granted Critical
Publication of CN110933152B publication Critical patent/CN110933152B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a preheating method, a preheating device and a preheating system, which are applied to preheating request configuration equipment, wherein the method comprises the following steps: obtaining access request logs from each service device according to a preset time interval, and generating a custom request aiming at the service provided by each service device; generating a preheating request according to the access request and the user-defined request recorded in the access request log, and generating a preheating configuration file containing the preheating request; and sending a preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode so that each service device carries out preheating treatment according to the preheating message. By applying the scheme provided by the embodiment of the invention, the preheating comprehensive coverage of the large-scale distributed cluster service equipment can be realized.

Description

Preheating method, device and system and electronic equipment
Technical Field
The present invention relates to the field of application processing technologies, and in particular, to a preheating method, apparatus, system, and electronic device.
Background
With the rapid development of the internet, various services are emerging. After the services are started, when an access request is received, service equipment where the services run needs to load information such as classes, lazy load connection pools, and load system caches needed for providing the services, and then respond to the access request. The number and the types of the information that the service device needs to load are different for different access requests, so that the response time of the service device to different access requests is different, and the response time is jittered. In addition, the service device Queries the information to be loaded before loading the information after receiving the access request, so that when the QPS (query Per Second query rate) is particularly high, jitter of response time is particularly seriously affected, and further, the service quality of the service is reduced, and user experience is affected.
In view of the above situation, in order to reduce jitter of response time, the service device needs to be preheated, in the prior art, generally, a worker manually writes a preheating request according to his own experience, and due to different degrees of experience of different workers, the finally generated preheating request is not covered comprehensively, so that the large distributed cluster service device cannot be covered comprehensively when being preheated.
Disclosure of Invention
The embodiment of the invention aims to provide a preheating method, a preheating device, a preheating system and electronic equipment, so as to realize comprehensive coverage of preheating large-scale distributed cluster service equipment. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a warm-up method, which is applied to a warm-up request configuration device, and the method includes:
obtaining access request logs from each service device according to a preset time interval, and generating a custom request for the service provided by each service device, wherein the access request logs are as follows: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
generating a preheating request according to the access request recorded in the access request log and the user-defined request, and generating a preheating configuration file containing the preheating request;
and sending a preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode so that each service device carries out preheating treatment according to the preheating message.
In an embodiment of the present invention, the generating a preheating request according to the access request and the custom request recorded in the access request log includes:
selecting an access request recorded in the access request log and an effective access request in the self-defined request;
determining effective access requests meeting preheating requirements in the selected effective access requests;
and reconstructing the determined effective access request to obtain a request capable of accessing the service provided by each service device as a preheating request.
In an embodiment of the present invention, the reconstructing the determined valid access request to obtain a request capable of accessing the service provided by each service device itself, as the preheating request, includes:
changing the destination IP address and the destination port number carried in the determined effective access request to obtain a request capable of accessing the service provided by each service device;
and adding a security check parameter in the obtained access request to serve as a preheating request.
In a second aspect, an embodiment of the present invention provides a preheating method, which is applied to a service device, and the method includes:
receiving a preheating message aiming at a preheating configuration file sent by the preheating request configuration equipment, wherein the preheating configuration file comprises: according to the access request recorded in the access request log and the preheating request generated by the user-defined request, the access request log is as follows: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request for loading preset resources of the service provided by each service device is generated according to the service requirement of each service device;
storing the preheating message to a message queue of the preheating message, and acquiring the preheating configuration file from the preheating request configuration equipment when the preheating message is monitored to be positioned at the queue head of the message queue;
and performing preheating treatment according to the preheating request recorded in the preheating configuration file.
In an embodiment of the present invention, the performing the preheating process according to the preheating request recorded in the preheating configuration file includes:
and after the provided service is started and before the provided service works normally, performing preheating treatment according to the preheating request recorded in the preheating configuration file.
In an embodiment of the present invention, after performing the preheating process according to the preheating request recorded in the preheating configuration file, the method further includes:
detecting whether the preheating treatment time is greater than a preset treatment time threshold value or not, and if so, ending the preheating treatment;
or
And detecting whether the times of executing the preheating request are larger than a preset preheating request time threshold, and if so, ending the preheating processing.
In a third aspect, an embodiment of the present invention provides a warming device, applied to a warming request configuration device, where the device includes:
a request obtaining module, configured to obtain an access request log from each service device according to a preset time interval, and generate a custom request for a service provided by each service device, where the access request log is: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
the file generation module is used for generating a preheating request according to the access request recorded in the access request log and the user-defined request and generating a preheating configuration file containing the preheating request;
and the message sending module is used for sending the preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode so that each service device can carry out preheating treatment according to the preheating message.
In an embodiment of the present invention, the file generating module includes:
the effective access request selection submodule is used for selecting the access request recorded in the access request log and the effective access request in the user-defined request;
the access request determining submodule is used for determining the effective access request meeting the preheating requirement in the selected effective access requests;
and the preheating request determining submodule is used for reconstructing the determined effective access request to obtain a request capable of accessing the service provided by each service device as a preheating request.
And the file generation submodule is used for generating a preheating configuration file containing the preheating request.
In an embodiment of the present invention, the warming request determining sub-module includes:
a request obtaining unit, configured to change a destination IP address and a destination port number carried in the determined valid access request, and obtain a request capable of accessing a service provided by each service device;
and the preheating request determining unit is used for adding a security check parameter in the obtained access request to be used as the preheating request.
In a fourth aspect, an embodiment of the present invention provides a preheating apparatus, which is applied to a service device, and the apparatus includes:
a preheating message receiving module, configured to receive a preheating message for a preheating configuration file sent by the preheating request configuration device, where the preheating configuration file includes: according to the access request recorded in the access request log and the preheating request generated by the user-defined request, the access request log is as follows: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request for loading preset resources of the service provided by each service device is generated according to the service requirement of each service device;
a preheating configuration file obtaining module, configured to store the preheating message in a message queue of the preheating message obtaining module, and obtain the preheating configuration file from the preheating request configuration device when it is monitored that the preheating message is located at a queue head of the message queue;
and the preheating processing module is used for carrying out preheating processing according to the preheating request recorded in the preheating configuration file.
In an embodiment of the invention, the preheating module is specifically configured to:
and after the provided service is started and before the provided service works normally, performing preheating treatment according to the preheating request recorded in the preheating configuration file.
In an embodiment of the present invention, after the preheating processing module, the method further includes:
the detection module is used for detecting whether the preheating processing time is greater than a preset processing time threshold value or not, and if so, ending the preheating processing;
or
And detecting whether the times of executing the preheating request are larger than a preset preheating request time threshold, and if so, ending the preheating processing.
In a fifth aspect, an embodiment of the present invention provides a preheating system, where the system includes: a pre-heat request configuration device and a plurality of distributed service devices, wherein,
the preheating request configuration device is configured to obtain an access request log from each service device according to a preset time interval, and generate a custom request for a service provided by each service device, where the access request log is: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
the preheating request configuration device is used for generating a preheating request according to the access request recorded in the access request log and the user-defined request, and generating a preheating configuration file containing the preheating request; sending a preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode;
the distributed service devices are used for receiving a preheating message aiming at a preheating configuration file sent by the preheating request configuration device; and storing the preheating message into a message queue of the preheating message, acquiring the preheating configuration file from the preheating request configuration equipment when the preheating message is monitored to be positioned at the queue head of the message queue, and carrying out preheating treatment according to the preheating request recorded in the preheating configuration file.
In an embodiment of the present invention, the generating, by the preheating request configuration device, a preheating request according to the access request and the custom request recorded in the access request log includes:
selecting an access request recorded in the access request log and an effective access request in the self-defined request;
determining effective access requests meeting preheating requirements in the selected effective access requests;
and reconstructing the determined effective access request to obtain a request capable of accessing the service provided by each service device as a preheating request.
In an embodiment of the present invention, the reconstructing the determined valid access request to obtain a request capable of accessing the service provided by each service device itself, as the preheating request, includes:
changing the destination IP address and the destination port number carried in the determined effective access request to obtain a request capable of accessing the service provided by each service device;
and adding a security check parameter in the obtained access request to serve as a preheating request.
In an embodiment of the present invention, the performing, by the plurality of distributed service devices, a preheating process according to the preheating request recorded in the preheating configuration file includes:
and after the provided service is started and before the provided service works normally, performing preheating treatment according to the preheating request recorded in the preheating configuration file.
In an embodiment of the present invention, the multiple distributed service devices are further configured to, after performing the preheating processing according to the preheating request recorded in the preheating configuration file, detect whether the preheating processing time is greater than a preset processing time threshold, and if so, end the preheating processing; or detecting whether the number of times of executing the preheating request is larger than a preset preheating request number threshold, and if so, ending the preheating processing.
In a sixth aspect, an embodiment of the present invention provides a preheating method, where the method is applied to a preheating system, where the preheating system includes a preheating request configuration device and a plurality of distributed service devices, and the method includes:
the preheating request configuration equipment obtains access request logs from each service equipment according to a preset time interval, and generates a custom request aiming at the service provided by each service equipment, wherein the access request logs are as follows: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
the preheating request configuration equipment generates a preheating request according to the access request recorded in the access request log and the user-defined request, and generates a preheating configuration file containing the preheating request; sending a preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode;
the distributed service devices receive a preheating message aiming at a preheating configuration file sent by the preheating request configuration device; and storing the preheating message into a message queue of the preheating message, acquiring the preheating configuration file from the preheating request configuration equipment when the preheating message is monitored to be positioned at the queue head of the message queue, and carrying out preheating treatment according to the preheating request recorded in the preheating configuration file.
In an embodiment of the present invention, the generating, by the preheating request configuration device, a preheating request according to the access request and the custom request recorded in the access request log includes:
selecting an access request recorded in the access request log and an effective access request in the self-defined request;
determining effective access requests meeting preheating requirements in the selected effective access requests;
and reconstructing the determined effective access request to obtain a request capable of accessing the service provided by each service device as a preheating request.
In an embodiment of the present invention, the reconstructing the determined valid access request to obtain a request capable of accessing the service provided by each service device itself, as the preheating request, includes:
changing the destination IP address and the destination port number carried in the determined effective access request to obtain a request capable of accessing the service provided by each service device;
and adding a security check parameter in the obtained access request to serve as a preheating request.
In an embodiment of the present invention, the performing, by the plurality of distributed service devices, a preheating process according to the preheating request recorded in the preheating configuration file includes:
and after the provided service is started and before the provided service works normally, performing preheating treatment according to the preheating request recorded in the preheating configuration file.
In an embodiment of the present invention, after the plurality of distributed service devices perform the preheating processing according to the preheating request recorded in the preheating configuration file, the method further includes:
detecting whether the preheating treatment time is greater than a preset treatment time threshold value or not, and if so, ending the preheating treatment; or
And detecting whether the times of executing the preheating request are larger than a preset preheating request time threshold, and if so, ending the preheating processing.
A seventh aspect of the present invention provides an electronic device, where the electronic device, as a device for configuring a warm-up request, includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method steps of the first aspect when executing the program stored in the memory.
In an eighth aspect, an embodiment of the present invention provides an electronic device, where the electronic device serves as a service device, and includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface are used, and the memory completes communication with each other through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the method steps of the second aspect when executing the program stored in the memory.
As can be seen from the above, when the preheating scheme provided in the embodiment of the present invention is applied to the preheating request configuration device, the preheating request configuration device generates the preheating request according to the access request recorded in the collected access request log and the generated custom request, so that a relatively comprehensive preheating request can be generated. The preheating request configuration equipment sends the preheating messages aiming at the preheating configuration files to each service equipment in an asynchronous transmission mode according to the generated preheating configuration files containing the preheating requests, so that compared with the prior art in which the preheating requests are manually written, the preheating request configuration equipment can comprehensively cover the large distributed cluster equipment for preheating according to the comprehensive preheating requests.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a preheating system according to an embodiment of the present invention;
fig. 2 is a schematic signaling flow diagram of a preheating system according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for generating a preheat request according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of a first preheating method according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of a second preheating method according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a first preheating device according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a second preheating device according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a third preheating device according to an embodiment of the present invention;
FIG. 9 is a schematic flow chart illustrating a third preheating method according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the technical problem that the large distributed cluster service equipment cannot be fully covered when being preheated in the prior art, embodiments of the present invention provide a preheating method, apparatus, system and electronic equipment.
In an embodiment of the present invention, a warm-up method is provided, which is applied to a warm-up request configuration device, and the method includes:
obtaining access request logs from each service device according to a preset time interval, and generating a custom request aiming at the service provided by each service device, wherein the access request logs are as follows: the system is used for recording the access request received by the service equipment for the service provided by the service equipment, and the self-defining request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
generating a preheating request according to the access request and the user-defined request recorded in the access request log, and generating a preheating configuration file containing the preheating request;
and sending a preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode so that each service device carries out preheating treatment according to the preheating message.
As can be seen from the above, when the preheating scheme provided in this embodiment is applied to the preheating request configuration device, the preheating request configuration device generates the preheating request according to the access request recorded in the collected access request log and the generated custom request, so that a relatively comprehensive preheating request can be generated. The preheating request configuration equipment sends the preheating messages aiming at the preheating configuration files to each service equipment in an asynchronous transmission mode according to the generated preheating configuration files containing the preheating requests, so that compared with the prior art in which the preheating requests are manually written, the preheating request configuration equipment can comprehensively cover the large distributed cluster equipment for preheating according to the comprehensive preheating requests.
In another embodiment of the present invention, a preheating method applied to a service device is provided, where the method includes:
receiving a preheating message aiming at a preheating configuration file sent by a preheating request configuration device, wherein the preheating configuration file comprises: according to the access request recorded in the access request log and the preheating request generated by the user-defined request, the access request log is as follows: the system is used for recording the access request received by the service equipment for the service provided by the service equipment, and the self-defining request comprises: a request for loading preset resources of the service provided by each service device is generated according to the service requirement of each service device;
storing the preheating message to a message queue of the preheating message, and acquiring a preheating configuration file from preheating request configuration equipment when monitoring that the preheating message is positioned at a queue head of the message queue;
and performing preheating treatment according to the preheating request recorded in the preheating configuration file.
As can be seen from the above, by applying the scheme provided in this embodiment, each service device can simulate an access request according to the preheating request in the preheating configuration file, access the service provided by itself, and then complete loading of the resource required for the access, thereby implementing preheating of the service device. Therefore, by applying the embodiment, a relatively comprehensive access request can be obtained, and comprehensive coverage of preheating the large distributed cluster service equipment is realized.
The preheating method, device and system provided by the embodiment of the invention are explained in detail by the specific embodiments below.
First, a preheating system provided by an embodiment of the present invention is described with reference to fig. 1 and 2.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic structural diagram of a preheating system according to an embodiment of the present invention, and fig. 2 is a schematic signaling flow diagram of the preheating system according to the embodiment of the present invention.
The system includes a warm-up request configuration device 101 and a distributed service device 102.
The distributed service apparatus 101 is configured based on a distributed architecture. Thus, it can be considered that a plurality of service devices 102 exist in the preset system, and the service devices 102 are used for providing services to users.
Specifically, the preheating request configuration device 101 is configured to obtain an access request log from each service device according to a preset time interval, generate a custom request for a service provided by each service device (S201), generate a preheating request according to the access request and the custom request recorded in the access request log, generate a preheating configuration file including the preheating request (S202), and send a preheating message for the preheating configuration file to each service device in an asynchronous transmission manner (S203).
Each service device 102 is configured to receive a preheating message for a preheating configuration file sent by the preheating request configuration device, store the preheating message in its own message queue (S204), obtain the preheating configuration file from the preheating request configuration device (S205) when it is monitored that the preheating message is located at a queue head of the message queue, and perform preheating processing according to the preheating request recorded in the preheating configuration file (S206).
The following describes each of S201-S206 in detail.
S201: and obtaining the access requests recorded in the access request logs from the service devices according to a preset time interval, and generating custom requests aiming at the services provided by the service devices.
Wherein, the access request log is: for recording access requests received by the service device for the services it provides. For example: when the service provided by the service device is a request processing service, the service device receives an access request for the request processing service.
The preset time interval may be preset by a worker, for example, the preset time interval may be one month, two months, or the like.
The obtaining of the access request log from each service device according to the preset time interval may be that the preheating request configuration device sends a request for obtaining the access request log to the service device according to the preset time interval, and the service device sends the access request log to the preheating request configuration device according to the request.
The customization request comprises: and the request is generated according to the business requirements of each service device and is used for loading the preset resources of the service provided by the service device.
Specifically, the service may be understood as: services provided by the service devices are mutually combined to provide services to the outside, for example: the service may be: fault detection services, etc. The service requirements of the service devices may be understood as follows: the individual services forming the business, for example: when the service is a fault detection service, a fault information acquisition service, a fault information classification service, a fault information transmission service, and the like are required. The various resources required by each service device for providing services may include resources such as lazy loading, thread pool creation, database caching, and the like. In different services, the generated requests for loading the preset resources of the service provided by the service device are different, and specifically, when the service involves the application of a class and the frequent use of cache resources, the requests for the resources relating to lazy loading class, thread pool creation, system cache, connection pool creation, and the like can be generated.
The generated custom request can be generated according to a custom request generation rule preset in the preheating request configuration device. In different services, the custom request generation rules are different. For example, when the application of a class, the frequent use of cache resources are involved in the service, the access request generation rule may be a rule for generating an access request related to a lazy load class, thread pool creation, system cache, connection pool creation, and the like.
S202: and generating a preheating request according to the access request and the self-defined request recorded in the access request log, and generating a preheating configuration file containing the preheating request.
Specifically, the access request and the custom request recorded in the access request log may be adjusted according to a format of the preheating request, so that the formats of the access request and the custom request are consistent, and the adjusted access request and the custom request are used as the preheating request.
The preheating configuration file can comprise parameters such as a preheating request, a preheating mode, preheating processing time and the like.
S203: and sending a preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode so that each service device carries out preheating treatment according to the preheating message.
The asynchronous transmission mode is a synchronous mode of data communication, and the preheating request configuration equipment can send the preheating message aiming at the configuration file to each service equipment at any time through the asynchronous transmission mode.
S204: receiving a preheating message aiming at the preheating configuration file sent by the preheating request configuration equipment, and storing the preheating message to a message queue of the preheating message.
The preheating configuration file comprises: and generating a preheating request according to the access request recorded in the access request log and the self-defined request. The access request log comprises: for recording access requests received by the service device for its provided services. The customization request comprises: and the request is generated according to the service requirement of each service device and is used for loading the preset resource of the service provided by the service device.
The message queue is used for storing messages received by the service device, and a common message queue framework such as ActiveMQ, rocktmq and the like can be used.
S205: and when the preheating message is monitored to be positioned at the queue head of the message queue, a preheating configuration file is obtained from the preheating request configuration equipment.
When the preheat message is located at the queue head of the message queue, the service device may obtain the preheat profile according to the preheat message.
S206: and performing preheating treatment according to the preheating request recorded in the preheating configuration file.
Specifically, the corresponding preheating processing may be performed according to the access request and the custom request recorded in the access request log in the preheating request.
As can be seen from the above, with the adoption of the preheating scheme provided by this embodiment, the preheating request configuration device generates the preheating request according to the access request recorded in the collected access request log and the generated custom request, so that a relatively comprehensive preheating request can be generated. The preheating request configuration equipment sends the preheating messages aiming at the preheating configuration files to each service equipment in an asynchronous transmission mode according to the generated preheating configuration files containing the preheating requests, so that compared with the prior art in which the preheating requests are manually written, the preheating request configuration equipment can comprehensively cover the large distributed cluster equipment for preheating according to the comprehensive preheating requests. In addition, each service device can simulate an access request according to the preheating request in the preheating configuration file, access the service provided by the service device, and further complete the loading of the resources required by the access, thereby realizing the preheating of the service device. Therefore, by applying the embodiment, a relatively comprehensive access request can be obtained, and comprehensive coverage of preheating the large distributed cluster service equipment is realized.
For the above system, in S202, the above preheating request configuration device generates the preheating request according to the access request and the custom request recorded in the access request log, in an embodiment of the present invention, referring to fig. 3, fig. 3 is a flowchart of a preheating request generation method provided in an embodiment of the present invention, including S301 to S303.
S301: and selecting the effective access request in the access request and the self-defined request recorded in the access request log.
The valid access request can be understood as follows: the request which is successfully provided with the service in the access request log meets the requirement and is not repeated, and the request which meets the requirement and is not repeated in the self-defining request.
Specifically, when selecting an effective access request from the access request log and the custom request, the method may filter and screen the access requests recorded in the access request log, delete the unsatisfactory and repeated access requests recorded in the access request log, and retain the satisfactory and non-repeated requests successfully providing services in the access request log. In addition, the repeated requests which do not meet the requirements in the self-defining requests can be deleted, and the repeated requests which meet the requirements in the self-defining requests can be reserved. The request reserved in the access request log and the custom request is taken as the effective access request.
S302: and determining the effective access request meeting the preheating requirement in the selected effective access requests.
Specifically, the preheating requirement may be a requirement related to information such as a response time of the access request, an id (identity) of a user who issues the access request, and an interface parameter accessed by the access request. For example: when the preheating requirement is the id of the user sending the access request, assuming that the id of the user sending the access request is id1, determining the valid access request carrying id1 as the valid access request meeting the preheating requirement.
S303: and reconstructing the determined effective access request to obtain a request capable of accessing the service provided by each service device as a preheating request.
Since the destination IP address and the destination port number carried in the determined effective access request are the IP address and the port number of a certain service device in each service device, in order to make the subsequently generated preheating request suitable for each service device, the destination IP address and the destination port number carried in the effective access request need to be changed, so that the service provided by each service device can be accessed according to the effective access request for changing the destination IP address and the destination port number. For example: assuming that the IP address of the service device a is IP1, the IP address of the service device B is IP2, the destination IP address carried in the effective access request is IP1, and the destination IP address carried in the effective access request is changed to IP2, at this time, the effective access request after changing the address can access the service device B.
Thus, when the solution provided by this embodiment is applied to generate the preheating request, since the determined access request is an effective access request meeting the preheating requirement, the efficiency of preheating processing performed by the service device according to the access request can be improved. In addition, the determined effective access request is reconstructed, so that each service device can access the service provided by the service device according to the access request with the parameters changed.
In an embodiment of the present invention, the reconfiguration process is performed on the determined access request in S303 to obtain a request capable of accessing the service provided by each service device itself, and the preheating request may be determined according to steps a1 to a 2.
Step A1: and changing the destination IP address and the destination port number carried in the determined effective access request to obtain a request capable of accessing the service provided by each service device.
For example, if there are 10 service devices, which are numbered 1 to 10, valid access requests of the 10 service devices are determined. And in the determined effective access requests, a certain effective access request comes from the service equipment with the number of 1, so that the access request can only access the service provided by the service equipment with the number of 1, and the 10 service equipment can access the service provided by the service equipment according to the access request with the changed parameters by changing the destination IP address and the destination port number carried in the access request.
Step A2: and adding a security check parameter in the obtained access request to serve as a preheating request.
Specifically, the security check parameter is a protocol parameter used for checking whether the access request is a legal access request. In the application process, each service device can check whether the service device can access itself according to the access request through the security check parameter.
Thus, the request for accessing the service provided by each service device can be obtained by changing the destination IP address and the destination port number carried in the determined effective access request. And moreover, the security check parameters are added in the obtained access request, so that the service equipment can check whether the service equipment can access the service equipment according to the access request or not through the security check parameters.
In an embodiment of the present invention, when performing the preheating process according to the preheating request recorded in the preheating configuration file, the plurality of distributed service devices may perform the preheating process according to the preheating request recorded in the preheating configuration file after the service provided by each service device is started and before the service provided by each service device normally operates.
Specifically, the fact that the service provided by each service device works normally means that each service device can respond to an access request, so that the service is provided for the user. After the services provided by each service device are started and before the services provided by each service device work normally, preheating is carried out, so that required resources can be loaded when the service devices start to provide the services normally, and each access request can be responded timely.
Therefore, the service equipment can be preheated before the service provided by the service equipment works normally, and the normal operation of the service equipment in service provision is ensured.
In an embodiment of the present invention, the plurality of distributed service devices are further configured to, after performing the preheating process according to the preheating request recorded in the preheating configuration file, detect whether the preheating process time is greater than a preset process time threshold, and if so, end the preheating process; or detecting whether the number of times of executing the preheating request is larger than a preset preheating request number threshold, and if so, ending the preheating processing.
For example: when the preset processing time threshold is 10min, and when the preheating processing time is detected to be 11min, the preheating processing is ended because the time is more than 10 min. When the preset number of times of the warm-up request is 10 times, it is detected that the number of times of the warm-up request execution is 11 times, and the warm-up process is ended because it is more than 10 times.
In this way, by setting the preheating time threshold or the preset preheating request time threshold, the time or execution times of the preheating of the service equipment can be limited, and the normal operation of the service equipment in service provision is ensured.
The following describes a warm-up method applied to a warm-up request configuration device according to an embodiment of the present invention.
Referring to fig. 4, fig. 4 is a flowchart illustrating a first warm-up method applied to a device for configuring a warm-up request according to an embodiment of the present invention, where the method includes S401 to S403.
The preheating request configuration device is used for managing preheating request data, and can add or delete the preheating data.
S401: and obtaining the access requests recorded in the access request logs from the service devices according to a preset time interval, and generating custom requests aiming at the services provided by the service devices.
Wherein, the access request log is: for recording access requests received by the service device for the services it provides. For example: when the service provided by the service device is a request processing service, the service device receives an access request for the request processing service.
The preset time interval may be preset by a worker, for example, the preset time interval may be one month, two months, or the like.
The obtaining of the access request log from each service device according to the preset time interval may be that the preheating request configuration device sends a request for obtaining the access request log to the service device according to the preset time interval, and the service device sends the access request log to the preheating request configuration device according to the request.
The customization request comprises: and the request is generated according to the business requirements of each service device and is used for loading the preset resources of the service provided by the service device.
Specifically, the service may be understood as: services provided by the service devices are mutually combined to provide services to the outside, for example: the service may be: fault detection services, etc. The service requirements of the service devices may be understood as follows: the individual services forming the business, for example: when the service is a fault detection service, a fault information acquisition service, a fault information classification service, a fault information transmission service, and the like are required. The various resources required by each service device for providing services may include resources such as lazy loading, thread pool creation, database caching, and the like. In different services, the generated requests for loading the preset resources of the service provided by the service device are different, and specifically, when the service involves the application of a class and the frequent use of cache resources, the requests for the resources relating to lazy loading class, thread pool creation, system cache, connection pool creation, and the like can be generated.
The generated custom request can be generated according to a custom request generation rule preset in the preheating request configuration device. In different services, the custom request generation rules are different. For example, when the application of a class, the frequent use of cache resources are involved in the service, the access request generation rule may be a rule for generating an access request related to a lazy load class, thread pool creation, system cache, connection pool creation, and the like.
S402: and generating a preheating request according to the access request and the self-defined request recorded in the access request log, and generating a preheating configuration file containing the preheating request.
Specifically, the access request and the custom request recorded in the access request log may be readjusted according to a format of the preheating request, so that the adjusted access request and the custom request have a format consistent with each other, and the constructed access request and the custom request are used as the preheating request.
The preheating configuration file can comprise parameters such as a preheating request, a preheating mode, preheating processing time and the like.
S403: and sending a preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode so that each service device carries out preheating treatment according to the preheating message.
The asynchronous transmission mode is a synchronous mode of data communication, and the preheating request configuration equipment can send the preheating message aiming at the configuration file to each service equipment at any time through the asynchronous transmission mode.
As can be seen from the above, when the preheating scheme provided by the embodiment of the present invention is applied to the preheating request configuration, the preheating request configuration device generates the preheating request according to the access request recorded in the collected access request log and the generated custom request, so that a relatively comprehensive preheating request can be generated. The preheating request configuration equipment sends the preheating messages aiming at the preheating configuration files to each service equipment in an asynchronous transmission mode according to the generated preheating configuration files containing the preheating requests, so that compared with the prior art in which the preheating requests are manually written, the preheating request configuration equipment can comprehensively cover the large distributed cluster equipment for preheating according to the comprehensive preheating requests.
In an embodiment of the present invention, the generating a warm-up request according to the access request and the custom request recorded in the access request log in the above S402 includes:
selecting an access request recorded in the access request log and an effective access request in the user-defined request; determining effective access requests meeting preheating requirements in the selected effective access requests; and reconstructing the determined effective access request to obtain a request capable of accessing the service provided by each service device as a preheating request.
For a detailed description of the above embodiment, reference may be made to the embodiment corresponding to fig. 3, which is not described herein again.
Thus, when the solution provided by this embodiment is applied to generate the preheating request, since the determined access request is an effective access request meeting the preheating requirement, the efficiency of preheating processing performed by the service device according to the access request can be improved. In addition, the determined effective access request is reconstructed, so that each service device can access the service provided by the service device according to the access request with the parameters changed.
In an embodiment of the present invention, the reconstructing the determined valid access request to obtain a request capable of accessing the service provided by each service device itself, as the preheating request, includes:
changing the destination IP address and the destination port number carried in the determined effective access request to obtain a request capable of accessing the service provided by each service device; and adding a security check parameter in the obtained access request to serve as a preheating request.
For specific description of the above embodiment, reference may be made to the embodiment corresponding to step a 1-step a2 in the above preheating system embodiment, and details are not repeated here.
Thus, the request for accessing the service provided by each service device can be obtained by changing the destination IP address and the destination port number carried in the determined effective access request. And moreover, the security check parameters are added in the obtained access request, so that the service equipment can check whether the service equipment can access the service equipment according to the access request or not through the security check parameters.
The following describes a preheating method applied to a service device according to an embodiment of the present invention with reference to specific embodiments.
Referring to fig. 5, fig. 5 is a flowchart illustrating a second preheating method applied to a service device according to an embodiment of the present invention, where the method includes S501-S503.
S501: and receiving a preheating message aiming at the preheating configuration file sent by the preheating request configuration equipment.
The preheating configuration file comprises: and generating a preheating request according to the access request recorded in the access request log and the self-defined request. The access request log comprises: for recording access requests received by the service device for its provided services. The customization request comprises: and the request is generated according to the service requirement of each service device and is used for loading the preset resource of the service provided by the service device.
S502: and storing the preheating message into a message queue of the device, and acquiring a preheating configuration file from the preheating request configuration equipment when the preheating message is monitored to be positioned at the queue head of the message queue.
The message queue is used for storing messages received by the service device, and a common message queue framework such as ActiveMQ, rocktmq and the like can be used.
When the preheat message is located at the queue head of the message queue, the service device may obtain the preheat profile according to the preheat message.
S503: and performing preheating treatment according to the preheating request recorded in the preheating configuration file.
Specifically, the corresponding preheating processing may be performed according to the access request and the custom request recorded in the access request log in the preheating request.
As can be seen from the above, by applying the scheme provided in this embodiment, each service device can simulate an access request according to the preheating request in the preheating configuration file, access the service provided by itself, and then complete loading of the resource required for the access, thereby implementing preheating of the service device. Therefore, the embodiment of the invention can obtain more comprehensive access requests and realize comprehensive coverage of preheating large-scale distributed cluster service equipment.
In an embodiment of the present invention, in the above S503, performing the preheating process according to the preheating request recorded in the preheating configuration file includes:
and after the provided service is started and before the provided service works normally, performing preheating treatment according to the preheating request recorded in the preheating configuration file.
For specific description of the above embodiments, reference may be made to corresponding embodiments in the above preheating system, which are not described herein again.
Therefore, the service equipment can be preheated before the service provided by the service equipment works normally, and the normal operation of the service equipment in service provision is ensured.
In an embodiment of the present invention, after performing the preheating process according to the preheating request recorded in the preheating configuration file in the above S503, the method further includes:
detecting whether the preheating treatment time is greater than a preset treatment time threshold value or not, and if so, ending the preheating treatment; or detecting whether the number of times of executing the preheating request is larger than a preset preheating request number threshold, and if so, ending the preheating processing.
For specific description of the above embodiments, reference may be made to corresponding embodiments in the above preheating system, which are not described herein again.
In this way, by setting the preheating time threshold or the preset preheating request time threshold, the time or execution times of the preheating of the service equipment can be limited, and the normal operation of the service equipment in service provision is ensured.
Corresponding to the preheating method, the embodiment of the invention also provides a preheating device.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a first preheating apparatus according to an embodiment of the present invention, applied to a preheating request configuration device, where the apparatus includes:
a request obtaining module 601, configured to obtain an access request log from each service device according to a preset time interval, and generate a custom request for a service provided by each service device, where the access request log is: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
a file generating module 602, configured to generate a preheating request according to the access request log and the custom request, and generate a preheating configuration file including the preheating request;
a message sending module 603, configured to send a preheating message for the preheating configuration file to each service device in an asynchronous transmission manner, so that each service device performs preheating processing according to the preheating message.
As can be seen from the above, with the solution provided in this embodiment, the preheating request configuration device generates the preheating request according to the access request recorded in the collected access request log and the generated custom request, so that a relatively comprehensive preheating request can be generated. The preheating request configuration equipment sends the preheating messages aiming at the preheating configuration files to each service equipment in an asynchronous transmission mode according to the generated preheating configuration files containing the preheating requests, so that compared with the prior art in which the preheating requests are manually written, the preheating request configuration equipment can comprehensively cover the large distributed cluster equipment for preheating according to the comprehensive preheating requests.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a second preheating apparatus according to an embodiment of the present invention, where the file generating module 602 includes:
an effective access request selection submodule 602A, configured to select an effective access request from the access request log and the custom request;
an access request determining submodule 602B, configured to determine an effective access request that meets the preheating requirement in the selected effective access requests;
the preheating request determining submodule 602C is configured to perform reconfiguration processing on the determined valid access request, and obtain a request capable of accessing the service provided by each service device itself, as a preheating request.
The file generating sub-module 602D is configured to generate a preheating configuration file including a preheating request.
Thus, when the solution provided by this embodiment is applied to generate the preheating request, since the determined access request is an effective access request meeting the preheating requirement, the efficiency of preheating processing performed by the service device according to the access request can be improved. In addition, the determined effective access request is reconstructed, so that each service device can access the service provided by the service device according to the access request with the parameters changed.
In an embodiment of the present invention, the warming request determining sub-module 602C includes:
a request obtaining unit, configured to change a destination IP address and a destination port number carried in the determined valid access request, and obtain a request capable of accessing a service provided by each service device;
and the preheating request determining unit is used for adding a security check parameter in the obtained access request to be used as the preheating request.
Thus, the request for accessing the service provided by each service device can be obtained by changing the destination IP address and the destination port number carried in the determined effective access request. And moreover, the security check parameters are added in the obtained access request, so that the service equipment can check whether the service equipment can access the service equipment according to the access request or not through the security check parameters.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a third preheating device provided in an embodiment of the present invention, and the third preheating device is applied to a service device, where the third preheating device includes:
a preheating message receiving module 801, configured to receive a preheating message for a preheating configuration file sent by the preheating request configuration device, where the preheating configuration file includes: according to the preheating request generated by the access request log and the user-defined request, the access request log is as follows: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request for loading preset resources of the service provided by each service device is generated according to the service requirement of each service device;
a preheating configuration file obtaining module 802, configured to store the preheating message in a message queue of the preheating request configuration device, and obtain the preheating configuration file from the preheating request configuration device when it is monitored that the preheating message is located at a queue head of the message queue;
a preheating module 803, configured to perform preheating processing according to the preheating request recorded in the preheating configuration file.
As can be seen from the above, by applying the preheating scheme provided in this embodiment, each service device can simulate an access request according to the preheating request in the preheating configuration file, access the service provided by itself, and then complete loading of the resource required for the access, thereby implementing preheating of the service device. Therefore, the embodiment of the invention can obtain more comprehensive access requests and realize comprehensive coverage of preheating large-scale distributed cluster service equipment.
In an embodiment of the present invention, the preheating module 801 is specifically configured to:
and after the provided service is started and before the provided service works normally, performing preheating treatment according to the preheating request recorded in the preheating configuration file.
Therefore, the service equipment can be preheated before the service provided by the service equipment works normally, and the normal operation of the service equipment in service provision is ensured.
In an embodiment of the present invention, after the preheating module 803, the method further includes:
the detection module is used for detecting whether the preheating processing time is greater than a preset processing time threshold value or not, and if so, ending the preheating processing;
or
And detecting whether the times of executing the preheating request are larger than a preset preheating request time threshold, and if so, ending the preheating processing.
In this way, by setting the preheating time threshold or the preset preheating request time threshold, the time or execution times of the preheating of the service equipment can be limited, and the normal operation of the service equipment in service provision is ensured.
Corresponding to the preheating system, an embodiment of the present invention further provides a preheating method, referring to fig. 9, fig. 9 is a schematic flow chart of a third preheating method provided in the embodiment of the present invention, the method is applied to the preheating system, and the preheating system is composed of a preheating request configuration device and a plurality of distributed service devices, that is, the preheating is realized by the combined work of the preheating request configuration device and the distributed service devices.
Specifically, the method comprises the following steps:
s901, a preheating request configuration device, obtaining an access request log from each service device according to a preset time interval, and generating a custom request for a service provided by each service device, where the access request log is: the system is used for recording the access request received by the service equipment for the service provided by the service equipment, and the self-defining request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
and S902, the preheating request configuration device generates a preheating request according to the access request and the user-defined request recorded in the access request log and generates a preheating configuration file containing the preheating request.
And S903, the preheating request configuration equipment sends a preheating message aiming at the preheating configuration file to each service equipment in an asynchronous transmission mode.
And S904, the plurality of distributed service devices receive the preheating message aiming at the preheating configuration file sent by the preheating request configuration device.
S905, the plurality of distributed service devices store the preheating message to the message queue of the distributed service devices, and when the preheating message is monitored to be located at the queue head of the message queue, the preheating configuration file is obtained from the preheating request configuration device.
S906, the plurality of distributed service devices perform preheating processing according to the preheating request recorded in the preheating configuration file.
As can be seen from the above, with the adoption of the preheating scheme provided by this embodiment, the preheating request configuration device generates the preheating request according to the access request recorded in the collected access request log and the generated custom request, so that a relatively comprehensive preheating request can be generated. The preheating request configuration equipment sends the preheating messages aiming at the preheating configuration files to each service equipment in an asynchronous transmission mode according to the generated preheating configuration files containing the preheating requests, so that compared with the prior art in which the preheating requests are manually written, the preheating request configuration equipment can comprehensively cover the large distributed cluster equipment for preheating according to the comprehensive preheating requests. In addition, each service device can simulate an access request according to the preheating request in the preheating configuration file, access the service provided by the service device, and further complete the loading of the resources required by the access, thereby realizing the preheating of the service device. Therefore, by applying the embodiment, a relatively comprehensive access request can be obtained, and comprehensive coverage of preheating the large distributed cluster service equipment is realized.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, when the electronic device configures a device for a warm-up request, the electronic device includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, where the processor 1001, the communication interface 1002 and the memory 1003 complete communication with each other through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001, when executing the program stored in the memory 1003, executes the steps of the warm-up method provided in the embodiment of the method applied to the warm-up request configuration device.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), 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, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Referring to fig. 11, fig. 11 is a schematic structural diagram of another electronic device according to an embodiment of the present invention, and when the electronic device is a service device, the electronic device includes a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, where the processor 1101, the communication interface 1102, and the memory 1103 complete communication with each other through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to execute the preheating method steps provided by the foregoing method embodiments applied to the service device when executing the program stored in the memory 1103.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), 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, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In a further embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program is executed by a processor to execute the preheating method steps provided by the foregoing method embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the pre-heating method provided by the aforementioned method embodiments.
As can be seen from the above, with the adoption of the preheating scheme provided by this embodiment, the preheating request configuration device generates the preheating request according to the access request recorded in the collected access request log and the generated custom request, so that a relatively comprehensive preheating request can be generated. The preheating request configuration equipment sends the preheating messages aiming at the preheating configuration files to each service equipment in an asynchronous transmission mode according to the generated preheating configuration files containing the preheating requests, so that compared with the prior art in which the preheating requests are manually written, the preheating request configuration equipment can comprehensively cover the large distributed cluster equipment for preheating according to the comprehensive preheating requests. In addition, each service device can simulate an access request according to the preheating request in the preheating configuration file, access the service provided by the service device, and further complete the loading of the resources required by the access, thereby realizing the preheating of the service device. Therefore, by applying the embodiment, a relatively comprehensive access request can be obtained, and comprehensive coverage of preheating the large distributed cluster service equipment is realized.
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, as for the method, apparatus, electronic device, and computer-readable storage medium embodiments, since they are substantially similar to the system embodiments, the description is simple, and reference may be made to some descriptions of the system embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A warm-up method applied to a warm-up request configuration device, the method comprising:
obtaining access request logs from each service device according to a preset time interval, and generating a custom request for the service provided by each service device, wherein the access request logs are as follows: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
generating a preheating request according to the access request recorded in the access request log and the user-defined request, and generating a preheating configuration file containing the preheating request;
and sending a preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode so that each service device carries out preheating treatment according to the preheating message.
2. The method of claim 1, wherein generating a warm-up request according to the access request and the custom request recorded in the access request log comprises:
selecting an access request recorded in the access request log and an effective access request in the self-defined request;
determining effective access requests meeting preheating requirements in the selected effective access requests;
and reconstructing the determined effective access request to obtain a request capable of accessing the service provided by each service device as a preheating request.
3. The method according to claim 2, wherein the reconstructing the determined valid access request to obtain a request capable of accessing the service provided by each service device itself as a warm-up request comprises:
changing the destination IP address and the destination port number carried in the determined effective access request to obtain a request capable of accessing the service provided by each service device;
and adding a security check parameter in the obtained access request to serve as a preheating request.
4. A preheating method is applied to a service device, and comprises the following steps:
receiving a preheating message aiming at a preheating configuration file sent by a preheating request configuration device, wherein the preheating configuration file comprises: according to the access request recorded in the access request log and the preheating request generated by the user-defined request, the access request log is as follows: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request for loading preset resources of the service provided by each service device is generated according to the service requirement of each service device;
storing the preheating message to a message queue of the preheating message, and acquiring the preheating configuration file from the preheating request configuration equipment when the preheating message is monitored to be positioned at the queue head of the message queue;
and performing preheating treatment according to the preheating request recorded in the preheating configuration file.
5. The method of claim 4, wherein the performing the pre-heating process according to the pre-heating request recorded in the pre-heating configuration file comprises:
and after the provided service is started and before the provided service works normally, performing preheating treatment according to the preheating request recorded in the preheating configuration file.
6. The method according to claim 4 or 5, after the performing the preheating processing according to the preheating request recorded in the preheating profile, further comprising:
detecting whether the preheating treatment time is greater than a preset treatment time threshold value or not, and if so, ending the preheating treatment;
or
And detecting whether the times of executing the preheating request are larger than a preset preheating request time threshold, and if so, ending the preheating processing.
7. A warming apparatus, applied to a warming request configuration device, the apparatus comprising:
a request obtaining module, configured to obtain an access request log from each service device according to a preset time interval, and generate a custom request for a service provided by each service device, where the access request log is: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
the file generation module is used for generating a preheating request according to the access request recorded in the access request log and the user-defined request and generating a preheating configuration file containing the preheating request;
and the message sending module is used for sending the preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode so that each service device can carry out preheating treatment according to the preheating message.
8. A preheating device, applied to a service device, the device comprising:
a preheating message receiving module, configured to receive a preheating message for a preheating configuration file sent by a preheating request configuration device, where the preheating configuration file includes: according to the access request recorded in the access request log and the preheating request generated by the user-defined request, the access request log is as follows: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request for loading preset resources of the service provided by each service device is generated according to the service requirement of each service device;
a preheating configuration file obtaining module, configured to store the preheating message in a message queue of the preheating message obtaining module, and obtain the preheating configuration file from the preheating request configuration device when it is monitored that the preheating message is located at a queue head of the message queue;
and the preheating processing module is used for carrying out preheating processing according to the preheating request recorded in the preheating configuration file.
9. A preheating system, characterized in that the system comprises: a pre-heat request configuration device and a plurality of distributed service devices, wherein,
the preheating request configuration device is configured to obtain an access request log from each service device according to a preset time interval, and generate a custom request for a service provided by each service device, where the access request log is: the system is used for recording an access request received by a service device for a service provided by the service device, and the custom request comprises: a request which is generated according to the business requirements of each service device and is used for loading preset resources of the service provided by the service device;
the preheating request configuration device is used for generating a preheating request according to the access request recorded in the access request log and the user-defined request, and generating a preheating configuration file containing the preheating request; sending a preheating message aiming at the preheating configuration file to each service device in an asynchronous transmission mode;
the distributed service devices are used for receiving a preheating message aiming at a preheating configuration file sent by the preheating request configuration device; and storing the preheating message into a message queue of the preheating message, acquiring the preheating configuration file from the preheating request configuration equipment when the preheating message is monitored to be positioned at the queue head of the message queue, and carrying out preheating treatment according to the preheating request recorded in the preheating configuration file.
10. The electronic equipment is characterized by being used as a preheating request configuration device and comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 3 when executing a program stored in the memory.
11. The electronic equipment is characterized by serving as service equipment and comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 4 to 6 when executing a program stored in the memory.
CN201911148744.7A 2019-11-21 2019-11-21 Preheating method, device and system and electronic equipment Active CN110933152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911148744.7A CN110933152B (en) 2019-11-21 2019-11-21 Preheating method, device and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911148744.7A CN110933152B (en) 2019-11-21 2019-11-21 Preheating method, device and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN110933152A CN110933152A (en) 2020-03-27
CN110933152B true CN110933152B (en) 2022-04-22

Family

ID=69850549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911148744.7A Active CN110933152B (en) 2019-11-21 2019-11-21 Preheating method, device and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN110933152B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756711A (en) * 2020-06-11 2020-10-09 微医云(杭州)控股有限公司 Flow control method, device, system and storage medium
CN112099921A (en) * 2020-09-27 2020-12-18 中国建设银行股份有限公司 Java application system preheating method and system based on JVM
CN113268360A (en) * 2021-05-14 2021-08-17 北京三快在线科技有限公司 Request processing method, device, server and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6430616B1 (en) * 1998-12-04 2002-08-06 Sun Microsystems, Inc. Scalable system method for efficiently logging management information associated with a network
US7243044B2 (en) * 2005-04-22 2007-07-10 Johnson Controls Technology Company Method and system for assessing energy performance
DE102008062865B4 (en) * 2008-05-30 2016-09-22 Continental Teves Ag & Co. Ohg Serial peripheral interface interface with reduced number of connection lines
US8495250B2 (en) * 2009-12-16 2013-07-23 International Business Machines Corporation Asynchronous file operations in a scalable multi-node file system cache for a remote cluster file system
CN107483613B (en) * 2017-08-31 2020-07-14 江西博瑞彤芸科技有限公司 Information pushing method
CN107592346B (en) * 2017-08-31 2020-09-01 江西博瑞彤芸科技有限公司 User classification method based on user behavior analysis
CN110324434B (en) * 2018-03-28 2022-07-05 阿里巴巴集团控股有限公司 Domain name resolution method, client, server and electronic equipment
CN109688094B (en) * 2018-09-07 2022-05-17 平安科技(深圳)有限公司 Suspicious IP configuration method, device, equipment and storage medium based on network security
CN109522055B (en) * 2018-11-01 2022-04-05 中国工商银行股份有限公司 Connection preheating method and system based on distributed service calling
CN109981745A (en) * 2019-02-28 2019-07-05 深圳市买买提信息科技有限公司 A kind of journal file processing method and server

Also Published As

Publication number Publication date
CN110933152A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
US11394625B2 (en) Service level agreement based storage access
CN108153670B (en) Interface testing method and device and electronic equipment
CN110933152B (en) Preheating method, device and system and electronic equipment
JP7389791B2 (en) Implementing Compliance Settings with Mobile Devices to Adhere to Configuration Scenarios
CN103501237B (en) Device management method, management platform, equipment and system
CN110661776B (en) Sensitive data tracing method, device, security gateway and system
CN107111510B (en) Method and device for operating VNF packet
US11088931B2 (en) Network speed detection
JP6545000B2 (en) Upload management system, control method of upload management system, and program
WO2023045552A1 (en) Service deployment method, service deployment system, electronic device, and storage medium
US20240012700A1 (en) Governing Access To Third-Party Application Programming Interfaces
CN114090623A (en) Method and device for creating cache resources, electronic equipment and storage medium
US9577967B2 (en) Method and system for managing an informational site using a social networking application
US9652630B2 (en) Enhanced view compliance tool
CA2967556A1 (en) Communication management method and communication management system
WO2018200167A1 (en) Managing asynchronous analytics operation based on communication exchange
US20200336371A1 (en) Single user device staging
CN111163088B (en) Message processing method, system and device and electronic equipment
CN111698324B (en) Data request method, device and system
US11403426B1 (en) Single path prioritization for a communication system
WO2024123378A1 (en) Managing notifications in a wireless network
CN117724654A (en) Data storage method, data reading method, device and system and electronic equipment

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