CN115348310B - Reverse proxy method, device, system, electronic equipment and storage medium - Google Patents

Reverse proxy method, device, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN115348310B
CN115348310B CN202210987426.5A CN202210987426A CN115348310B CN 115348310 B CN115348310 B CN 115348310B CN 202210987426 A CN202210987426 A CN 202210987426A CN 115348310 B CN115348310 B CN 115348310B
Authority
CN
China
Prior art keywords
request
reverse proxy
processed
information
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210987426.5A
Other languages
Chinese (zh)
Other versions
CN115348310A (en
Inventor
贾冠一
程帅
郭雪芳
高飞
王子潇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210987426.5A priority Critical patent/CN115348310B/en
Publication of CN115348310A publication Critical patent/CN115348310A/en
Application granted granted Critical
Publication of CN115348310B publication Critical patent/CN115348310B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/2866Architectures; Arrangements
    • H04L67/2895Intermediate processing functionally located close to the data provider application, e.g. reverse proxies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a reverse proxy method, a reverse proxy device, a reverse proxy system, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: receiving a request to be processed sent by a target user through a target terminal, traversing a route configuration information base according to user information of the target user, calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base, carrying out a first reverse proxy to the reverse proxy service instance on the request to be processed, carrying out a second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning a processing result of the request to be processed. By configuring exclusive reverse proxy examples for different users and performing reverse proxy for the request to be processed twice, the routing data of different users can be separated, so that different users cannot influence each other, and the stability of the whole processing process can be improved.

Description

Reverse proxy method, device, system, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a reverse proxy method, a reverse proxy device, a reverse proxy system, an electronic device and a storage medium.
Background
With the continuous progress of internet technology, more and more users use the internet and process various services through the internet, and a large number of service requests need to be processed through the internet, so that the internet can have better performance, and in consideration of the problem of load balancing, the service requests are processed through a reverse proxy server technology in the prior art.
However, for the reverse proxy server technology in the prior art, in the process of reversely proxy the service request of the user to the original server for processing, the breakdown of a certain service request often causes the breakdown and unavailability of the whole system, and the stability of the whole processing process is poor.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure provides a reverse proxy method, apparatus, system, electronic device, and storage medium, which overcome, at least to some extent, the problem of poor stability in the reverse proxy process in the related art.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
In a first aspect, embodiments in the present disclosure provide a reverse proxy method, the method comprising:
Receiving a request to be processed sent by a target user through a target terminal, wherein the request to be processed comprises: user information of the target user;
Traversing a route configuration information base according to the user information of the target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base; when the routing configuration information processes the request for each reverse proxy service instance, the routing configuration information is configured according to the request;
And carrying out a first reverse proxy on the request to be processed to the reverse proxy service instance, carrying out a second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning a processing result of the request to be processed.
In one embodiment of the present disclosure, after receiving the pending request sent by the target user through the target terminal, the method further includes:
authenticating the user information of the target user;
if the user information authentication of the target user is passed, returning an authentication passing result;
calling a hook function based on the authentication passing result; the hook function is a function which triggers the traversal of the routing configuration information base according to the user information of the target user when the authentication passing result is detected.
In one embodiment of the present disclosure, the method further comprises:
authenticating the user information of the target user;
And if the authentication of the user information of the target user fails, returning an authentication failure result of the request to be processed, and displaying an authentication failure prompt.
In one embodiment of the present disclosure, the reverse proxy service instance includes one of the following:
Virtual cloud server, server entity, HTTP application server.
In one embodiment of the disclosure, the pending request is a multi-high performance computing HPC cluster task request; the request to be processed comprises service information to be processed, HPC cluster configuration information and application information;
the second reverse proxy is performed on the request to be processed through the reverse proxy service instance corresponding to the target user, and a processing result of the request to be processed is returned, including:
In the corresponding reverse proxy service instance of the target user, determining a routing request according to the service information to be processed, the HPC cluster configuration information and the application information; the application information is information of a target application program for processing the to-be-processed request according to the to-be-processed service information; the routing request is a request for the target application program to process the request to be processed according to the service information to be processed, and comprises information indicating a routing address for calling the target application program from the HPC cluster configuration information;
and calling the target application program to process the request to be processed according to the service information to be processed according to the routing request, and returning a processing result.
In one embodiment of the present disclosure, after traversing the routing configuration information base according to the user information of the target user, the method further includes:
If the route configuration information corresponding to the user information is not queried in the route configuration information base, a new reverse proxy service instance is generated for the target user based on the user information of the target user, the new reverse proxy service instance is called to perform second reverse proxy on the request to be processed, and a processing result of the request to be processed is returned.
In one embodiment of the present disclosure, the generating a new reverse proxy service instance for the target user based on the user information of the target user includes any one of the following manners:
establishing a new virtual cloud server as the new reverse proxy service instance in a cloud server cluster;
In the cloud server cluster, calling an idle virtual cloud server as the new reverse proxy service instance;
And configuring an HTTP application server as the new reverse proxy service instance, and establishing a corresponding relation between the user information of the target user and an HTTP identifier of the HTTP application server.
In a second aspect, embodiments in the present disclosure provide a reverse proxy apparatus, comprising:
The receiving unit is used for receiving a to-be-processed request sent by a target user through a target terminal, wherein the to-be-processed request comprises: user information of the target user;
The calling unit is used for traversing the route configuration information base according to the user information of the target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base; when the routing configuration information processes the request for each reverse proxy service instance, the routing configuration information is configured according to the request;
And the reverse proxy unit is used for performing a first reverse proxy on the to-be-processed request to the reverse proxy service instance, performing a second reverse proxy on the to-be-processed request through the reverse proxy service instance corresponding to the target user, and returning a processing result of the to-be-processed request.
In one embodiment of the present disclosure, the reverse proxy apparatus further includes:
The authentication unit is used for carrying out authentication processing on the user information of the target user;
if the user information authentication of the target user is passed, returning an authentication passing result;
calling a hook function based on the authentication passing result; the hook function is a function which triggers the traversal of the routing configuration information base according to the user information of the target user when the authentication passing result is detected.
In one embodiment of the present disclosure, the authentication unit is further configured to:
authenticating the user information of the target user;
And if the authentication of the user information of the target user fails, returning an authentication failure result of the request to be processed, and displaying an authentication failure prompt.
In one embodiment of the present disclosure, the reverse proxy unit is further configured to:
In the corresponding reverse proxy service instance of the target user, determining a routing request according to the service information to be processed, the HPC cluster configuration information and the application information; the application information is information of a target application program for processing the to-be-processed request according to the to-be-processed service information; the routing request is a request for the target application program to process the request to be processed according to the service information to be processed, and comprises information indicating a routing address for calling the target application program from the HPC cluster configuration information;
and calling the target application program to process the request to be processed according to the service information to be processed according to the routing request, and returning a processing result.
In one embodiment of the present disclosure, the reverse proxy apparatus further includes:
and the generation unit is used for generating a new reverse proxy service instance for the target user based on the user information of the target user if the route configuration information corresponding to the user information is not queried in the route configuration information base, so that the new reverse proxy service instance performs a second reverse proxy on the request to be processed, and returns a processing result of the request to be processed.
In a third aspect, embodiments of the present disclosure provide a reverse proxy system comprising: the first reverse proxy module and the second reverse proxy module;
The first reverse proxy module is used for receiving a to-be-processed request sent by a target user through a target terminal, and carrying out a first reverse proxy on the to-be-processed request to the reverse proxy service instance; the pending request includes: user information of the target user;
the second reverse proxy module is used for traversing the route configuration information base according to the user information of the target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base; when the routing configuration information processes the request for each reverse proxy service instance, the routing configuration information is configured according to the request; and
And the reverse proxy server is used for carrying out the reverse proxy for the second time on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning the processing result of the request to be processed.
In one embodiment of the present disclosure, the system further comprises an authentication module;
the authentication module is used for carrying out authentication processing on the user information of the target user, and if the user information of the target user passes the authentication, an authentication passing result is returned;
And if the authentication of the user information of the target user fails, returning an authentication failure result of the request to be processed, and displaying an authentication failure prompt.
In one embodiment of the present disclosure, the second reverse proxy module is further configured to:
in the corresponding reverse proxy service instance of the target user, determining a route request according to the service information to be processed, the HPC cluster configuration information and the application information, and performing a second reverse proxy on the route request; the application information is information of a target application program for processing the to-be-processed request according to the to-be-processed service information; the routing request is a request for the target application program to process the pending request according to the pending service information, and includes information indicating a routing address for calling the target application program from the HPC cluster configuration information.
In one embodiment of the present disclosure, the system further comprises an application engine module and an application program module;
The application engine module is used for receiving a second reverse proxy routing request of the second reverse proxy module, and calling the target application program in the application program module according to the routing request to process the request to be processed according to the service information to be processed.
In a fourth aspect, an embodiment of the present disclosure provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method described in the first aspect above via execution of the executable instructions.
In a fifth aspect, embodiments of the present disclosure provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method described in the first aspect above.
In a sixth aspect, according to another aspect of the present disclosure, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the method of any of the above.
The embodiment of the disclosure provides a reverse proxy method, a device, a system, an electronic device and a storage medium, which are used for receiving a to-be-processed request sent by a target user through a target terminal, wherein the to-be-processed request comprises: and traversing a route configuration information base according to the user information of the target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information base inquires the route configuration information corresponding to the user information, wherein when the route configuration information is used for processing the request for each reverse proxy service instance, the request to be processed is subjected to a first reverse proxy into the reverse proxy service instance according to the information of the request configuration, the request to be processed is subjected to a second reverse proxy through the reverse proxy service instance corresponding to the target user, and the processing result of the request to be processed is returned. According to the method, the request to be processed is processed through the two reverse proxy, in addition, in the process of the first reverse proxy, the request to be processed of different target users is reversely proxy to different reverse proxy service examples in the mode of traversing and inquiring the user information of the target users, isolation of the request to be processed among different target users can be effectively achieved, route data of different target users can be separated, the request to be processed is specifically processed through the second reverse proxy, and a processing result is returned. The different users cannot influence each other, and when the to-be-processed request of a certain target user is processed abnormally, other target users cannot be influenced, so that the stability of the whole processing process can be improved.
Further, when the request to be processed is a multi-high performance computing HPC cluster task request, the request to be processed includes service information to be processed, high performance computing HPC cluster configuration information and application information. In the process of the second reverse proxy, a routing request is determined according to the service information to be processed, the HPC cluster configuration information and the application information, the routing request is generated by the target user to be processed, the routing request is forwarded to an application engine module through the second reverse proxy, the target application program is called by the application engine module to process the request to be processed, the previous highly-coupled system is effectively decoupled, and the request to be processed is processed in a loose coupling mode, so that the expansion and management of the multi-high-performance computing cluster can be flexibly realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 illustrates a schematic diagram of a reverse proxy system in an embodiment of the present disclosure;
FIG. 2 illustrates a schematic diagram of another reverse proxy system in an embodiment of the present disclosure;
FIG. 3 illustrates an application scenario diagram of a reverse proxy method in an embodiment of the present disclosure;
FIG. 4 illustrates a flow diagram of a reverse proxy method in an embodiment of the present disclosure;
FIG. 5 illustrates a flow diagram of another reverse proxy method in an embodiment of the present disclosure;
FIG. 6 illustrates a timing diagram of a reverse proxy method in an embodiment of the present disclosure;
FIG. 7 illustrates a schematic diagram of a reverse proxy device in an embodiment of the present disclosure;
Fig. 8 shows a schematic structural diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Because of the proxy server technology in the prior art, in the process of reversely proxy the service request of the user to the original server for processing, the breakdown of a certain service request often causes the breakdown and unavailability of the whole system, and the stability of the whole process is poor.
Based on the above problems, the reverse proxy method of the present disclosure receives a request to be processed sent by a target user through a target terminal, where the request to be processed includes: and traversing a route configuration information base according to the user information of the target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information base inquires the route configuration information corresponding to the user information, wherein when the route configuration information is used for processing the request for each reverse proxy service instance, according to the information of the request configuration, performing a second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning a processing result of the request to be processed. According to the method, the request to be processed is processed through the two reverse proxy, in addition, in the process of the first reverse proxy, the request to be processed of different target users is reversely proxy to different reverse proxy service examples in the mode of traversing and inquiring the user information of the target users, isolation of the request to be processed among different target users can be effectively achieved, route data of different target users can be separated, the request to be processed is specifically processed through the second reverse proxy, and a processing result is returned. The different users cannot influence each other, and when the to-be-processed request of a certain target user is processed abnormally, other target users cannot be influenced, so that the stability of the whole processing process can be improved.
The reverse proxy method in the present disclosure may be applied to an electronic device, for example, a server; but also to reverse proxy systems.
Taking the example of reverse proxy approach applied to an electronic device, fig. 1 shows a schematic diagram of a reverse proxy system that may be applied to embodiments of the present disclosure.
As shown in fig. 1, the reverse proxy system 100 may include a terminal device 101, a network 102, and a server 103. The reverse proxy method described above is exemplified as being applied to the server 103.
In a possible embodiment, the user uses the terminal device 101 to issue a pending request to the server 103 via the network 102.
The server 103 receives a request to be processed sent by a target user through a target terminal, where the request to be processed includes: user information of the target user; traversing a route configuration information base according to user information of a target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base; when the route configuration information processes the request for each reverse proxy service instance, the information is configured according to the request; and carrying out the first reverse proxy on the request to be processed to a reverse proxy service instance, carrying out the second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning the processing result of the request to be processed.
The medium used by the network 102 to provide a communication link between the terminal device 101 and the server 103 may be a wired network or a wireless network.
Alternatively, the wireless network or wired network described above uses standard communication techniques and/or protocols. The network is typically the Internet, but may be any network including, but not limited to, a local area network (Local Area Network, LAN), metropolitan area network (Metropolitan Area Network, MAN), wide area network (Wide Area Network, WAN), mobile, wired or wireless network, private network, or any combination of virtual private networks. In some embodiments, data exchanged over the network is represented using techniques and/or formats including HyperText Mark-up Language (HTML), extensible markup Language (Extensible MarkupLanguage, XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as secure sockets layer (Secure Socket Layer, SSL), transport layer security (Transport Layer Security, TLS), virtual private network (Virtual Private Network, VPN), internet protocol security (Internet ProtocolSecurity, IPsec), etc. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of or in addition to the data communication techniques described above.
The terminal device 101 may be a variety of electronic devices including, but not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, wearable devices, augmented reality devices, virtual reality devices, and the like.
Alternatively, the clients of the applications installed in different terminal devices 101 are the same or clients of the same type of application based on different operating systems. The specific form of the application client may also be different based on the different terminal platforms, for example, the application client may be a mobile phone client, a PC client, etc.
The server 103 may be a server providing various services, such as a background management server providing support for devices operated by the user with the terminal apparatus 101. The background management server can analyze and process the received data such as the request and the like, and feed back the processing result to the terminal equipment.
Optionally, the server may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the disclosure is not limited herein.
Those skilled in the art will appreciate that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative, and that any number of terminal devices, networks, and servers may be provided as desired. The embodiments of the present disclosure are not limited in this regard.
Fig. 2 shows a schematic diagram of another reverse proxy system that may be applied to embodiments of the present disclosure. The reverse proxy system 200 of fig. 2, for performing the reverse proxy method described above, may be regarded as the server of fig. 1.
The user sends a pending request to the reverse proxy system 200 via the terminal device.
As shown in fig. 2, the reverse proxy system 200 includes a first reverse proxy module 201, a second reverse proxy module 202, an authentication module 203, and a user configuration module 204.
The first reverse proxy module 201 is configured to receive a pending request sent by a target user through a target terminal.
It will be appreciated that the first reverse proxy module 201 is configured to manage the entry of the reverse proxy system 200 and to send pending requests to all users via the first reverse proxy. The pending request may be a request sent by the target user through the target terminal that needs to be processed by the reverse proxy system 200.
The second reverse proxy module 202 is configured to traverse the route configuration information base according to the user information of the target user, and if the route configuration information corresponding to the user information is queried in the route configuration information base, call a reverse proxy service instance corresponding to the target user; when the route configuration information processes the request for each reverse proxy service instance, the information is configured according to the request; and carrying out the second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning the processing result of the request to be processed.
In a possible embodiment, the second reverse proxy module 202 is further configured to generate a reverse proxy service instance for the target user based on the user information of the target user if the route configuration information corresponding to the user information is not queried in the route configuration information base, so that the new reverse proxy service instance performs a second reverse proxy on the request to be processed, and returns a processing result of the request to be processed.
As can be seen from the above description, the second reverse proxy module 202 in the present disclosure performs the second reverse proxy on the request to be processed through each reverse proxy service instance specific to the target user after traversing the user information of the target user.
Therefore, when a plurality of users use the reverse proxy system at the same time, the reverse proxy system in the present disclosure can make the to-be-processed requests among different users reverse proxy through different reverse proxy service examples, so that the user data can be effectively separated, the to-be-processed requests of the users are not affected by each other, the stability of the reverse proxy system in the present disclosure is enhanced, and because the data of each different user is reverse proxy through different reverse proxy service examples, the processing result after the to-be-processed requests is finally cached in different reverse proxy service examples, and the security of the user data can be improved. And the request to be processed is processed through the two reverse proxy modules, and the further expansion and management of the reverse proxy system are facilitated by adopting a loose coupling mode.
In a possible embodiment, the authentication module 203 is configured to perform authentication processing on user information of the target user, if the user information of the target user passes authentication, return an authentication passing result, if the user information of the target user fails authentication, return an authentication failure result of the request to be processed, and display an authentication failure prompt.
After the authentication passing result is returned, the first reverse proxy module 201 calls the hook function to send an indication of traversing the route configuration information base to the second reverse proxy module 202, and the second reverse proxy module 202 starts to execute traversing the route configuration information base.
It should be noted that, the user information here may be information for characterizing the user identity, and in the authentication process, the user information of the target user needs to be authenticated, which may be an account number and a password, or may be information such as a mobile phone number or a mailbox.
Further, the authentication process in the present disclosure may also be verified by a third party.
The user configuration module 204 is configured to cache configuration file information, where the configuration file information may include application information used when processing a pending request sent by a target user, and may be used to store route configuration information, or may be used to store user information. The configuration file information in the user configuration module may be obtained through uploading by the first reverse proxy module 201, or may be directly uploaded by the user to the user configuration module 204 through the terminal device.
The reverse proxy system 100 or the reverse proxy system 200 described above may also be applied in a specific application scenario.
Fig. 3 shows a schematic diagram of an application scenario of a reverse proxy method that may be applied to embodiments of the present disclosure.
The reverse proxy system 300 of fig. 3, for performing the reverse proxy method described above, may be considered a server of fig. 1.
As shown in fig. 3, the reverse proxy system 300 includes a first reverse proxy module 301, a second reverse proxy module 302, an authentication module 303, a user configuration module 304, an application engine module 305, and an application program module 306.
The reverse proxy system of the present disclosure may be applied in high performance computing (HPC, high Performance Computing), which colloquially may also be referred to as supercomputing.
As the internet industry continues to develop, more requests need to be processed, the demand for computing is higher, and the HPC technology gradually has more application space, but the conventional HPC technology management mode generally uses a command line or terminal mode to perform configuration issuing and management of the job. The management difficulty is high, and the operation configuration is complex. Therefore, it is difficult to manage multiple HPC clusters in a unified and interface manner in the prior art. Management of multiple HPC clusters or heterogeneous HPC clusters is not easy, HPC clusters are often managed in a high-coupling mode, in this case, a crash of a certain pending request and route often causes crash and unavailability of the whole reverse proxy system, the request route of a user is not isolated, expansion of the HPC clusters and expansion of application and job management are difficult to realize, unified use and operation of HPC by management staff and user staff are not facilitated, and the use efficiency of HPC is greatly reduced; meanwhile, the high coupling code of the management system cannot realize unified management and self lateral expansion of other HPCs.
In addition, as the calculated amount of the request to be processed aiming at the HPC is far more than that of a general request to be processed in the whole operation process, the request to be processed is likely to be down, data loss or processing progress is blocked and other conditions are likely to be influenced, the processing effect of the request to be processed of other users is also likely to be influenced, the data separation of the users can be effectively realized through the reverse proxy system in the disclosure, the stability in the processing process is improved, and the processing efficiency is also improved.
The present disclosure provides a reverse proxy method, which is applied to a reverse proxy system and applied to an application scenario such as a multi-HPC cluster, and the first reverse proxy module 301 in the present disclosure may be displayed in an interface manner in the reverse proxy system 300 in the present disclosure, so as to be used for receiving a pending request and various information input by a user. In addition, the reverse proxy system 300 in the present disclosure uses a loosely coupled architecture, and the influence between different modules is small, so that the expansion and management of multiple HPC clusters can be flexibly realized, a dedicated reverse proxy service instance is configured for each user through the first reverse proxy module 302, a to-be-processed request of a target user is distributed to the second reverse proxy module 302, the to-be-processed request is reversely proxy to the application engine module 305 through the second reverse proxy module 302, and the application engine module 305 can dynamically process the to-be-processed request through the application program module 306, so that the unified interface management of different target users on different HPCs is ensured.
It should be noted that the pending request may be a multi-high performance computing cluster task request, for example, a request to schedule a job on the HPC, a request to run the HPC job and various HPC applications, and a request to manage the job on the HPC.
Specifically, the main functions of the first reverse proxy module 301 may include: invoking an authentication module 303 to authenticate and verify the identity of the target user; the to-be-processed request sent by the target user is reversely proxied to the second reverse proxy module 302; HPC management and application routing for reverse proxy target users.
It should be noted that, in the present disclosure, the first reverse proxy module 301 distributing the pending request to the second reverse proxy module 302 may also be regarded as a reverse proxy process, the second reverse proxy module 302 sending the routing request generated by the pending request to the application engine module 305 may also be regarded as a reverse proxy process, and finally, the application engine module 305 invokes the target application program in the application program module 306 to complete the job. Therefore, in the present disclosure, two times of reverse proxy are performed, and a dedicated reverse proxy instance is configured for each target user to process a request to be processed, so that not only can data between users be effectively separated and stability of a processing process be improved, but also the reverse proxy system 300 in the present disclosure adopts a loosely coupled architecture, and each module is matched for use, so that flexibility is higher, and unified management and lateral expansion for other HPCs are facilitated.
In one possible embodiment, the authentication module 303 functions the same as the authentication module 302. The user configuration module 304 may be used to save the multi-high performance computing cluster task requests sent by the target users. The service information to be processed, HPC cluster configuration information and application information sent by the target user are stored in the user configuration module 304, and when the target user wants to use the HPC cluster configuration information and application information stored last time for the second time, the target user can directly obtain the information.
User-defined HPC applications, as well as HPC clients, may be included in application modules 306. Various multi-high performance computing cluster task requests sent by the target user may be executed in response to call instructions issued by the application engine module 305.
The present exemplary embodiment will be described in detail below with reference to the accompanying drawings and examples.
First, in the embodiment of the present disclosure, a reverse proxy method is provided, and the method may be executed by any electronic device having computing processing capability, or may be executed by the reverse proxy system 200 or the reverse proxy system 300, where the following process is taken as an example by the reverse proxy system 300.
Fig. 4 shows a flowchart of a reverse proxy method in an embodiment of the present disclosure, and as shown in fig. 2, the reverse proxy method provided in the embodiment of the present disclosure includes the following steps:
S402: and receiving a request to be processed sent by the target user through the target terminal.
The pending request includes: user information of the target user.
In one possible embodiment, the pending request may be a request sent by the target user through the target terminal that requires processing by the reverse proxy system. For example, performing Matlab tasks on HPCs; the airflow over the aircraft wing is simulated over some HPC application. Or may be a task such as querying the HPC for program files of various HPC applications. The target terminal may be a terminal device such as a computer.
It should be noted that the user information of the target user may be information that characterizes that the target user has authority to use the reverse proxy system 100 in the present disclosure and is uniquely determined. For example, the account number and password at the time of the previous registration of the target user, the secret security, etc. may be a private key or the like or an identification card number or the like which is transmitted to the target user when the reverse proxy system 100 gives the target user the use authority.
S404: traversing the route configuration information base according to the user information of the target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base.
When the routing configuration information processes any one request for each reverse proxy service instance, the information configured according to any one request is obtained. It should be appreciated that when the reverse proxy service instance processes a request sent by a user, a routing request may be configured for the user's request, invoke an application program, and so on. The routing configuration information may include routing request information, a call command to call an application program, a command to start an application engine according to a request, and the like. Or the routing configuration information may also include a routing configuration file.
The reverse proxy service instance may be a virtual server in a cloud service, may be an HTTP application server, or may use a server entity as a reverse proxy service instance.
In one possible embodiment, after traversing the route configuration information base, if route configuration information corresponding to the user information is queried in the route configuration information, it is indicated that the target user may use the reverse proxy system in the disclosure before, and if a dedicated reverse proxy service instance has been configured for the target user in the previous use, then the reverse proxy service instance corresponding to the target user may be invoked according to the user information of the target user and the correspondence between the reverse proxy service instance and the user information.
Specifically, the mode of the second reverse proxy module for calling the reverse proxy service instance corresponding to the target user is any one of the following modes:
(1) And determining a virtual server with a corresponding relation with the user information of the target user as a reverse proxy service instance corresponding to the target user from the cloud server cluster based on the user information of the target user.
(2) And calling a first reverse proxy server entity with a corresponding relation with the user information of the target user as a reverse proxy service instance corresponding to the target user.
(3) And determining a HTTP (hyper text transfer protocol) identifier with a corresponding relation with the user information of the target user, determining an HTTP application server according to the HTTP identifier, and taking the HTTP application server as a reverse proxy service instance corresponding to the target user.
In another possible embodiment, if the route configuration information corresponding to the user information is not queried in the route configuration information base, the target user is stated to be based on the user information of the target user, a new reverse proxy service instance is generated for the target user, and a corresponding relationship between the new reverse proxy service instance and the user information of the target user is established, so that the new reverse proxy service instance performs a second reverse proxy on the request to be processed, and a processing result of the request to be processed is returned.
Specifically, the manner in which the second reverse proxy module constructs the new reverse proxy service instance is any one of the following:
(1) In the cloud server cluster, a new virtual cloud server is established as a new reverse proxy service instance.
(2) And calling an idle virtual cloud server as a new reverse proxy service instance in the cloud server cluster.
(3) And configuring the HTTP application server as a new reverse proxy service instance, and establishing a corresponding relation between the user information of the target user and the HTTP identifier of the HTTP application server.
S406: and carrying out the first reverse proxy on the request to be processed to a reverse proxy service instance, carrying out the second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning the processing result of the request to be processed.
In one possible embodiment, the request to be processed is reversely proxied into the original server for the second time through the reverse proxy service instance corresponding to the target user, the request to be processed is processed, and the processing result is returned.
In another possible embodiment, taking an example of how high-performance computing cluster task request is a pending request, the pending request includes pending service information, high-performance computing HPC cluster configuration information and application information. The multi-high-performance computing cluster task request is a request which needs a plurality of clusters to cooperate for processing.
In particular, the multi-high performance computing cluster task request may include several of the following: request to schedule jobs on the HPC, schedule HPC compute nodes and request to run HPC jobs and various HPC applications, and for managing jobs on the HPC in the file system.
Wherein, the job on the request dispatch HPC can be various jobs on the dispatch HPC, and the job is dispatched to inquire, modify, run and the like; requesting to run HPC jobs and various HPC applications may be calling Matlab software or requesting to run some job on Matlab software; managing jobs on the HPC may be querying jobs in a file system, modifying jobs, and so forth.
Specifically, the specific process of performing the second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user and returning the processing result of the request to be processed is as follows:
in the reverse proxy service instance corresponding to the target user, determining a routing request according to the service information to be processed, the HPC cluster configuration information and the application information, calling the target application program to process the request to be processed according to the service information to be processed according to the routing request, and returning a processing result.
The service information to be processed may be information of what task is specifically required to be executed in the request to be processed, and the service information to be processed may be changed in a program or code form. For example, the above references simulate airflow during flight of an aircraft.
The application information is information of a target application program for processing a to-be-processed request according to the to-be-processed service information, such as Matlab software mentioned in the task. Applications such as VScode, jupyter, python, java may also be included.
The routing request is a request for the target application to process the pending request according to the pending service information, and includes information indicating a routing address for invoking the target application from the HPC cluster configuration information.
The HPC cluster configuration information may be from which HPC cluster the target application that the target user is using at this time needs to call. Specifically, the HPC cluster configuration information may include hardware configuration information, software configuration information, and base configuration information, among others. The hardware configuration information may also include available areas, deployment methods, system disks, virtual private cloud (VPC, virtual Private Cloud) information, switches, file systems, and the like. For example, the HPC cluster configuration information may be Slurm, which is configuration information of the HPC cluster.
The specific target application program under which HPC cluster is used and the route address information for calling the target application program can be represented through the reverse proxy service instance corresponding to the target user, a route request is generated, the route request is forwarded to an application engine module, the application engine module can generate a call command of the target application program according to the route request, the call command for calling the target application program is sent to the application program module, and after the application program module receives the call command, the HPC task can be executed according to the service information to be processed.
In one possible embodiment, the first reverse proxy module redirects to the HPC node where the target application is located according to the pending request, directly schedules the HPC node to run HPC jobs and various HPC applications.
If the target application program used by the target user in the second-time sent pending request and the target application program used by the second-time sent pending request are the same, the first reverse proxy module may directly send the pending request to a reverse proxy service instance corresponding to the target user, directly execute the pending service information according to the target application program in the pending request of the target user, and directly return the result.
If the request to be processed is to schedule the HPC computing node to run HPC operation, for example, for airflow on a wing in the aircraft flight process, when the simulation is not completed last time and the simulation is performed again, the request to be processed can be directly processed, and a processing result is returned.
In one possible embodiment, if the request to be processed is to call the Matlab operation interface, after completing the call of the Matlab operation interface, the Matlab software is continuously used to operate the HPC job, and the job can be directly performed in the Matlab operation interface.
Illustratively, with the reverse proxy approach of the present disclosure, if user a needs to launch a Matlab task on the HPC application, it is used for large-scale model computation. User A does not need to develop locally or submit a job by using a command line, and can input a request to be processed through a first reverse proxy module in a reverse proxy system in the disclosure, wherein the request to be processed can comprise HPC cluster information to be used, for example Slurm; configuring own user information, configuring a path for calling Matlab, submitting a job in an interface of a first reverse proxy module, and completing model calculation. And the user B can configure other HPC cluster information and other application information in the first reverse proxy module of the reverse proxy system according to the self requirement, so that any conflict with A can not occur, and the HPC calculation of the user B can not be influenced because of the problem of the reverse proxy service instance of the user A.
Fig. 5 shows a flow diagram of another reverse proxy method in the present disclosure, comprising the steps of:
S502: and receiving a request to be processed sent by the target user through the target terminal.
S504: carrying out authentication processing on user information of a target user, and judging an authentication result; if the authentication passes, executing S506; if the authentication fails, S512 is executed.
S506: triggering a traversal route configuration information base through a hook function, and judging a traversal result; if the route configuration information corresponding to the user information is queried in the route configuration information base, S508 is executed; if no route configuration information corresponding to the user information is queried in the route configuration information base, S514 is executed.
S508: and calling the reverse proxy service instance corresponding to the target user based on the corresponding relation between the reverse proxy service instance and the user information.
S510: and carrying out the second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning the processing result of the request to be processed.
S512: and if the authentication of the user information of the target user fails, returning an authentication failure result of the request to be processed, and displaying an authentication failure prompt.
S514: according to the user information of the target user, a new reverse proxy service instance is generated for the target user, a corresponding relation between the new reverse proxy service instance and the user information of the target user is established, and the new reverse proxy service instance is called, so that the new reverse proxy service instance carries out second reverse proxy for the to-be-processed request.
S516: and carrying out reverse proxy on the request to be processed through the new reverse proxy service instance, and returning a processing result of the request to be processed.
FIG. 6 shows a timing diagram of a reverse proxy method, where the pending request is exemplified by an HPC cluster task request, comprising the steps of:
s602: the first reverse proxy module receives a pending request sent by a target user through a target terminal.
S604: the first reverse proxy module sends an authentication request to the authentication module to authenticate the user information of the target user.
S606: and the authentication module passes authentication of the user information of the target user and returns an authentication passing result.
S608: the first reverse proxy module indicates the second reverse proxy module to traverse the route configuration information base according to the user information of the target user through a hook function in a preset Lua programming language.
S610: and inquiring the route configuration information corresponding to the user information in the route configuration information base, and calling the reverse proxy service instance corresponding to the target user by the second reverse proxy module based on the corresponding relation between the reverse proxy service instance and the user information.
S612: the first reverse proxy module reversely proxies the pending request to the reverse proxy service instance corresponding to the target user.
The request to be processed comprises service information to be processed, HPC cluster configuration information and application information.
S614: in the reverse proxy service instance corresponding to the target user, determining a routing request according to the service information to be processed, the HPC cluster configuration information and the application information.
The routing request includes a routing request for the target application to process the pending request according to the pending service information, and includes information indicating a routing address for invoking the target application from the HPC cluster configuration information.
S616: the routing request is sent to the application engine module.
S618: the application engine module generates a call command of the target application program according to the routing request.
S620: and sending the call command of the target application program to the application program module.
S622: and the application program module calls the target application program according to the target application program call command, processes the to-be-processed request according to the to-be-processed service information, and obtains a processing result.
S624-S630: and returning a processing result.
Based on the same inventive concept, a reverse proxy device is also provided in the embodiments of the present disclosure, as in the following embodiments. Since the principle of solving the problem of the embodiment of the device is similar to that of the embodiment of the method, the implementation of the embodiment of the device can be referred to the implementation of the embodiment of the method, and the repetition is omitted.
Fig. 7 shows a schematic structural diagram of a reverse proxy device in an embodiment of the present disclosure, and as shown in fig. 7, the reverse proxy device 70 includes:
The receiving unit 701 is configured to receive a request to be processed sent by a target user through a target terminal, where the request to be processed includes: user information of the target user;
A calling unit 702, configured to traverse a route configuration information base according to user information of a target user, and if route configuration information corresponding to the user information is queried in the route configuration information base, call a reverse proxy service instance corresponding to the target user; when the route configuration information processes the request for each reverse proxy service instance, the information is configured according to the request;
And the reverse proxy unit 703 is configured to perform a first reverse proxy on the to-be-processed request to the reverse proxy service instance, perform a second reverse proxy on the to-be-processed request through the reverse proxy service instance corresponding to the target user, and return a processing result of the to-be-processed request.
In one embodiment of the present disclosure, the reverse proxy unit 703 is further configured to:
In a corresponding reverse proxy service instance of a target user, determining a routing request according to service information to be processed, HPC cluster configuration information and application information; the application information is information of a target application program for processing a request to be processed according to the service information to be processed; the routing request is a request for enabling the target application program to process the request to be processed according to the service information to be processed, and comprises information indicating a routing address for calling the target application program from the HPC cluster configuration information;
And according to the routing request, calling the target application program to process the request to be processed according to the service information to be processed, and returning a processing result.
In one embodiment of the present disclosure, reverse proxy device 70 further comprises:
And the generating unit 704 is configured to generate a new reverse proxy service instance for the target user based on the user information of the target user if the route configuration information corresponding to the user information is not queried in the route configuration information base, so that the new reverse proxy service instance performs a second reverse proxy on the request to be processed, and returns a processing result of the request to be processed.
In one embodiment of the present disclosure, reverse proxy device 70 further comprises:
The authentication unit 705 is configured to return an authentication passing result if the user information authentication of the target user passes;
calling a hook function based on the authentication passing result; the hook function is a function for triggering traversing the route configuration information base according to the user information of the target user when the authentication passing result is detected.
In one embodiment of the present disclosure, the authentication unit 705 is further configured to:
authenticating user information of a target user;
If the authentication of the user information of the target user fails, returning an authentication failure result of the request to be processed, and displaying an authentication failure prompt.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to such an embodiment of the present disclosure is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of embodiments of the present disclosure in any way.
As shown in fig. 8, the electronic device 800 is embodied in the form of a general purpose computing device. Components of electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one memory unit 820, and a bus 830 connecting the various system components, including the memory unit 820 and the processing unit 810.
Wherein the storage unit stores program code that is executable by the processing unit 810 such that the processing unit 810 performs steps according to various exemplary embodiments of the present disclosure described in the above section of the present specification. For example, the processing unit 810 may perform the following steps in the method embodiments described above, for example: receiving a request to be processed sent by a target user through a target terminal, wherein the request to be processed comprises: user information of the target user; traversing a route configuration information base according to user information of a target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base; when the route configuration information processes the request for each reverse proxy service instance, the information is configured according to the request; and carrying out the first reverse proxy on the request to be processed to a reverse proxy service instance, carrying out the second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning the processing result of the request to be processed.
The storage unit 820 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 8201 and/or cache memory 8202, and may further include Read Only Memory (ROM) 8203.
Storage unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 830 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 840 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 800, and/or any device (e.g., router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 850. Also, electronic device 800 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 over bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 800, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the reverse proxy method of any of the above.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium, which may be a readable signal medium or a readable storage medium, is also provided. On which a program product is stored which enables the implementation of the method described above of the present disclosure. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
More specific examples of the computer readable storage medium in the present disclosure may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In this disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Alternatively, the program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In particular implementations, the program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the description of the above embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (11)

1. A reverse proxy method, the method comprising:
receiving a request to be processed sent by a target user through a target terminal, wherein the request to be processed comprises: user information of the target user; the request to be processed is a multi-high performance computing HPC cluster task request; the multi-HPC cluster task request comprises service information to be processed, HPC cluster configuration information and application information;
Traversing a route configuration information base according to the user information of the target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base; when the routing configuration information processes the request for each reverse proxy service instance, the routing configuration information is configured according to the request;
Performing a first reverse proxy on the request to be processed to the reverse proxy service instance, performing a second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning a processing result of the request to be processed;
the second reverse proxy is performed on the request to be processed through the reverse proxy service instance corresponding to the target user, and a processing result of the request to be processed is returned, including:
In the corresponding reverse proxy service instance of the target user, determining a routing request according to the service information to be processed, the HPC cluster configuration information and the application information; the application information is information of a target application program for processing the to-be-processed request according to the to-be-processed service information; the routing request is a request for the target application program to process the request to be processed according to the service information to be processed, and comprises information indicating a routing address for calling the target application program from the HPC cluster configuration information;
And according to the routing request, calling the target application program to process the multi-HPC cluster task request according to the service information to be processed, and returning a processing result.
2. The reverse proxy method of claim 1, wherein after receiving a pending request sent by a target user through a target terminal, the method further comprises:
authenticating the user information of the target user;
if the user information authentication of the target user is passed, returning an authentication passing result;
calling a hook function based on the authentication passing result; the hook function is a function which triggers the traversal of the routing configuration information base according to the user information of the target user when the authentication passing result is detected.
3. The reverse proxy method of claim 1, wherein the method further comprises:
authenticating the user information of the target user;
And if the authentication of the user information of the target user fails, returning an authentication failure result of the request to be processed, and displaying an authentication failure prompt.
4. The reverse proxy method of claim 1 wherein the reverse proxy service instance comprises one of:
Virtual cloud server, server entity, HTTP application server.
5. The reverse proxy method of claim 1 wherein after traversing a routing configuration information base based on user information of the target user, the method further comprises:
If the route configuration information corresponding to the user information is not queried in the route configuration information base, a new reverse proxy service instance is generated for the target user based on the user information of the target user, so that the new reverse proxy service instance performs a second reverse proxy on the request to be processed, and a processing result of the request to be processed is returned.
6. The reverse proxy method of claim 5 wherein the generating a new reverse proxy service instance for the target user based on the user information of the target user comprises any one of:
establishing a new virtual cloud server as the new reverse proxy service instance in a cloud server cluster;
In the cloud server cluster, calling an idle virtual cloud server as the new reverse proxy service instance;
and configuring an HTTP application server as the new reverse proxy service instance, and establishing a corresponding relation between the user information of the target user and an HTTP identifier of the HTTP application server.
7. A reverse proxy device, the device comprising:
The receiving unit is used for receiving a to-be-processed request sent by a target user through a target terminal, wherein the to-be-processed request comprises: user information of the target user; the request to be processed is a multi-high performance computing HPC cluster task request; the multi-HPC cluster task request comprises service information to be processed, HPC cluster configuration information and application information;
The calling unit is used for traversing the route configuration information base according to the user information of the target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base; when the routing configuration information processes the request for each reverse proxy service instance, the routing configuration information is configured according to the request;
The reverse proxy unit is used for performing a first reverse proxy on the request to be processed to the reverse proxy service instance, performing a second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning a processing result of the request to be processed;
The reverse proxy unit is further configured to:
In the corresponding reverse proxy service instance of the target user, determining a routing request according to the service information to be processed, the HPC cluster configuration information and the application information; the application information is information of a target application program for processing the to-be-processed request according to the to-be-processed service information; the routing request is a request for the target application program to process the request to be processed according to the service information to be processed, and comprises information indicating a routing address for calling the target application program from the HPC cluster configuration information;
And according to the routing request, calling the target application program to process the multi-HPC cluster task request according to the service information to be processed, and returning a processing result.
8. A reverse proxy system, comprising: the system comprises a first reverse proxy module, a second reverse proxy module, an application engine module and an application program module;
The first reverse proxy module is used for receiving a to-be-processed request sent by a target user through a target terminal, and carrying out a first reverse proxy on the to-be-processed request to a reverse proxy service instance; the pending request includes: user information of the target user;
the second reverse proxy module is used for traversing the route configuration information base according to the user information of the target user, and calling a reverse proxy service instance corresponding to the target user if the route configuration information corresponding to the user information is queried in the route configuration information base; when the routing configuration information processes the request for each reverse proxy service instance, the routing configuration information is configured according to the request; and
The reverse proxy service instance is used for carrying out a second reverse proxy on the request to be processed through the reverse proxy service instance corresponding to the target user, and returning a processing result of the request to be processed;
the second reverse proxy module is further configured to determine, in a corresponding reverse proxy service instance of the target user, a routing request according to service information to be processed, HPC cluster configuration information, and application information; the application information is information of a target application program for processing the to-be-processed request according to the to-be-processed service information; the routing request is a request for the target application program to process the request to be processed according to the service information to be processed, and comprises information indicating a routing address for calling the target application program from the HPC cluster configuration information;
the application engine module is used for receiving a routing request of a second reverse proxy of the second reverse proxy module, calling the target application program in the application program module according to the routing request, processing a multi-HPC cluster task request according to the service information to be processed, and returning a processing result.
9. The reverse proxy system of claim 8 wherein the system further comprises an authentication module;
the authentication module is used for carrying out authentication processing on the user information of the target user, and if the user information of the target user passes the authentication, an authentication passing result is returned;
And if the authentication of the user information of the target user fails, returning an authentication failure result of the request to be processed, and displaying an authentication failure prompt.
10. An electronic device, comprising:
A processor; and
A memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any one of claims 1-6 via execution of the executable instructions.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1-6.
CN202210987426.5A 2022-08-17 2022-08-17 Reverse proxy method, device, system, electronic equipment and storage medium Active CN115348310B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210987426.5A CN115348310B (en) 2022-08-17 2022-08-17 Reverse proxy method, device, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210987426.5A CN115348310B (en) 2022-08-17 2022-08-17 Reverse proxy method, device, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115348310A CN115348310A (en) 2022-11-15
CN115348310B true CN115348310B (en) 2024-06-07

Family

ID=83951835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210987426.5A Active CN115348310B (en) 2022-08-17 2022-08-17 Reverse proxy method, device, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115348310B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218368A (en) * 2017-07-05 2019-01-15 北京京东尚科信息技术有限公司 Realize method, apparatus, electronic equipment and the readable medium of Http reverse proxy
CN110445850A (en) * 2019-07-24 2019-11-12 深圳壹账通智能科技有限公司 Block chain node access method and device, storage medium, electronic equipment
CN113765988A (en) * 2021-02-26 2021-12-07 北京沃东天骏信息技术有限公司 Information processing method, information processing device, electronic equipment and storage medium
WO2022002209A1 (en) * 2020-07-01 2022-01-06 中兴通讯股份有限公司 Data transmission method, proxy server, storage medium, and electronic device
CN113992748A (en) * 2021-09-18 2022-01-28 上海泛宥信息科技有限公司 Reverse proxy method, system, medium, and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218368A (en) * 2017-07-05 2019-01-15 北京京东尚科信息技术有限公司 Realize method, apparatus, electronic equipment and the readable medium of Http reverse proxy
CN110445850A (en) * 2019-07-24 2019-11-12 深圳壹账通智能科技有限公司 Block chain node access method and device, storage medium, electronic equipment
WO2022002209A1 (en) * 2020-07-01 2022-01-06 中兴通讯股份有限公司 Data transmission method, proxy server, storage medium, and electronic device
CN113765988A (en) * 2021-02-26 2021-12-07 北京沃东天骏信息技术有限公司 Information processing method, information processing device, electronic equipment and storage medium
CN113992748A (en) * 2021-09-18 2022-01-28 上海泛宥信息科技有限公司 Reverse proxy method, system, medium, and terminal

Also Published As

Publication number Publication date
CN115348310A (en) 2022-11-15

Similar Documents

Publication Publication Date Title
CN112035215B (en) Node autonomous method, system and device of node cluster and electronic equipment
US9489227B2 (en) Apparatus and method for virtual desktop service
US8046441B2 (en) Business to business integration software as a service
EP3479249B1 (en) Technologies for managing application configurations and associated credentials
US20080141350A1 (en) Authentication for computer system management
US11470160B2 (en) Managing remote support
CN110489192B (en) Remote communication method and device and electronic equipment
CN112039826A (en) Login method and device applied to applet terminal
CN110275787B (en) Online platform data transmission method, device, medium and electronic equipment
CN113364795B (en) Data transmission method and proxy server
EP4350556A1 (en) Information verification method and apparatus
CN111970240A (en) Cluster receiving and managing method and device and electronic equipment
CN113821352A (en) Remote service calling method and device
CN114416169A (en) Data processing method, medium, device and computing equipment based on micro front end
US20130007094A1 (en) Client server communication system
WO2024045646A1 (en) Method, apparatus and system for managing cluster access permission
CN115348310B (en) Reverse proxy method, device, system, electronic equipment and storage medium
CN110545320A (en) Intranet data interaction method and equipment
WO2022188509A1 (en) Method and apparatus for task processing in distributed environment, and electronic device and medium
US20220244976A1 (en) Containers on demand
CN110765445B (en) Method and device for processing request
CN112929453A (en) Method and device for sharing session data
WO2024022400A1 (en) Cloud resource configuration method and related device
CN112583614B (en) Host cluster management method, device and computer readable medium
US20240103990A1 (en) Computing device with bridge to native app for security and resiliency

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant