CN114827158A - Configuration information loading method, system and server - Google Patents

Configuration information loading method, system and server Download PDF

Info

Publication number
CN114827158A
CN114827158A CN202110063945.8A CN202110063945A CN114827158A CN 114827158 A CN114827158 A CN 114827158A CN 202110063945 A CN202110063945 A CN 202110063945A CN 114827158 A CN114827158 A CN 114827158A
Authority
CN
China
Prior art keywords
domain name
request
loading
acceleration
state
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.)
Pending
Application number
CN202110063945.8A
Other languages
Chinese (zh)
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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN202110063945.8A priority Critical patent/CN114827158A/en
Publication of CN114827158A publication Critical patent/CN114827158A/en
Pending legal-status Critical Current

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The invention discloses a loading method, a system and a server of configuration information, wherein the method applied to a main process comprises the following steps: receiving request information about a target domain name sent by a working process, and inquiring a state identifier of the target domain name; if the state identifier represents a loaded state, feeding back loading information of the target domain name to the working process so that the working process provides acceleration service based on the loading information; if the state identifier represents a loaded state or an unloaded state, writing the process identifier carried in the request information into a request linked list of a shared memory, and loading the configuration information of the target domain name into the shared memory; and after the loading result is provided for the work process represented by the process identification, emptying the request linked list. The technical scheme provided by the application can save the memory consumption of the system.

Description

Configuration information loading method, system and server
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, a system, and a server for loading configuration information.
Background
In a CDN (Content Delivery Network), when a device such as a load balancer, a proxy server, and a node server operates, server configuration information of all domain names generally needs to be loaded into a memory, and then initialization is performed according to the configuration information. Then, when an acceleration request for a domain name is received, different acceleration services can be provided according to different configuration information.
However, the manner of loading the configuration information of all domain names into the memory obviously consumes a very large amount of memory, and different domain names and different liveness may be different, and after the configuration information of a part of domain names is loaded into the memory, there may be no acceleration request to be processed within a period of time, which results in a large amount of memory being occupied. Therefore, a more efficient method for processing the acceleration request is needed.
Disclosure of Invention
The application aims to provide a configuration information loading method, a configuration information loading system and a configuration information loading server, which can save the memory consumption of the system.
In order to achieve the above object, an aspect of the present application provides a method for loading configuration information, where the method is applied in a host process, and the method includes: receiving request information about a target domain name sent by a working process, and inquiring a state identifier of the target domain name; if the state identifier represents a loaded state, feeding back loading information of the target domain name to the working process so that the working process provides acceleration service based on the loading information; if the state identifier represents a loaded state or an unloaded state, writing the process identifier carried in the request information into a request linked list of a shared memory, and loading the configuration information of the target domain name into the shared memory; and after the loading result is provided for the work process represented by the process identification, emptying the request linked list.
In order to achieve the above object, another aspect of the present application further provides a system for loading configuration information, where the system includes: the state identification query unit is used for receiving request information about a target domain name sent by a work process and querying the state identification of the target domain name; the first processing unit is used for feeding back the loading information of the target domain name to the work process if the state identifier represents the loaded state, so that the work process provides acceleration service based on the loading information; the second processing unit is configured to, if the state identifier represents a loaded state or an unloaded state, write the process identifier carried in the request information into a request linked list of a shared memory, and load the configuration information of the target domain name into the shared memory; and after the loading result is provided for the work process represented by the process identification, emptying the request linked list.
In order to achieve the above object, another aspect of the present application further provides a method for loading configuration information, where the method is applied in a work process, and the method includes: receiving an acceleration request about a target domain name, and inquiring a state identifier of the target domain name; if the state identifier represents a loaded state, reading configuration information of the target domain name from a shared memory, and providing acceleration service based on the configuration information; and if the state identification represents a loaded state or an unloaded state, sending request information corresponding to the acceleration request to a main process, suspending processing of the acceleration request until a loading result fed back by the main process is received, continuing processing of the acceleration request, and providing acceleration service according to the loading result.
In order to achieve the above object, another aspect of the present application further provides a system for loading configuration information, where the system includes: the request query unit is used for receiving an acceleration request about a target domain name and querying a state identifier of the target domain name; the non-delay processing unit is used for reading the configuration information of the target domain name from the shared memory if the state identifier represents the loaded state, and providing acceleration service based on the configuration information; and the delay processing unit is used for sending request information corresponding to the acceleration request to a main process if the state identifier represents a loaded state or an unloaded state, suspending processing of the acceleration request until a loading result fed back by the main process is received, continuing processing of the acceleration request, and providing acceleration service according to the loading result.
The application also provides a server, which comprises a memory and a processor, wherein the memory is used for storing a computer program, and the computer program realizes the loading method of the configuration information when being executed by the processor.
As can be seen from the above, according to the technical solutions provided by one or more embodiments of the present application, whether to delay loading of the configuration information of the domain name may be determined through the state identifier of the domain name. Specifically, when the host process receives request information about a target domain name sent by the work process, the host process may query the current state identifier of the target domain name. Generally, state identification can be used to distinguish between hotspot and non-hotspot domain names. When the main process is in initial configuration, the configuration information of the hot domain name can be directly loaded into the shared memory, and the state identifier of the hot domain name can be marked as loaded, so that for the hot domain name, the working process can directly read the configuration information from the shared memory and provide acceleration service. For the non-hotspot domain name, the host process may mark the state identifier as an unloaded state during initialization configuration, that is, the configuration information of the non-hotspot domain name does not need to be initially loaded into the shared memory. When the main process receives the request information sent by the working process, the configuration information of the non-hotspot domain name is loaded into the shared memory. And for the same acceleration domain name, if a plurality of concurrent working processes request acceleration, the loading result can be provided for each working process one by one. Therefore, the configuration information is loaded in the shared memory once, the loading result can be provided for a plurality of processes, and repeated loading of the configuration information is avoided. Therefore, the memory consumption can be greatly reduced at the same time by delaying the loading and sharing of the memory, and the stability of the system is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic step diagram of a method for loading configuration information in nginx, which is executed by a host process in an embodiment of the present invention;
FIG. 2 is a schematic diagram of the operation of a host process in an embodiment of the invention;
fig. 3 is a schematic step diagram of a method for loading configuration information in nginx, which is executed by a worker process in an embodiment of the present invention;
FIG. 4 is an operational diagram of a worker process in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to the detailed description of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The application provides a loading method of configuration information, which can be applied to equipment such as a node server, a load balancer and a proxy server. In the above-mentioned devices such as the node server, the load balancer, and the proxy server, a service system for implementing a service may be generally deployed, and the service system may be implemented based on a certain architecture. For example, in the current CDN, the nginx architecture is widely applied to devices such as a node server, a load balancer, and a proxy server due to high performance and high stability. The application takes the nginx architecture as an example, and explains the loading method of the configuration information.
Referring to fig. 1 and fig. 2, a method for loading configuration information according to an embodiment may be performed by a host process in a service system, and the method may include the following steps.
S11: receiving request information about a target domain name sent by a work process, and inquiring the state identification of the target domain name.
In this embodiment, a state identifier may be added to the acceleration domain name, and the state identifier may represent a loading state of the configuration information of the acceleration domain name. For example, the state identification may characterize a loaded state, and an unloaded state. At the same time, the state identifier of each acceleration domain name can only represent one loading state. In order to ensure that the state identifier of the accelerated domain name is synchronized among multiple processes, a read-write lock needs to be added when the state identifier is read and updated.
In the nginx system, a main process and a plurality of work processes can be generally included, and the main process and the work processes can communicate through a bidirectional pipeline. Thus, for N work processes, corresponding N bidirectional pipes may be created. Through the bidirectional pipeline, the main process can receive request information sent by the work process, and the work process can monitor various messages sent by the main process.
In this embodiment, in order to share the configuration information of the acceleration domain name among a plurality of processes, it is necessary to store the configuration information of the acceleration domain name in the shared memory. The nginx system generally uses heap memory for data storage, so that the memory pool of the nginx system needs to be expanded. Specifically, a pointer ngx _ slab _ pool _ t of the shared memory pool may be added to the ngx _ pool _ t object, and the pointer may default to null initially, and after the shared memory is created, the pointer may be pointed to the shared memory. In this way, the configuration information of the acceleration domain name can be stored in the shared memory pointed by the pointer.
Referring to fig. 2, in the present embodiment, when the host process is started, the configuration item of each acceleration domain name may be read through a configuration management system or file scanning. In practical applications, the configuration item of the acceleration domain name may be included in the configuration block. For example, a configuration block in one application example may be:
Figure BDA0002903442350000041
Figure BDA0002903442350000051
in the configuration block, a plurality of configuration items may define a domain name of www.wangsu.com for the server, the domain name is limited to 10kbps, and the configuration block may return test content "test" after being resolved.
By reading the configuration items of the accelerated domain names, the main process can acquire the monitoring ports of the accelerated domain names. The listening port may be determined according to the type of the acceleration domain name, for example, an http acceleration domain name port is commonly used as an 80 or 8000 or 8080 port, and an https acceleration domain name port is commonly used as a 443 or 8443 port. After the monitoring port of the acceleration domain name is obtained, the mapping relation between the port and the acceleration domain name can be recorded, and the corresponding monitoring port can be obtained through query by the acceleration domain name. The mapping relationship may be recorded in the shared memory, so that the mapping relationship is shared among multiple processes. Of course, the accelerated domain name in the mapping relationship may be an accurate domain name, or may be a generic domain name with a specified prefix or a specified suffix, and the implementation manner of the accelerated domain name is not limited in the present application. In order to enable the listening port to be used normally, an interface of an initialization port configuration item of nginx needs to be called, the listening port is initialized, and listening is set.
In one embodiment, after the host process creates the shared memory, the host process may use the shared memory to store process data generated during the loading process of the accelerated domain name. In practical applications, the process data may include:
1. the state identifier is used for representing a loading state;
2. the request linked list is used for storing the process identifier of the work process and the request identifier of the acceleration request;
3. the configuration item is used for loading corresponding configuration information;
4. and the server loads data for storing the configuration data obtained after the loading of the accelerated domain name is finished.
In this embodiment, when initializing the original configuration information of each accelerated domain name, the main process may identify a delay identifier of each accelerated domain name, where the delay identifier may be an manually-labeled identifier, and the delay identifier may represent whether the accelerated domain name is a hotspot domain name. If the acceleration domain name is a hotspot domain name, the access amount of the acceleration domain name is generally large, so that when the acceleration service is provided, the configuration information should adopt a strategy of not delaying loading. For the non-hotspot domain names, the access amount is not large, so that the configuration information can adopt a delayed loading strategy, and the consumption of the memory is saved.
Specifically, after the delay identifier of each acceleration domain name is identified, a target acceleration domain name representing non-delay loading can be screened out, and the target acceleration domain name can be used as the hot-spot domain name. The main process can load the configuration information of the target acceleration domain name, write the loaded configuration information into server loading data of the shared memory, and mark the state identifier of the target acceleration domain name as a loaded state in the shared memory, and other acceleration domain names except the target acceleration domain name can be used as non-hotspot domain names, and the state identifier can be marked as an unloaded state. Thus, when the original configuration information is initialized, the original configuration information of the hotspot domain name can be loaded into the shared memory in advance, and the loading of the non-hotspot domain name can be delayed. In practical application, in order to efficiently query the corresponding state identifier and configuration information according to the accelerated domain name, the data in the server-side loaded data may be stored in a hash table or a balanced binary tree manner.
In this embodiment, after receiving the acceleration request of the target domain name, the work process may send request information of the target domain name to the host process. The request information may include information such as a target domain name, a process identifier of a work process, and a request identifier of an acceleration request. In practical application, the request memory address of the working process can be directly used as the request identifier of the acceleration request, so that the time and resources for generating the request identifier are saved, and the data processing efficiency is improved.
In this embodiment, after receiving the request information of the target domain name, the host process may query the status identifier of the target domain name. Depending on the result of the initialization, the state identification may be a loaded state or an unloaded state. Of course, since the work process may not receive the acceleration request for the target domain name for the first time, the state identification of the target domain name may have been previously modified, resulting in the state identification also being marked as the in-load state.
S13: and if the state identifier represents the loaded state, feeding back the loading information of the target domain name to the working process so that the working process provides acceleration service based on the loading information.
In this embodiment, if the state identifier of the target domain name obtained by the query is a loaded state, it indicates that the configuration information of the target domain name is already stored in the shared memory. At this time, the main process may feed back the loading information of the target domain name to the work process through the bidirectional pipeline. In addition, in order to enable the work process to know to which acceleration request the loading information is fed back, the loading information may further include a request identifier of the acceleration request. After receiving the loading information fed back by the main process, the working process can read the corresponding configuration information from the shared memory and provide acceleration service by using the read configuration information.
S15: if the state identifier represents a loaded state or an unloaded state, writing the process identifier carried in the request information into a request linked list of a shared memory, and loading the configuration information of the target domain name into the shared memory; and after the loading result is provided for the work process represented by the process identification, emptying the request linked list.
In this embodiment, if the state identifier represents the loading state, it indicates that the host process is currently storing the configuration information of the target domain name in the shared memory. At this time, the process identifier carried in the request information may be written into the request linked list of the shared memory, and of course, in order to distinguish different acceleration requests, the request identifier may also be written into the request linked list. The request linked list may record process identifiers and request identifiers corresponding to different work processes. Thus, if a plurality of concurrent working processes receive the same acceleration request of the target domain name in a short time, in the process of loading the configuration information of the target domain name, the process identifier and the request identifier of the working processes can be recorded in the request linked list. That is, the portion of the acceleration request may be suspended (suspended processing) before the configuration information is loaded.
In addition, if the state identifier represents an unloaded state, the process identifier and the request identifier may also be recorded in the request linked list of the target domain name, and the state identifier may be modified to a loaded state.
In this embodiment, after the host process loads the configuration information of the target domain name into the server load data of the shared memory, the state identifier of the target domain name may be modified to the loaded state. Then, the main process can traverse each group of process identifiers and request identifiers in the request linked list of the target domain name, and provide the loading results to the work processes represented by each process identifier one by one. In addition, in order to enable the work process to know to which acceleration request the loading information is fed back, the loading result may further include a request identifier of the acceleration request. Therefore, after receiving the loading result, the working process can read the corresponding configuration information from the shared memory and provide acceleration service by using the read configuration information.
In this embodiment, after the main process feeds back the loading result to the work process represented by each process identifier in the request linked list, the request linked list can be emptied, thereby completing the process of batch processing concurrent requests. Therefore, for the same acceleration domain name, if a plurality of concurrent working processes request acceleration, the loading result can be provided for each working process one by one. Therefore, the configuration information is loaded in the shared memory once, the loading result can be provided for a plurality of processes, and repeated loading of the configuration information is avoided.
In this embodiment, when the host process loads the configuration information of the target domain name, the host process may read the configuration item of the target domain name. Specifically, the ngx _ conf _ t object may read the configuration entry for the target domain name by calling nginx to resolve the interface that loads the configuration (ngx _ pars _ conf interface). In the read configuration items, a plurality of configuration items for which initialization has been completed are included. For example, two configuration items characterizing the listening port (listen) and the domain name (server _ name) have been initialized before. Therefore, it is necessary to remove the configuration items that have completed initialization from the read configuration items and load the configuration information of the remaining configuration items.
In this embodiment, since a part of the configuration information of the target domain name may be configured on http and a part of the configuration information of the target domain name may be configured on a specific domain name, the configuration information loaded according to the configuration item of the target domain name may not be complete. At this time, the loaded configuration information and the preset http configuration information may be merged to obtain complete configuration information, and the merged configuration information may be written into the shared memory for the work process to read.
In practical application, if an exception occurs in the loading process, a reload interface of nginx may be called to restart the loading service, so as to ensure that the loading process can be completed normally.
The present application further provides a system for loading configuration information, the system including:
the state identification query unit is used for receiving request information about a target domain name sent by a work process and querying the state identification of the target domain name;
the first processing unit is used for feeding back the loading information of the target domain name to the working process if the state identifier represents the loaded state, so that the working process provides acceleration service based on the loading information;
the second processing unit is configured to, if the state identifier represents a loaded state or an unloaded state, write the process identifier carried in the request information into a request linked list of a shared memory, and load the configuration information of the target domain name into the shared memory; and traversing the process identifiers in the request linked list, and clearing the request linked list after the loading result is provided for the working process represented by each process identifier one by one.
Referring to fig. 3 and 4, the present application further provides a method for loading configuration information applied to a work process, where the method may include the following steps.
S21: receiving an acceleration request about a target domain name, and inquiring a state identifier of the target domain name;
s23: if the state identifier represents a loaded state, reading configuration information of the target domain name from a shared memory, and providing acceleration service based on the configuration information;
s25: and if the state identification represents a loaded state or an unloaded state, sending request information corresponding to the acceleration request to a main process, suspending processing of the acceleration request until a loading result fed back by the main process is received, continuing processing of the acceleration request, and providing acceleration service according to the loading result.
In this embodiment, the work process may monitor the message fed back by the host process through the bidirectional pipe, and may also receive an acceleration request about the target domain name sent by the user. Upon receiving an acceleration request for the target domain name, the work process may query the state identification of the target domain name.
In practical application, on one hand, a work process can directly query the state identifier of the target domain name from the shared memory, and also can send request information of the target domain name to a main process, wherein the request information can include the target domain name, the process identifier of the work process and the request identifier of the acceleration request. Thus, after the state identifier of the target domain name is obtained, if the state identifier represents the loaded state, it indicates that the configuration information of the target domain name already exists in the server load data of the current shared memory. At this time, the work process may read the corresponding configuration information from the shared memory, and provide an acceleration service using the read configuration information.
In one embodiment, if the state identifier represents a loaded state or an unloaded state, the work process may send request information corresponding to the acceleration request to the host process and suspend processing of the acceleration request. According to the description in step S15, when the main process loads the configuration information, the process identifier of the work process and the request identifier of the acceleration request may be written into the request chain table of the target domain name. After the configuration information is loaded, the main process can feed back the loading result to the working process represented by each process identifier in the request linked list. In this way, the working process can continue to process the acceleration request after receiving the loading result fed back by the main process. According to the content of the loading result, the working process can read the configuration information from the shared memory and provide acceleration service according to the loading result.
In an embodiment, after receiving an acceleration request for a target domain name, a work process may query whether domain name information of the target domain name exists in a shared memory, and if not, it indicates that the target domain name does not deploy acceleration service, and at this time, the acceleration request may be rejected or acceleration service may be provided for the target domain name based on general configuration information.
In an embodiment, after receiving an acceleration request for a target domain name, a work process may further identify a port obtained by analysis according to a configuration item when the target domain name is initialized from a shared memory, compare the identified port with a port receiving the acceleration request, and if the identified port and the port receiving the acceleration request are not consistent, indicate that the port is abnormal, at this time, the acceleration request may be processed in a manner specified by configuration information of the target domain name. The specified manner may be, for example, rejecting the acceleration request, or continuing to perform subsequent steps regardless of the port exception.
The present application further provides a system for loading configuration information, the system including:
the request query unit is used for receiving an acceleration request about a target domain name and querying a state identifier of the target domain name;
the non-delay processing unit is used for reading the configuration information of the target domain name from the shared memory if the state identifier represents the loaded state, and providing acceleration service based on the configuration information;
and the delay processing unit is used for sending request information corresponding to the acceleration request to a main process if the state identifier represents a loaded state or an unloaded state, suspending processing of the acceleration request until a loading result fed back by the main process is received, continuing processing of the acceleration request, and providing acceleration service according to the loading result.
The application also provides a server, which comprises a memory and a processor, wherein the memory is used for storing a computer program, and the computer program realizes the loading method of the configuration information when being executed by the processor.
As can be seen from the above, in the technical solutions provided by one or more embodiments of the present application, whether to delay loading of configuration information of a domain name may be determined through a state identifier of the domain name. Specifically, when the host process receives request information about a target domain name sent by the work process, the host process may query the current state identifier of the target domain name. Generally, state identification can be used to distinguish between hotspot and non-hotspot domain names. When the main process is in initial configuration, the configuration information of the hot domain name can be directly loaded into the shared memory, and the state identifier of the hot domain name can be marked as loaded, so that for the hot domain name, the working process can directly read the configuration information from the shared memory and provide acceleration service. For the non-hotspot domain name, the host process may mark the state identifier as an unloaded state during initialization configuration, that is, the configuration information of the non-hotspot domain name does not need to be initially loaded into the shared memory. When the main process receives the request information sent by the working process, the configuration information of the non-hotspot domain name is loaded into the shared memory. And for the same acceleration domain name, if a plurality of concurrent working processes request acceleration, the loading result can be provided for each working process one by one. Therefore, the configuration information is loaded in the shared memory once, the loading result can be provided for a plurality of processes, and repeated loading of the configuration information is avoided. Therefore, the memory consumption can be greatly reduced at the same time by delaying the loading and sharing of the memory, and the stability of the system is ensured.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, both the system and the server embodiments can be explained with reference to the introduction of the embodiments of the method described above.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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 like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an embodiment of the present application, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (15)

1. A method for loading configuration information is applied to a main process, and comprises the following steps:
receiving request information about a target domain name sent by a working process, and inquiring a state identifier of the target domain name;
if the state identifier represents a loaded state, feeding back loading information of the target domain name to the working process so that the working process provides acceleration service based on the loading information;
if the state identifier represents a loaded state or an unloaded state, writing the process identifier carried in the request information into a request linked list of a shared memory, and loading the configuration information of the target domain name into the shared memory; and after the loading result is provided for the work process represented by the process identification, emptying the request linked list.
2. The method of claim 1, wherein before receiving the request information about the target domain name from the work process, the method further comprises:
reading the configuration items of each acceleration domain name, and acquiring the monitoring port of each acceleration domain name from the read configuration items;
initializing each monitoring port, and recording the mapping relation between the monitoring port and the corresponding acceleration domain name.
3. The method according to claim 1 or 2, wherein before receiving the request information about the target domain name from the work process, the method further comprises:
creating a shared memory, wherein the shared memory is used for storing process data generated in the loading process of the accelerated domain name;
identifying delay marks of all acceleration domain names, and screening out target acceleration domain names representing non-delay loading;
loading the configuration information of the target acceleration domain name, writing the loaded configuration information into the shared memory, marking the state identifier of the target acceleration domain name as a loaded state in the shared memory, and marking the state identifiers of other acceleration domain names except the target acceleration domain name as an unloaded state.
4. The method of claim 3, wherein the loading of the process data generated during the process comprises at least:
state identification used for representing the loading state;
the request linked list is used for storing the process identifier of the work process and the request identifier of the acceleration request;
the configuration item is used for loading corresponding configuration information;
and the server loads data for storing the configuration data obtained after the loading of the accelerated domain name is finished.
5. The method according to claim 1, wherein if the state identifier represents an unloaded state, after writing the process identifier carried in the request information into a request linked list of a shared memory, the state identifier is modified into a loading state.
6. The method of claim 1, wherein loading the configuration information for the target domain name into the shared memory comprises:
reading the configuration items of the target domain name, removing the configuration items which are initialized in the configuration items, and loading the configuration information of the rest configuration items;
and merging the loaded configuration information and preset http configuration information, and writing the merged configuration information into the shared memory.
7. The method according to claim 1, wherein the request information further includes a request identifier; correspondingly, the process identifier and the request identifier carried in the request information are written into a request linked list of the shared memory, and the provided loading result contains the request identifier.
8. The method of claim 1, wherein providing the load results to the process-identified characterized work process comprises:
and traversing the process identifiers in the request linked list, and providing the loading results to the working processes represented by the process identifiers one by one.
9. A system for loading configuration information, the system comprising:
the state identification query unit is used for receiving request information about a target domain name sent by a work process and querying the state identification of the target domain name;
the first processing unit is used for feeding back the loading information of the target domain name to the working process if the state identifier represents the loaded state, so that the working process provides acceleration service based on the loading information;
the second processing unit is configured to, if the state identifier represents a loaded state or an unloaded state, write the process identifier carried in the request information into a request linked list of a shared memory, and load the configuration information of the target domain name into the shared memory; and after the loading result is provided for the work process represented by the process identification, emptying the request linked list.
10. A server, characterized in that the server comprises a memory for storing a computer program and a processor, the computer program, when executed by the processor, implementing the method according to any one of claims 1 to 8.
11. A method for loading configuration information is applied to a work process, and comprises the following steps:
receiving an acceleration request about a target domain name, and inquiring a state identifier of the target domain name;
if the state identifier represents a loaded state, reading configuration information of the target domain name from a shared memory, and providing acceleration service based on the configuration information;
and if the state identification represents a loaded state or an unloaded state, sending request information corresponding to the acceleration request to a main process, suspending processing of the acceleration request until a loading result fed back by the main process is received, continuing processing of the acceleration request, and providing acceleration service according to the loading result.
12. The method of claim 11, wherein after receiving the request for acceleration with respect to the target domain name, the method further comprises:
and inquiring whether the domain name information of the target domain name exists in a shared memory, if not, rejecting the acceleration request or providing acceleration service for the target domain name based on general configuration information.
13. The method of claim 11, wherein after receiving the request for acceleration with respect to the target domain name, the method further comprises:
and identifying a port of the target domain name, comparing the port with the port for receiving the acceleration request, and if the port is not consistent with the port for receiving the acceleration request, processing the acceleration request according to a mode specified by the configuration information of the target domain name.
14. A system for loading configuration information, the system comprising:
the request query unit is used for receiving an acceleration request about a target domain name and querying a state identifier of the target domain name;
the non-delay processing unit is used for reading the configuration information of the target domain name from the shared memory if the state identifier represents the loaded state, and providing acceleration service based on the configuration information;
and the delay processing unit is used for sending request information corresponding to the acceleration request to a main process if the state identifier represents a loaded state or an unloaded state, suspending processing of the acceleration request until a loading result fed back by the main process is received, continuing processing of the acceleration request, and providing acceleration service according to the loading result.
15. A server, characterized in that the server comprises a memory for storing a computer program and a processor, the computer program, when executed by the processor, implementing the method according to any one of claims 11 to 13.
CN202110063945.8A 2021-01-18 2021-01-18 Configuration information loading method, system and server Pending CN114827158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110063945.8A CN114827158A (en) 2021-01-18 2021-01-18 Configuration information loading method, system and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110063945.8A CN114827158A (en) 2021-01-18 2021-01-18 Configuration information loading method, system and server

Publications (1)

Publication Number Publication Date
CN114827158A true CN114827158A (en) 2022-07-29

Family

ID=82525098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110063945.8A Pending CN114827158A (en) 2021-01-18 2021-01-18 Configuration information loading method, system and server

Country Status (1)

Country Link
CN (1) CN114827158A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277236A (en) * 2022-08-01 2022-11-01 福建天晴在线互动科技有限公司 Method and system for carrying out request analysis on domain name

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040073707A1 (en) * 2001-05-23 2004-04-15 Hughes Electronics Corporation Generating a list of network addresses for pre-loading a network address cache via multicast
US20140143572A1 (en) * 2012-11-16 2014-05-22 Lenovo (Singapore) Pte, Ltd. Shortening resume time from a power-saving state
CN105608082A (en) * 2014-11-10 2016-05-25 中兴通讯股份有限公司 Data processing method, equipment and system
WO2016101635A1 (en) * 2014-12-23 2016-06-30 北京百度网讯科技有限公司 Method, apparatus and device for synchronizing login status, and computer storage medium
CN107544828A (en) * 2017-09-01 2018-01-05 北京奇虎科技有限公司 Configuring load application method and device
CN109150930A (en) * 2017-06-15 2019-01-04 北京金山云网络技术有限公司 Configuration information loading method and device, method for processing business and device
CN109644522A (en) * 2016-08-11 2019-04-16 信实通信有限公司 For passing through the method and system of wireless network secure loading equipemtn
CN110445886A (en) * 2019-07-05 2019-11-12 网宿科技股份有限公司 A kind of method and system realizing domain name access and accelerating
CN110968356A (en) * 2018-09-29 2020-04-07 北京金山云网络技术有限公司 Method and device for acquiring configuration information
CN111079040A (en) * 2019-11-26 2020-04-28 北京达佳互联信息技术有限公司 Resource sniffing method, device, terminal, server and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040073707A1 (en) * 2001-05-23 2004-04-15 Hughes Electronics Corporation Generating a list of network addresses for pre-loading a network address cache via multicast
US20140143572A1 (en) * 2012-11-16 2014-05-22 Lenovo (Singapore) Pte, Ltd. Shortening resume time from a power-saving state
CN105608082A (en) * 2014-11-10 2016-05-25 中兴通讯股份有限公司 Data processing method, equipment and system
WO2016101635A1 (en) * 2014-12-23 2016-06-30 北京百度网讯科技有限公司 Method, apparatus and device for synchronizing login status, and computer storage medium
CN109644522A (en) * 2016-08-11 2019-04-16 信实通信有限公司 For passing through the method and system of wireless network secure loading equipemtn
CN109150930A (en) * 2017-06-15 2019-01-04 北京金山云网络技术有限公司 Configuration information loading method and device, method for processing business and device
CN107544828A (en) * 2017-09-01 2018-01-05 北京奇虎科技有限公司 Configuring load application method and device
CN110968356A (en) * 2018-09-29 2020-04-07 北京金山云网络技术有限公司 Method and device for acquiring configuration information
CN110445886A (en) * 2019-07-05 2019-11-12 网宿科技股份有限公司 A kind of method and system realizing domain name access and accelerating
CN111079040A (en) * 2019-11-26 2020-04-28 北京达佳互联信息技术有限公司 Resource sniffing method, device, terminal, server and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277236A (en) * 2022-08-01 2022-11-01 福建天晴在线互动科技有限公司 Method and system for carrying out request analysis on domain name
CN115277236B (en) * 2022-08-01 2023-08-18 福建天晴在线互动科技有限公司 Method and system for carrying out request analysis on domain name

Similar Documents

Publication Publication Date Title
EP3739845B1 (en) Borrowing data storage resources in a distributed file system
CN107844274B (en) Hardware resource management method, device and terminal based on super-fusion storage system
CN107959695B (en) Data transmission method and device
CN114884962A (en) Load balancing method and device and electronic equipment
CN114827158A (en) Configuration information loading method, system and server
CN113301009B (en) Sequential message processing method and device
CN110958278B (en) API gateway-based data processing method and system and API gateway
CN112579310A (en) Service calling method and device
CN113301173A (en) Domain name updating system and method, message forwarding method and server
CN109558249B (en) Control method and device for concurrent operation
CN115495432A (en) Method, device and equipment for supporting multiple instances
US11308048B2 (en) Database migration method, apparatus, device, and computer-readable medium
CN113438245B (en) Information updating and message security detection method and device
CN111857548B (en) Data reading method, device and system
CN114064780A (en) Session information processing method, system, device, storage medium and electronic equipment
CN113238836A (en) Distributed content scheduling method, scheduling system and central server
CN109656672B (en) File loading method and system
CN112148740B (en) Data transmission method and device, storage medium and electronic device
CN112738181A (en) Method, device and server for cluster external IP access
CN112527323A (en) Method and device for installing Ambari and Ambari framework
CN107196841B (en) Product information management method, server, client and system
CN113791805B (en) Micro-service gray level publishing method and device
CN113553193B (en) Mirror image data auditing and distributing processing method and system
CN114676101A (en) File processing method, device, equipment and storage medium
CN108427625B (en) Method, client, server and system for sending and recording logs

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