CN113923204A - Request forwarding method, device, equipment and readable storage medium - Google Patents

Request forwarding method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN113923204A
CN113923204A CN202111277174.9A CN202111277174A CN113923204A CN 113923204 A CN113923204 A CN 113923204A CN 202111277174 A CN202111277174 A CN 202111277174A CN 113923204 A CN113923204 A CN 113923204A
Authority
CN
China
Prior art keywords
request
forwarding
forwarded
micro
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111277174.9A
Other languages
Chinese (zh)
Inventor
戴裕文
曹义红
陈明哲
许丹昊
杨建明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN SECURITIES INFORMATION CO Ltd
Original Assignee
SHENZHEN SECURITIES INFORMATION CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN SECURITIES INFORMATION CO Ltd filed Critical SHENZHEN SECURITIES INFORMATION CO Ltd
Priority to CN202111277174.9A priority Critical patent/CN113923204A/en
Publication of CN113923204A publication Critical patent/CN113923204A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a request forwarding method, which comprises the following steps: when a request to be forwarded is monitored, acquiring a forwarding direction corresponding to the request to be forwarded; judging whether the forwarding direction is from the local server to the kubernets cluster or not; if yes, forwarding the request to be forwarded to a proxy server in the kubernetes cluster; and analyzing the request to be forwarded by using the proxy server to obtain a first micro service, and forwarding the request to be forwarded to the first micro service. The request forwarding method provided by the invention greatly saves system resources, simplifies the request forwarding process and reduces the cost. The invention also discloses a request forwarding device, equipment and a storage medium, and has corresponding technical effects.

Description

Request forwarding method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a request forwarding method, apparatus, device, and computer readable storage medium.
Background
The Internet enterprise information system comprises a plurality of micro-service programs such as spring group framework micro-services, the execution of each request task needs a plurality of micro-service programs for linkage support, and the plurality of micro-services needed by the task execution can be distributed in a local server and a kubernets cluster. But due to the kubernets cluster network, the micro-service in the kubernets cluster cannot be directly linked with the local server micro-service for request forwarding.
Based on the fact that requests can not be forwarded by directly linking micro-services inside a kubernets cluster from local server micro-services, the existing method is that developers start all related micro-service programs in a local environment or change a kubernets cluster network. However, both of the above methods have certain disadvantages, and firstly, the manner of starting all related microservices in the local environment requires time to wait in the starting process, occupies a large amount of local system resources, and has low request forwarding efficiency. Secondly, the change cost is large, the process is complex and the cost is high by changing the way of the kubernets cluster network.
In summary, how to effectively solve the problems of large system resource occupation, low request forwarding efficiency, high cost and the like of the existing method for forwarding the request from the local server micro-service to the kubernets cluster micro-service is a problem which needs to be solved by the technical personnel in the field at present.
Disclosure of Invention
The invention aims to provide a request forwarding method, which greatly saves system resources, simplifies the request forwarding process and reduces the cost; another object of the present invention is to provide a request forwarding apparatus, a device and a computer readable storage medium.
In order to solve the technical problems, the invention provides the following technical scheme:
a request forwarding method, comprising:
when a request to be forwarded is monitored, acquiring a forwarding direction corresponding to the request to be forwarded;
judging whether the forwarding direction is from a local server to a kubernets cluster or not;
if yes, forwarding the request to be forwarded to a proxy server in the kubernetes cluster;
and analyzing the request to be forwarded by using the proxy server to obtain a first micro service, and forwarding the request to be forwarded to the first micro service.
In a specific embodiment of the present invention, forwarding the request to be forwarded to a proxy server in the kubernets cluster includes:
and forwarding the request to be forwarded to the proxy server through a preset http proxy server port.
In a specific embodiment of the present invention, the analyzing the request to be forwarded by using the proxy server to obtain a first microservice, includes:
analyzing the request to be forwarded by using the proxy server according to a preset domain name analysis rule to obtain a first micro-service name;
and searching to obtain the first micro service according to the first micro service name.
In an embodiment of the present invention, when determining that the forwarding direction is not from the local server to the kubernets cluster, the method further includes:
judging whether the forwarding direction is from the kubernets cluster to the local server or not;
if so, analyzing the request head of the request to be forwarded to obtain a second micro-service name;
searching an intranet IP address corresponding to the second micro-service name;
and forwarding the request to be forwarded to the intranet IP address so as to forward the request to be forwarded to a second micro service in the local server.
A request forwarding apparatus comprising:
the forwarding direction acquiring module is used for acquiring a forwarding direction corresponding to the request to be forwarded when the request to be forwarded is monitored;
the first judgment module is used for judging whether the forwarding direction is from a local server to a kubernets cluster or not;
the first request forwarding module is used for forwarding the request to be forwarded to a proxy server in a kubernets cluster when the forwarding direction is determined to be from a local server to the kubernets cluster;
and the second request forwarding module is used for analyzing the request to be forwarded by using the proxy server to obtain a first micro service and forwarding the request to be forwarded to the first micro service.
In a specific embodiment of the present invention, the first request forwarding module is a module that forwards the request to be forwarded to the proxy server through a preset http proxy server port.
In a specific embodiment of the present invention, the second request forwarding module includes:
the request analysis submodule is used for analyzing the request to be forwarded by utilizing the proxy server according to a preset domain name analysis rule to obtain a first micro-service name;
and the micro-service searching sub-module is used for searching and obtaining the first micro-service according to the first micro-service name.
In one embodiment of the present invention, the method further comprises:
a second judging module, configured to, when it is determined that the forwarding direction is not clustered from a local server to kubernets, judge whether the forwarding direction is clustered from the kubernets to the local server;
the request header analyzing module is used for analyzing the request header of the request to be forwarded to obtain a second micro-service name when the forwarding direction is determined to be from the kubernets cluster to the local server;
the address searching module is used for searching the intranet IP address corresponding to the second micro-service name;
and the third request forwarding module is used for forwarding the request to be forwarded to the intranet IP address so as to forward the request to be forwarded to a second micro service in the local server.
A request forwarding device comprising:
a memory for storing a computer program;
a processor for implementing the steps of the request forwarding method as described above when executing the computer program.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the request forwarding method as set forth above.
According to the request forwarding method provided by the invention, when the request to be forwarded is monitored, the forwarding direction corresponding to the request to be forwarded is obtained; judging whether the forwarding direction is from the local server to the kubernets cluster or not; if yes, forwarding the request to be forwarded to a proxy server in the kubernetes cluster; and analyzing the request to be forwarded by using the proxy server to obtain a first micro service, and forwarding the request to be forwarded to the first micro service.
According to the technical scheme, the proxy server is preset in the kubernets cluster, when the request forwarding direction is determined to be from the local server to the kubernets cluster, the request to be forwarded is forwarded to the proxy server, and then the proxy server is used for forwarding the request to be forwarded to the corresponding micro-service in the kubernets cluster. Therefore, the request forwarding from the micro service in the local server to the micro service in the kubernets cluster is realized, all related micro services do not need to be started in the local environment, the system resources are greatly saved, the kubernets cluster network does not need to be changed, the request forwarding process is simplified, and the cost is reduced.
Correspondingly, the invention also provides a request forwarding device, equipment and a computer readable storage medium corresponding to the request forwarding method, which have the technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an implementation of a request forwarding method according to an embodiment of the present invention;
fig. 2 is a flowchart of another implementation of a request forwarding method according to an embodiment of the present invention;
fig. 3 is a block diagram of a request forwarding apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of a request forwarding device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a request forwarding device provided in this embodiment.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an implementation of a request forwarding method in an embodiment of the present invention, where the method may include the following steps:
s101: and when the request to be forwarded is monitored, acquiring a forwarding direction corresponding to the request to be forwarded.
When the request forwarding between the micro services needs to be performed, a request to be forwarded is generated, and the request to be forwarded includes a forwarding direction of the request, that is, the request to be forwarded is specifically forwarded from which micro service in the local server or the kubernets cluster to which micro service in the local server or the kubernets cluster. And the request forwarding center monitors the request, and acquires a forwarding direction corresponding to the request to be forwarded when the request to be forwarded is monitored.
S102: and judging whether the forwarding direction is from the local server to the kubernets cluster, if not, executing the step S103, and if so, executing the step S104.
After the forwarding direction corresponding to the request to be forwarded is acquired, whether the forwarding direction is from the local server to the kubernets cluster or not is judged, if not, it is indicated that the situation that the micro service cannot be directly linked to the kubernets cluster does not exist, step S103 is executed, if yes, it is indicated that the current situation belongs to the situation that the micro service cannot be directly linked to the kubernets cluster, and step S104 is executed.
S103: and performing request forwarding according to a preset request forwarding rule corresponding to the forwarding direction.
The method comprises the steps that a request forwarding rule that a forwarding direction is not from a local server to a kubernetes cluster is preset, and if the forwarding direction is from micro-service in the local server to micro-service in the local server, the request can be directly forwarded; when the forwarding direction is from the micro service in the kubernets cluster to the micro service in the kubernets cluster, the request can be directly forwarded; when the forwarding direction is from the micro-service in the kubernets cluster to the micro-service in the local server, direct request forwarding can be performed according to a preset request forwarding rule.
And when the forwarding direction is determined not to be from the local server to the kubernets cluster, indicating that the situation that the micro-service cannot be directly linked to the kubernets cluster does not exist, and performing request forwarding according to a preset request forwarding rule corresponding to the forwarding direction. For example, the micro service to be forwarded can be identified according to the micro service identification information, so that the forwarding operation of the request to be forwarded is realized by identifying the corresponding micro service according to the identification information.
S104: and forwarding the request to be forwarded to a proxy server in the kubernets cluster.
Proxy servers are set up in the kubernets cluster in advance, and local requests can be linked to the proxy servers. When the forwarding direction is determined to be from the local server to the kubernets cluster, the situation that the current situation belongs to the micro service which cannot be directly linked to the kubernets cluster is explained, and the request to be forwarded is forwarded to the proxy server in the kubernets cluster.
S105: and analyzing the request to be forwarded by using the proxy server to obtain a first micro service, and forwarding the request to be forwarded to the first micro service.
After the request to be forwarded is forwarded to the proxy server in the kubernets cluster, the request to be forwarded is analyzed by the proxy server to obtain a first micro service. Because the proxy server and the first micro service belong to the same internal network, the proxy server can forward the request to be forwarded to the first micro service, so that the request to be forwarded initiated by the micro service in the local server is forwarded to the micro service in the kubernets cluster. According to the invention, only one proxy server needs to be arranged in the kubernets cluster, all related micro-services do not need to be started in a local environment, system resources are greatly saved, a kubernets cluster network does not need to be changed, the request forwarding process is simplified, and overhigh micro-service joint debugging cost is avoided.
It should be noted that the first micro service in the first micro service is only one kind of identifier to be forwarded to the micro service.
According to the technical scheme, the proxy server is preset in the kubernets cluster, when the request forwarding direction is determined to be from the local server to the kubernets cluster, the request to be forwarded is forwarded to the proxy server, and then the proxy server is used for forwarding the request to be forwarded to the corresponding micro-service in the kubernets cluster. Therefore, the request forwarding from the micro service in the local server to the micro service in the kubernets cluster is realized, all related micro services do not need to be started in the local environment, the system resources are greatly saved, the kubernets cluster network does not need to be changed, the request forwarding process is simplified, and the cost is reduced.
It should be noted that, based on the above embodiments, the embodiments of the present invention also provide corresponding improvements. In the following embodiments, steps that are the same as or correspond to those in the above embodiments may be referred to one another, and corresponding advantageous effects may also be referred to one another, which is not described in detail in the following modified embodiments.
Referring to fig. 2, fig. 2 is a flowchart of another implementation of a request forwarding method in the embodiment of the present invention, where the method may include the following steps:
s201: and when the request to be forwarded is monitored, acquiring a forwarding direction corresponding to the request to be forwarded.
S202: and judging whether the forwarding direction is from the local server to the kubernets cluster, if so, executing the step S203, and if not, executing the step S206.
S203: and forwarding the request to be forwarded to the proxy server through a preset http proxy server port.
And presetting an http proxy server port in the proxy server, and exposing the http proxy server port to a request to be forwarded of a local server side. And when the forwarding direction is determined to be from the local server to the kubernets cluster, forwarding the request to be forwarded to the proxy server through a preset http proxy server port. By setting the port of the http proxy server exposed to the request to be forwarded, the request to be forwarded of the local server microservice is facilitated to be forwarded to the proxy server in the kubernets cluster.
S204: and analyzing the request to be forwarded by using the proxy server according to a preset domain name analysis rule to obtain a first micro-service name.
Domain name resolution rules are preset in the kubernetes cluster, and the proxy server can resolve the request to be forwarded according to the domain name resolution rules to obtain the name of the micro service to be forwarded. After the request to be forwarded is forwarded to the proxy server through a preset http proxy server port, the proxy server is used for analyzing the request to be forwarded according to a preset domain name analysis rule to obtain a first micro-service name.
S205: and searching according to the first micro service name to obtain a first micro service, and forwarding the request to be forwarded to the first micro service.
After the first micro service name is obtained through analysis, the first micro service corresponding to the first micro service name is searched, and the request to be forwarded is forwarded to the first micro service. The corresponding relation between the micro-service name and the micro-service is fully utilized, the request forwarding accuracy is greatly improved, and the request forwarding efficiency is improved.
S206: and judging whether the forwarding direction is from the kubernets cluster to the local server, if not, executing step S207, and if so, executing step S208.
When the forwarding direction is determined not to be from the local server to the kubernets cluster, further judging whether the forwarding direction is from the kubernets cluster to the local server, if not, indicating that the forwarding direction is from the micro-service in the local server to the micro-service in the local server, or from the micro-service in the kubernets cluster to the micro-service in the kubernets cluster, executing step S207, and if so, executing step S208.
S207: and performing request forwarding according to a preset request forwarding rule corresponding to the forwarding direction.
When the forwarding direction is determined to be neither from the local server to the kubernets cluster nor from the kubernets cluster to the local server, it is stated that the forwarding direction is from micro-services in the local server to micro-services in the local server, or from micro-services in the kubernets cluster to micro-services in the kubernets cluster, request forwarding rules between the micro-services in the local server and between the micro-services in the kubernets cluster are preset, and request forwarding is performed according to the preset request forwarding rules corresponding to the forwarding direction.
S208: and analyzing the request header of the request to be forwarded to obtain a second micro-service name.
And the request header of the request to be forwarded comprises a second micro-service name of the micro-service to which the request to be forwarded needs to be forwarded. And when the forwarding direction is determined to be from the kubernets cluster to the local server, analyzing the request head of the request to be forwarded to obtain a second micro-service name.
S209: and searching the intranet IP address corresponding to the second micro-service name.
And presetting the corresponding relation between each micro-service name and each intranet IP address. And after the second micro-service name of the micro-service to be forwarded is obtained through analysis, searching the intranet IP address corresponding to the second micro-service name.
It should be noted that the first and second micro service names in the first and second micro service names are only used to distinguish the micro service to which the request to be forwarded needs to be forwarded when the forwarding direction is from the local server to the kubernets cluster and the forwarding direction is from the kubernets cluster to the local server, and there is no difference in size or order.
S210: and forwarding the request to be forwarded to the intranet IP address so as to forward the request to be forwarded to a second micro service in the local server.
After the intranet IP address corresponding to the second micro-service name is found, the request to be forwarded is forwarded to the intranet IP address, and therefore the request to be forwarded is forwarded to the second micro-service in the local server.
The present embodiment is different from the first embodiment corresponding to the technical solution claimed in independent claim 1, and the technical solutions claimed in the dependent claims 2 to 4 are added, and of course, according to different practical situations and requirements, the technical solutions claimed in the dependent claims can be flexibly combined on the basis of not affecting the completeness of the solutions, so as to better meet the requirements of different use scenarios.
Corresponding to the above method embodiment, the present invention further provides a request forwarding device, and the request forwarding device described below and the request forwarding method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a block diagram of a structure of a request forwarding apparatus in an embodiment of the present invention, where the apparatus may include:
a forwarding direction obtaining module 31, configured to obtain, when the request to be forwarded is monitored, a forwarding direction corresponding to the request to be forwarded;
a first determining module 32, configured to determine whether a forwarding direction is from a local server to a kubernets cluster;
the first request forwarding module 33 is configured to forward the request to be forwarded to a proxy server in the kubernets cluster when it is determined that the forwarding direction is from the local server to the kubernets cluster;
the second request forwarding module 34 is configured to analyze the request to be forwarded by using the proxy server to obtain the first micro service, and forward the request to be forwarded to the first micro service.
According to the technical scheme, the proxy server is preset in the kubernets cluster, when the request forwarding direction is determined to be from the local server to the kubernets cluster, the request to be forwarded is forwarded to the proxy server, and then the proxy server is used for forwarding the request to be forwarded to the corresponding micro-service in the kubernets cluster. Therefore, the request forwarding from the micro service in the local server to the micro service in the kubernets cluster is realized, all related micro services do not need to be started in the local environment, the system resources are greatly saved, the kubernets cluster network does not need to be changed, the request forwarding process is simplified, and the cost is reduced.
In a specific embodiment of the present invention, the first request forwarding module 33 is specifically a module that forwards the request to be forwarded to the proxy server through a preset http proxy server port.
In a specific embodiment of the present invention, the second request forwarding module 34 includes:
the request analysis submodule is used for analyzing the request to be forwarded by using the proxy server according to the preset domain name analysis rule to obtain a first micro-service name;
and the micro-service searching sub-module is used for searching and obtaining the first micro-service according to the first micro-service name.
In one embodiment of the present invention, the method further comprises:
the second judgment module is used for judging whether the forwarding direction is from the local server to the local server when the forwarding direction is not from the local server to the kubernets cluster;
the request head analysis module is used for analyzing the request head of the request to be forwarded to obtain a second micro-service name when the forwarding direction is determined to be from the kubernets cluster to the local server;
the address searching module is used for searching an intranet IP address corresponding to the second micro-service name;
and the third request forwarding module is used for forwarding the request to be forwarded to the intranet IP address so as to forward the request to be forwarded to the second micro service in the local server.
Corresponding to the above method embodiment, referring to fig. 4, fig. 4 is a schematic diagram of a request forwarding device provided in the present invention, where the request forwarding device may include:
a memory 332 for storing a computer program;
processor 322, configured to implement the steps of the request forwarding method of the above-described method embodiments when executing the computer program.
Specifically, referring to fig. 5, fig. 5 is a schematic diagram of a specific structure of a request forwarding device provided in this embodiment, the request forwarding device may generate a relatively large difference due to different configurations or performances, and may include a processor (CPU) 322 (for example, one or more processors) and a memory 332, where the memory 332 stores one or more computer applications 342 or data 344. Memory 332 may be, among other things, transient or persistent storage. The program stored in memory 332 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a data processing device. Still further, processor 322 may be configured to communicate with memory 332 to execute a sequence of instruction operations in memory 332 on request forwarding device 301.
Request forwarding device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341.
The steps in the request forwarding method described above may be implemented by the structure of the request forwarding device.
Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
when a request to be forwarded is monitored, acquiring a forwarding direction corresponding to the request to be forwarded; judging whether the forwarding direction is from the local server to the kubernets cluster or not; if yes, forwarding the request to be forwarded to a proxy server in the kubernetes cluster; and analyzing the request to be forwarded by using the proxy server to obtain a first micro service, and forwarding the request to be forwarded to the first micro service.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided by the present invention, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device, the apparatus and the computer-readable storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A request forwarding method, comprising:
when a request to be forwarded is monitored, acquiring a forwarding direction corresponding to the request to be forwarded;
judging whether the forwarding direction is from a local server to a kubernets cluster or not;
if yes, forwarding the request to be forwarded to a proxy server in the kubernetes cluster;
and analyzing the request to be forwarded by using the proxy server to obtain a first micro service, and forwarding the request to be forwarded to the first micro service.
2. The request forwarding method of claim 1, wherein forwarding the request to be forwarded to a proxy server in the kubernets cluster comprises:
and forwarding the request to be forwarded to the proxy server through a preset http proxy server port.
3. The request forwarding method according to claim 1, wherein the analyzing the request to be forwarded by using the proxy server to obtain a first microservice comprises:
analyzing the request to be forwarded by using the proxy server according to a preset domain name analysis rule to obtain a first micro-service name;
and searching to obtain the first micro service according to the first micro service name.
4. The request forwarding method according to any one of claims 1 to 3, wherein when it is determined that the forwarding direction is not from a local server to a kubernets cluster, further comprising:
judging whether the forwarding direction is from the kubernets cluster to the local server or not;
if so, analyzing the request head of the request to be forwarded to obtain a second micro-service name;
searching an intranet IP address corresponding to the second micro-service name;
and forwarding the request to be forwarded to the intranet IP address so as to forward the request to be forwarded to a second micro service in the local server.
5. A request forwarding apparatus, comprising:
the forwarding direction acquiring module is used for acquiring a forwarding direction corresponding to the request to be forwarded when the request to be forwarded is monitored;
the first judgment module is used for judging whether the forwarding direction is from a local server to a kubernets cluster or not;
the first request forwarding module is used for forwarding the request to be forwarded to a proxy server in a kubernets cluster when the forwarding direction is determined to be from a local server to the kubernets cluster;
and the second request forwarding module is used for analyzing the request to be forwarded by using the proxy server to obtain a first micro service and forwarding the request to be forwarded to the first micro service.
6. The request forwarding apparatus according to claim 5, wherein the first request forwarding module is specifically a module that forwards the request to be forwarded to the proxy server through a preset http proxy server port.
7. The request forwarding apparatus of claim 5, wherein the second request forwarding module comprises:
the request analysis submodule is used for analyzing the request to be forwarded by utilizing the proxy server according to a preset domain name analysis rule to obtain a first micro-service name;
and the micro-service searching sub-module is used for searching and obtaining the first micro-service according to the first micro-service name.
8. The request forwarding device according to any one of claims 5 to 7, further comprising:
a second judging module, configured to, when it is determined that the forwarding direction is not clustered from a local server to kubernets, judge whether the forwarding direction is clustered from the kubernets to the local server;
the request header analyzing module is used for analyzing the request header of the request to be forwarded to obtain a second micro-service name when the forwarding direction is determined to be from the kubernets cluster to the local server;
the address searching module is used for searching the intranet IP address corresponding to the second micro-service name;
and the third request forwarding module is used for forwarding the request to be forwarded to the intranet IP address so as to forward the request to be forwarded to a second micro service in the local server.
9. A request forwarding device, comprising:
a memory for storing a computer program;
processor for implementing the steps of the request forwarding method according to any of claims 1 to 4 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the request forwarding method according to any one of claims 1 to 4.
CN202111277174.9A 2021-10-29 2021-10-29 Request forwarding method, device, equipment and readable storage medium Pending CN113923204A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111277174.9A CN113923204A (en) 2021-10-29 2021-10-29 Request forwarding method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111277174.9A CN113923204A (en) 2021-10-29 2021-10-29 Request forwarding method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113923204A true CN113923204A (en) 2022-01-11

Family

ID=79243756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111277174.9A Pending CN113923204A (en) 2021-10-29 2021-10-29 Request forwarding method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113923204A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115988078A (en) * 2022-11-28 2023-04-18 中国联合网络通信集团有限公司 Communication method, system, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290174A (en) * 2019-05-24 2019-09-27 华为技术有限公司 A kind of control method and control node of main cluster
CN111796858A (en) * 2020-07-07 2020-10-20 金蝶软件(中国)有限公司 Method, system and related equipment for access detection of application programs in Kubernetes cluster
CN113032105A (en) * 2021-04-20 2021-06-25 金蝶软件(中国)有限公司 Kubernetes cluster access control method, system and related equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290174A (en) * 2019-05-24 2019-09-27 华为技术有限公司 A kind of control method and control node of main cluster
CN111796858A (en) * 2020-07-07 2020-10-20 金蝶软件(中国)有限公司 Method, system and related equipment for access detection of application programs in Kubernetes cluster
CN113032105A (en) * 2021-04-20 2021-06-25 金蝶软件(中国)有限公司 Kubernetes cluster access control method, system and related equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115988078A (en) * 2022-11-28 2023-04-18 中国联合网络通信集团有限公司 Communication method, system, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN112035317B (en) Micro-service link monitoring method, device, equipment and medium
CN109951323B (en) Log analysis method and system
CN107229656B (en) Method, device and system for exporting full data
CN111090268B (en) Data acquisition method and device based on thread division and data acquisition equipment
US20170177727A1 (en) Methods for analyzing web sites using web services and devices thereof
CN111221793A (en) Data mining method, platform, computer equipment and storage medium
CN111949389B (en) Slurm-based information acquisition method and device, server and computer-readable storage medium
CN113076253A (en) Test method and test device
CN113596078A (en) Service problem positioning method and device
CN113923204A (en) Request forwarding method, device, equipment and readable storage medium
CN109240998B (en) Configurable file parsing method
CN113535586A (en) Test environment switching method, device, equipment and readable storage medium
CN112003872A (en) Method and device for detecting and calling secondary node capability of industrial internet identifier
CN112702441B (en) Container-based access data processing method, device, system and storage medium
CN111092954B (en) Method and device for generating micro service and electronic equipment
CN113704203A (en) Log file processing method and device
CN113641493A (en) Task pushing method, device and equipment and computer readable storage medium
CN113297148A (en) Method, device and equipment for acquiring service log data and readable storage medium
CN110955498B (en) Process processing method, device and equipment and computer readable storage medium
CN113760693A (en) Method and apparatus for local debugging of microservice systems
CN111666155A (en) Resource configuration file management method, device, equipment and medium
CN113114612B (en) Determination method and device for distributed system call chain
CN117632445B (en) Request processing method and device, task execution method and device
CN111475289B (en) Load balancing method and device
CN110858240A (en) Front-end module loading method and device

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