Client request processing method and device, equipment and storage medium
By using the reverse proxy in a distributed search analysis engine to determine the target coordination node and process the client request, the client needs to restart the problem of the configuration information to take effect, and improve the convenience and efficiency of the request processing.
Patent Information
- Application Number
- CN202411407713.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-28
AI Technical Summary
In a distributed search analysis engine, the client needs to synchronize the configuration information to facilitate request processing, resulting in poor convenience in request processing and may need to restart the client to make the configuration information take effect.
Through the reverse proxy, the target coordination node is determined from multiple preset nodes based on the domain name of the client, and the request information is sent to the node to obtain the feedback information. Finally, the feedback information is sent to the client.
This method enhances the convenience of the distributed search analysis engine for client requests, avoids the needs of client restart, and improves the efficiency of request processing.
Smart Images

Figure CN119377468A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a client request processing method, device, equipment and storage medium. Background Art
[0002] In the related art, the client's request information is generally processed through a distributed search and analysis engine. The distributed search and analysis engine has the ability to search and analyze data. Among them, the distributed search and analysis engine can include an Elasticsearch (ES) cluster, which is not limited here.
[0003] However, in the process of processing the client's request information through the distributed search analysis engine, if the configuration information of the distributed search analysis engine, such as the address of the coordination node in the distributed search analysis engine, changes, all clients served by the distributed search analysis engine need to synchronously change the configuration information of the distributed search analysis engine. Accordingly, in the case where the client changes the configuration information of the distributed search analysis engine, it is easy to need to restart the client to make the changed configuration information take effect before the distributed search analysis engine can process the client's request information, which easily leads to poor convenience of the distributed search analysis engine in processing the client's request. Summary of the invention
[0004] The main purpose of this application is to provide a client request processing method, device, equipment and storage medium, aiming to improve the convenience of distributed search analysis engine in processing client requests.
[0005] In a first aspect, the present application provides a method for processing a request of a client, the method being used in a reverse proxy, the method comprising:
[0006] When the request information of the client is obtained, a target coordination node is determined from a plurality of preset coordination nodes included in the distributed search analysis engine according to the domain name of the client;
[0007] Sending the request information to the target coordination node to obtain target feedback information corresponding to the request information through the target coordination node;
[0008] The target feedback information is sent to the client.
[0009] In a second aspect, the present application further provides a request processing device of a client, the request processing device comprising:
[0010] A node determination module is used to determine a target coordination node from a plurality of preset coordination nodes included in the distributed search analysis engine according to the domain name of the client when the request information of the client is obtained;
[0011] A request sending module, used for sending the request information to the target coordination node, so as to obtain target feedback information corresponding to the request information through the target coordination node;
[0012] A feedback module is used to send the target feedback information to the client.
[0013] In a third aspect, the present application further provides a computer device, the computer device comprising a reverse proxy, a memory and a processor;
[0014] The memory is used to store computer programs;
[0015] The processor is used to execute the computer program and implement the steps of the client request processing method as described above when executing the computer program.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the client request processing method as described above are implemented.
[0017] The present application provides a client request processing method, device, equipment and storage medium. The client request processing method is used for a reverse proxy, and the method includes: when obtaining the client's request information, according to the client's domain name, determining the target coordination node from multiple preset coordination nodes included in the distributed search analysis engine; sending the request information to the target coordination node to obtain the target feedback information corresponding to the request information through the target coordination node; sending the target feedback information to the client to improve the convenience of the distributed search analysis engine to process the client's request. For example, in the case of reverse proxying the distributed search analysis engine through a reverse proxy, if the configuration information of the distributed search engine needs to be changed, it is only necessary to configure and manage the distributed search analysis engine through the reverse proxy, without changing the configuration information of the distributed search analysis engine through the client. Accordingly, when the configuration information of the distributed search analysis engine is changed through the reverse proxy, the changed configuration information can take effect, and there is no need to restart the client to make the configuration information of the distributed search analysis engine take effect, which is conducive to improving the convenience of the distributed search analysis engine to process the client's request. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 It is a flowchart of a client request processing method provided in an embodiment of the present application;
[0020] Figure 2 It is a schematic diagram of request processing of a client involved in the related technology;
[0021] Figure 3 It is a schematic diagram of request processing of a client involved in an embodiment of the present application;
[0022] Figure 4 is a schematic block diagram of a request processing device of a client provided in an embodiment of the present application;
[0023] Figure 5 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0026] The embodiments of the present application provide a method, apparatus, device and storage medium for request processing of a client. Among them, the request processing method of the client can be applied to a reverse proxy, which can be set on a computer device. The computer device can be a tablet computer, a laptop computer, a desktop computer and other devices. The reverse proxy can also be set in a server, which can be a separate server or a server cluster, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0027] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0028] See also Figure 1 , Figure 1 It is a flowchart of a client request processing method provided by an embodiment of the present application. It should be noted that the client request processing method provided by the embodiment of the present application can be used for a reverse proxy. The reverse proxy can be set on a computer device or on a server. For example, the reverse proxy is deployed in a network infrastructure as an independent hardware device or part of a cloud service. For another example, the reverse proxy can be mounted on a computer device or a server. This is not limited here.
[0029] In specific implementation, the computer device includes but is not limited to: any one of a tablet computer, a laptop computer, and a desktop computer; the server can be a single server or a server cluster, or a cloud server that provides cloud computing services.
[0030] See also Figure 2 , Figure 2 It is a schematic diagram of client request processing involved in the related technology.
[0031] like Figure 2 As shown, when the client initiates the corresponding request information, the client will send the request information to the corresponding preset coordination node of the distributed search analysis engine, so as to determine the target feedback information corresponding to the request information through the preset coordination node. Based on this, when the relevant configuration information of the distributed search analysis engine changes, the client needs to change the configuration information synchronously. Accordingly, the client may need to be restarted for the changed configuration information to take effect, which may easily lead to poor convenience in the processing of request information by the distributed search analysis engine. Accordingly, different clients may have different processing capabilities for request information. For example, if there is a client that does not have load balancing capabilities, timeout management capabilities, node detection capabilities, etc., it is easy to cause the client to have uneven access to different preset coordination nodes in the distributed search analysis engine, which may easily lead to poor efficiency in processing request information by the distributed search analysis engine.
[0032] Based on this, the client request processing method provided in the embodiment of the present application can improve the convenience and efficiency of the distributed search analysis engine in processing request information.
[0033] like Figure 1 As shown, the client request processing method includes steps S101 to S103.
[0034] Step S101: When the request information of the client is obtained, a target coordination node is determined from a plurality of preset coordination nodes included in the distributed search analysis engine according to the domain name of the client.
[0035] Exemplarily, the reverse proxy may include a server load balancer (SLB), Nginx, or other device that can perform reverse proxy.
[0036] In some embodiments, the client may initiate a request message. The request message may include a search request, a bulk request, and the like, which are not limited here. The reverse proxy may receive the request message initiated by the client, and in response to the request message of the client, perform a reverse proxy on the distributed search analysis engine. For example, when the reverse proxy performs a reverse proxy on the distributed search analysis engine, it may route the client's request message to at least one of the multiple preset coordination nodes included in the distributed search analysis engine.
[0037] For example, the reverse proxy may determine a target coordination node from a plurality of preset coordination nodes in response to the acquired request information of the client according to the domain name of the client. The number of the target coordination nodes may include at least one, which is not limited here.
[0038] When a reverse proxy is used to reverse proxy a distributed search and analysis engine, the reverse proxy can perform configuration management on the distributed search and analysis engine. The reverse proxy can manage the addresses of preset coordination nodes, data nodes, and other nodes, and the reverse proxy can also add and / or remove nodes to adjust the distributed search and analysis engine's service capabilities to the client. Accordingly, the reverse proxy can have hot deployment capabilities, so when the reverse proxy makes configuration modifications to the distributed search and analysis engine, the client will not perceive the configuration modifications of the distributed search and analysis engine, and supports the distributed search and analysis engine to smoothly switch to the modified configuration information. Among them, the various nodes included in the distributed search and analysis engine can be virtualized into a virtual service pool, which has high performance and high availability.
[0039] In some embodiments, the reverse proxy can pre-configure domain names for multiple preset coordination nodes included in the distributed search analysis engine. A preset coordination node can be configured with a domain name. The domain names of different preset coordination nodes can be the same or different. Based on this, the reverse proxy can determine the association between the preset domain name and the preset coordination node. Accordingly, the reverse proxy can determine the target coordination node from multiple preset coordination nodes based on the association between the preset domain name and the preset coordination node. The target coordination node can be used to receive, forward and process client request information.
[0040] For example, based on the association between a preset domain name and a preset coordination node, an intermediate coordination node is determined from multiple preset coordination nodes included in the distributed search analysis engine according to the client's domain name; based on the load balancing strategy, a target coordination node is determined from the intermediate coordination nodes.
[0041] Take the preset coordination nodes including coordination nodes 1 to 5 as an example. The domain name corresponding to each of coordination nodes 1 to 3 is a public domain name, and the public domain name corresponds to external services. Then coordination nodes 1 to 3 can provide external services for distributed search analysis engines. The domain name corresponding to each of coordination nodes 4 to 5 is an intranet domain name, and the intranet domain name corresponds to a local area network. Then coordination nodes 4 to 5 can provide local area network usage services for distributed search engines. Of course, the domain name is not limited to this. For example, the domain name can also include an office network domain name, a production domain name, etc., which are not limited here.
[0042] When the reverse proxy obtains the request information of the client, it can determine the intermediate coordination node from multiple preset coordination nodes based on the domain name of the client and the association between the preset domain name and the preset coordination node. Among them, the domain name corresponding to the intermediate coordination node matches the domain name of the client. For example, when the domain name of the client is an external network domain name, the reverse proxy can determine that coordination node 1 to coordination node 3 are intermediate coordination nodes from coordination node 1 to coordination node 5.
[0043] When determining the intermediate coordination node, the reverse proxy can determine the target coordination node from the intermediate coordination nodes based on the load balancing strategy. For example, the reverse proxy can determine the target coordination node from the intermediate coordination nodes based on load balancing strategies such as a polling algorithm, a minimum number of connections algorithm, an IP Hash algorithm, a random algorithm, etc. For example, the reverse proxy can assign the acquired client request information to one of the intermediate coordination nodes in turn in order according to the polling algorithm. Accordingly, the reverse proxy can determine the intermediate coordination node currently assigned to the request information as the target coordination node. For another example, the reverse proxy can perform a hash calculation on the address of the client, such as an IP address, to obtain a corresponding hash result. When the hash result corresponds to one of the intermediate coordination nodes, the reverse proxy can determine the intermediate coordination node as the target coordination node. Of course, it is not limited to this and is not limited here.
[0044] In this way, when the client's request information is obtained, the target coordination node is determined from the multiple preset coordination nodes included in the distributed search analysis engine according to the client's domain name. Then, the preset coordination nodes that process the request information of different clients can be divided according to the different domain names of the clients to obtain the target coordination node, which is conducive to improving the convenience of the reverse proxy in determining the target coordination node. The target coordination node can be used for subsequent reception, forwarding and processing of the client's request information, which is conducive to subsequent improvement of the convenience of the distributed search analysis engine in processing the client's request. Accordingly, when the reverse proxy determines the target coordination node based on the load balancing strategy, when the request information is subsequently processed through the target coordination node, the access volume between different preset coordination nodes can be balanced, which is conducive to improving the efficiency of the distributed search analysis engine in processing client requests.
[0045] Exemplarily, the reverse proxy may detect the node status of each node included in the distributed search analysis engine.
[0046] In some implementations, the node status of the intermediate coordination nodes is obtained; the intermediate coordination nodes whose node status is in an abnormal state are isolated, and the intermediate coordination nodes whose node status is in a normal state are retained.
[0047] For example, after determining the intermediate coordination node, the reverse proxy can detect the node status of the intermediate coordination node. In the case of detecting that there is an intermediate coordination node whose node status is in an abnormal state, the reverse proxy can isolate the intermediate coordination node whose node status is in an abnormal state to prevent the intermediate coordination node whose node status is in an abnormal state from interfering with the subsequent distributed search analysis engine's reception, forwarding and processing of client request information. Accordingly, in the case of detecting that there is an intermediate coordination node whose node status is in a normal state, the reverse proxy can retain the intermediate coordination node whose node status is in a normal state for subsequent selection of the target coordination node from the intermediate coordination node whose node status is in a normal state.
[0048] In some implementations, based on a load balancing strategy, a target coordination node is determined from intermediate coordination nodes whose node status is in a normal state.
[0049] For example, when detecting the intermediate coordination nodes and determining the intermediate coordination nodes whose node status is in a normal state, the reverse proxy can screen the intermediate coordination nodes whose node status is in a normal state according to the load balancing strategy to obtain the target coordination node. The load balancing strategy may include a polling algorithm, a minimum number of connections algorithm, an IP hash algorithm, a random algorithm, etc., which are not limited here.
[0050] In this way, the reverse proxy detects the node status of the intermediate coordination node to select the target coordination node from the intermediate coordination nodes whose node status is in a normal state. The subsequent reverse proxy can receive, forward and process the client's request information accordingly based on the target coordination node in the normal state, which is conducive to improving the reverse proxy's control convenience over the distributed search analysis engine, and improving the distributed search analysis engine's request processing effect on the client.
[0051] Exemplarily, when the client's request information is reverse proxied through a reverse proxy, the reverse proxy can perform corresponding management and control on the client's data request authority to prevent unfamiliar and illegal clients from illegally accessing the distributed search analysis engine.
[0052] In some implementations, the reverse proxy may be configured with a domain name whitelist for the distributed search analysis engine. The domain name whitelist may include a domain name of at least one client that is allowed to access the distributed search analysis engine.
[0053] For example, when the client's request information is obtained and the client's domain name is in the domain name whitelist corresponding to the reverse proxy, the target coordination node is determined from multiple preset coordination nodes included in the distributed search analysis engine based on the client's domain name.
[0054] When the client's request information is obtained, the reverse proxy can determine whether the client's domain name is in the domain name whitelist. If the client's domain name is in the domain name whitelist, the reverse proxy can determine that the client has the authority to access the distributed search analysis engine. If the client's domain name is not in the domain name whitelist, the reverse proxy can determine that the client does not have the authority to access the distributed search analysis engine.
[0055] In an exemplary embodiment, the reverse proxy can perform reverse proxy for multiple distributed search and analysis engines. For example, the reverse proxy can set up a part of the distributed search and analysis engines to process local area network usage services, and the domain names in the domain name whitelist set by the reverse proxy for one part of the distributed search and analysis engines can include intranet domain names. For example, the reverse proxy can set up another part of the distributed search and analysis engines to process external services, and the domain names in the domain name whitelist set by the reverse proxy for another part of the distributed search and analysis engines can include public network domain names. Of course, it is not limited to this. For example, the reverse proxy can set up another part of the distributed search and analysis engines to be compatible with processing local area network usage services and external services, and the domain names in the domain name whitelist can include both intranet domain names and public network domain names, which are not limited here.
[0056] Based on this, when the reverse proxy determines that the client has access to the corresponding distributed search and analysis engine based on the domain name whitelist, it can further determine the target coordination node from the distributed search and analysis engine based on the client's domain name, so that the client's request information can be subsequently received, forwarded, processed, and so on through the target coordination node.
[0057] In some implementations, the reverse proxy may be configured with an address blacklist for the distributed search analysis engine. The address blacklist may include the address of at least one client that is not allowed to access the distributed search analysis engine.
[0058] For example, when the client's request information is obtained and the client's address is not in the address blacklist corresponding to the reverse proxy, the target coordination node is determined from multiple preset coordination nodes included in the distributed search analysis engine based on the client's domain name.
[0059] When the client's request information is obtained, the reverse proxy can obtain the client's address, such as the IP address, IP network segment, etc. The reverse proxy can determine whether the client's address is in the address blacklist. If the client's address is not in the address blacklist, the reverse proxy can determine that the client has permission to access the distributed search analysis engine. If the client's address is in the address blacklist, the reverse proxy can determine that the client does not have permission to access the distributed search analysis engine.
[0060] In an exemplary embodiment, when the reverse proxy needs to restrict a certain network segment from accessing the distributed search analysis engine, the reverse proxy can add the network segment to the address blacklist. Correspondingly, when the reverse proxy needs to remove another network segment's access restriction to the distributed search analysis engine, the reverse proxy can remove the network segment from the address blacklist.
[0061] Based on this, when the reverse proxy determines that the client has access to the corresponding distributed search and analysis engine based on the address blacklist, it can further determine the target coordination node from the distributed search and analysis engine based on the client's domain name, so that the client's request information can be subsequently received, forwarded, processed, and so on through the target coordination node.
[0062] In this way, the reverse proxy can control the access rights of different clients to the distributed search analysis engine by setting at least one of the domain name whitelist and address blacklist, which is conducive to improving the convenience of access control to the distributed search analysis engine. Correspondingly, it is conducive to improving the security of the distributed search analysis engine.
[0063] Exemplarily, the reverse proxy may obtain the client's request information through a preset domain name system.
[0064] In some implementations, a request message sent by a preset domain name system to a reverse proxy based on a virtual service address of the reverse proxy is obtained; wherein the virtual service address is obtained according to the domain name of the client.
[0065] For example, when the reverse proxy performs reverse proxy for the distributed search analysis engine, the reverse proxy may be provided with a virtual service address, which may be used as an entry point for the client to access the reverse proxy.
[0066] like Figure 3 As shown, when the client initiates the corresponding request information, the domain name system can respond to the detected request information of the client and resolve the domain name of the client to map it to the virtual service address of the reverse proxy. Accordingly, the domain name system can send the client's request information to the reverse proxy based on the virtual service address of the reverse proxy, and the reverse proxy can obtain the client's request information.
[0067] In this way, sending the client's request information to the reverse proxy through the domain name system according to the virtual service address of the reverse proxy is conducive to improving the convenience of the reverse proxy in obtaining the client's request information.
[0068] In some embodiments, the association between the virtual service address of the reverse proxy and the domain name of the client is determined based on the business access information corresponding to the reverse proxy, so that the domain name system determines the virtual service address of the reverse proxy based on the association between the virtual service address of the reverse proxy and the domain name of the client and the domain name of the client corresponding to the request information.
[0069] For example, the business access information may include at least one of the business type and access source of the reverse proxy. In the case where the reverse proxy can provide reverse proxy services for different clients, the business types corresponding to the request information of different clients may be different, and the reverse proxy can cover different types of business. Correspondingly, the domain names and addresses of different clients may also be different, and the reverse proxy can cover different access sources. Based on this, the reverse proxy can determine the clients that the reverse proxy can serve based on the business access information. The reverse proxy can determine the association between the virtual service address of the reverse proxy and the domain name of the client based on the domain name of the client and the virtual service address of the reverse proxy. In the case where the reverse proxy can provide reverse proxy services to different clients, the virtual service address of the reverse proxy can be associated with the domain names of different clients respectively.
[0070] In the case of determining the association between the virtual service address of the reverse proxy and the domain name of the client, the reverse proxy can send the association between the virtual service address of the reverse proxy and the domain name of the client to the domain name system. Accordingly, in the case of detecting the request information initiated by the client, the domain name system can determine the virtual service address of the reverse proxy based on the association between the virtual service address of the reverse proxy and the domain name of the client, combined with the domain name of the client corresponding to the request information, and then the domain name system can send the request information to the reverse proxy based on the virtual service address of the reverse proxy, so that the reverse proxy can obtain the request information of the client.
[0071] In this way, the reverse proxy can determine the association between the virtual service address of the reverse proxy and the domain name of the client based on the business access information, which is conducive to improving the convenience of determining the association between the virtual service address of the reverse proxy and the domain name of the client. Correspondingly, the association between the virtual service address of the reverse proxy and the domain name of the client can be used by the domain name system to determine the virtual service address of the reverse proxy when detecting the request information initiated by the client, so as to send the request information to the reverse proxy later, which is conducive to improving the convenience of the domain name system forwarding the request information of the client, thereby improving the convenience of the reverse proxy obtaining the request information of the client.
[0072] Step S102: Send the request information to the target coordination node to obtain target feedback information corresponding to the request information through the target coordination node.
[0073] For example, when the reverse proxy determines the target coordination node, it can determine that it needs to obtain the target feedback information corresponding to the client's request information through the target coordination node, and the reverse proxy can send the client's request information to the target coordination node. Correspondingly, when the target coordination node obtains the request information sent by the reverse proxy, it can determine the target feedback information corresponding to the request information.
[0074] In some embodiments, the request information is forwarded to the corresponding data node in the distributed search analysis engine through the target coordination node, so that the data node executes the data operation corresponding to the request information and obtains the preset feedback information; through the target coordination node, all the preset feedback information is merged and processed to obtain the corresponding target feedback information; through the target coordination node, the target feedback information is sent to the reverse proxy.
[0075] like Figure 3As shown, the distributed search analysis engine may include a preset coordination node and a data node. The data node may be used to store data. The distributed search analysis engine may also include a master node, which is not limited here. When the reverse proxy determines the target coordination node from multiple preset coordination nodes and sends the client's request information to the target coordination node, the target coordination node may forward the request information to the corresponding data node. When the data node receives the request information, it may perform a data operation corresponding to the request information in the storage space where the data node is located to obtain feedback information. Among them, the target coordination node may forward the request information to multiple data nodes, and the multiple data nodes may feedback the corresponding multiple preset feedback information to the target coordination node. Based on this, when the target coordination node obtains all the preset feedback information fed back by the corresponding data node, the target coordination node may merge all the preset feedback information. For example, the target coordination node may reduce and merge all the preset feedback information to obtain the corresponding target feedback information. Accordingly, the target coordination node may send the target feedback information to the reverse proxy so that the reverse proxy feeds back the target feedback information to the client.
[0076] In this way, when the reverse proxy sends the request information to the target coordination node, the target coordination node can feed back the target feedback information corresponding to the request information to the reverse proxy, which is conducive to improving the convenience of the reverse proxy in determining the target feedback information.
[0077] Step S103: Send target feedback information to the client.
[0078] For example, when the reverse proxy receives the target feedback information fed back by the target coordination node, the reverse proxy may send the target feedback information to the client to respond to the client's request.
[0079] The client request processing method provided in the above embodiment is used for a reverse proxy. When the client's request information is obtained, the target coordination node is determined from the multiple preset coordination nodes included in the distributed search analysis engine according to the domain name of the client; the request information is sent to the target coordination node to obtain the target feedback information corresponding to the request information through the target coordination node; the target feedback information is sent to the client to improve the convenience of the distributed search analysis engine in processing requests for the client. For example, in the case of reverse proxying a distributed search analysis engine through a reverse proxy, if the configuration information of the distributed search engine needs to be changed, it is only necessary to configure and manage the distributed search analysis engine through the reverse proxy, without changing the configuration information of the distributed search analysis engine through the client. Accordingly, when the configuration information of the distributed search analysis engine is changed through the reverse proxy, the changed configuration information can take effect without restarting the client to make the configuration information of the distributed search analysis engine take effect, which is conducive to improving the convenience of the distributed search analysis engine in processing requests for the client.
[0080] See also Figure 4 , Figure 4 This is a schematic block diagram of a client request processing device provided in an embodiment of the present application. The request processing device can be configured in a server to execute the client request processing method described above.
[0081] like Figure 4 As shown, the request processing device includes: a node determination module 110 , a request sending module 120 and a feedback module 130 .
[0082] The node determination module 110 is used to determine a target coordination node from a plurality of preset coordination nodes included in the distributed search analysis engine according to the domain name of the client when the request information of the client is obtained.
[0083] The request sending module 120 is used to send the request information to the target coordination node, so as to obtain target feedback information corresponding to the request information through the target coordination node.
[0084] The feedback module 130 is configured to send the target feedback information to the client.
[0085] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0086] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0087] Exemplarily, the above method and apparatus may be implemented in the form of a computer program, which may be run on a computer device.
[0088] See also Figure 5 , Figure 5 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server or an electronic device.
[0089] like Figure 5 As shown, the computer device includes a reverse proxy, a processor, a memory and a network interface connected through a system bus, wherein the memory may include a storage medium and an internal memory.
[0090] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any client request processing method.
[0091] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0092] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any client request processing method.
[0093] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0094] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0095] In one embodiment, the processor is used to execute a computer program and implement the following steps when executing the computer program:
[0096] When the request information of the client is obtained, a target coordination node is determined from a plurality of preset coordination nodes included in the distributed search analysis engine according to the domain name of the client;
[0097] Sending the request information to the target coordination node to obtain target feedback information corresponding to the request information through the target coordination node;
[0098] The target feedback information is sent to the client.
[0099] It should be noted that technical personnel in the relevant field can clearly understand that, for the convenience and brevity of description, the specific working process of the client request processing described above can refer to the corresponding process in the aforementioned client request processing method embodiment, and will not be repeated here.
[0100] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The method implemented when the computer program is executed by a processor can refer to the various embodiments of the request processing method of the client of the present application.
[0101] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0102] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0103] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0104] It should also be understood that the non-Company software tools or components appearing in the embodiments of the present application are merely examples and do not represent actual use.
[0105] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A client request processing method, characterized in that: The method is used for a reverse proxy, and the method comprises: When the request information of the client is obtained, a target coordination node is determined from a plurality of preset coordination nodes included in the distributed search analysis engine according to the domain name of the client; Sending the request information to the target coordination node to obtain target feedback information corresponding to the request information through the target coordination node; The target feedback information is sent to the client.
2. The request processing method according to claim 1, characterized in that: Determining the target coordination node from a plurality of preset coordination nodes included in the distributed search analysis engine according to the domain name of the client includes: Based on the association relationship between the preset domain name and the preset coordination node, according to the domain name of the client, determine the intermediate coordination node from the plurality of preset coordination nodes included in the distributed search analysis engine; Based on the load balancing strategy, a target coordination node is determined from the intermediate coordination nodes.
3. The request processing method according to claim 2, characterized in that: Before determining the target coordination node from the intermediate coordination nodes based on the load balancing strategy, the method further includes: Obtaining the node status of the intermediate coordination node; Isolate the intermediate coordination nodes whose node status is in an abnormal state, and retain the intermediate coordination nodes whose node status is in a normal state; The step of determining the target coordination node from the intermediate coordination nodes based on the load balancing strategy includes: Based on the load balancing strategy, the target coordination node is determined from the intermediate coordination nodes whose node status is in a normal state.
4. The request processing method according to claim 1, characterized in that: When the request information of the client is obtained, a target coordination node is determined from a plurality of preset coordination nodes included in the distributed search analysis engine according to the domain name of the client, including at least one of the following: When the request information of the client is obtained and the domain name of the client is in the domain name whitelist corresponding to the reverse proxy, a target coordination node is determined from a plurality of preset coordination nodes included in the distributed search analysis engine according to the domain name of the client; When the request information of the client is obtained and the address of the client is not in the address blacklist corresponding to the reverse proxy, the target coordination node is determined from multiple preset coordination nodes included in the distributed search analysis engine according to the domain name of the client.
5. The request processing method according to any one of claims 1 to 4, characterized in that: The obtaining the request information of the client includes: Obtain request information sent by a preset domain name system to the reverse proxy based on the virtual service address of the reverse proxy; wherein the virtual service address is obtained according to the domain name of the client.
6. The request processing method according to claim 5, characterized in that: Before obtaining the request information sent by the preset domain name system to the reverse proxy based on the virtual service address of the reverse proxy, the method further includes: According to the business access information corresponding to the reverse proxy, the association relationship between the virtual service address of the reverse proxy and the domain name of the client is determined, so that the domain name system determines the virtual service address of the reverse proxy according to the association relationship between the virtual service address of the reverse proxy and the domain name of the client and the domain name of the client corresponding to the request information.
7. The request processing method according to any one of claims 1 to 4, characterized in that: The acquiring, through the target coordination node, target feedback information corresponding to the request information includes: Forwarding the request information to a corresponding data node in the distributed search analysis engine through the target coordination node, so that the data node performs a data operation corresponding to the request information and obtains preset feedback information; Through the target coordination node, all the preset feedback information are merged and processed to obtain corresponding target feedback information; The target feedback information is sent to the reverse proxy through the target coordination node.
8. A client request processing device, characterized in that: The request processing device comprises: A node determination module, for determining a target coordination node from a plurality of preset coordination nodes included in a distributed search analysis engine according to a domain name of the client when request information of the client is obtained; A request sending module, used for sending the request information to the target coordination node, so as to obtain target feedback information corresponding to the request information through the target coordination node; A feedback module is used to send the target feedback information to the client.
9. A computer device, characterized in that: The computer device includes a reverse proxy, a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the client request processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the client request processing method according to any one of claims 1 to 7 are implemented.