CN114615321A - Traffic processing method and device - Google Patents

Traffic processing method and device Download PDF

Info

Publication number
CN114615321A
CN114615321A CN202210303182.4A CN202210303182A CN114615321A CN 114615321 A CN114615321 A CN 114615321A CN 202210303182 A CN202210303182 A CN 202210303182A CN 114615321 A CN114615321 A CN 114615321A
Authority
CN
China
Prior art keywords
service node
address
physical address
proxy
node
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.)
Granted
Application number
CN202210303182.4A
Other languages
Chinese (zh)
Other versions
CN114615321B (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.)
Du Xiaoman Technology Beijing Co Ltd
Original Assignee
Du Xiaoman Technology Beijing 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 Du Xiaoman Technology Beijing Co Ltd filed Critical Du Xiaoman Technology Beijing Co Ltd
Priority to CN202210303182.4A priority Critical patent/CN114615321B/en
Publication of CN114615321A publication Critical patent/CN114615321A/en
Application granted granted Critical
Publication of CN114615321B publication Critical patent/CN114615321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a traffic processing method and a traffic processing device. Wherein, the method comprises the following steps: responding to a flow transmission request sent by a first service node, acquiring a loopback address corresponding to a second service node, wherein the loopback address is used for representing a local address of a first proxy service node communicated with the second service node, the physical address of the first proxy service node is the same as that of the first service node, and the flow transmission request is used for requesting to transmit target flow from the first service node to the second service node; determining a physical address of the second serving node based on the loopback address; based on the physical address, a traffic transmission request is sent to the second serving node via the first proxy serving node. The invention solves the technical problem that the sidecar mode has great influence on the service in the related technology.

Description

Traffic processing method and device
Technical Field
The invention relates to the field of micro-service communication, in particular to a traffic processing method and device.
Background
In a traditional micro-service communication mode, a service node in a server directly calls another service node through a Transmission Control Protocol network (TCP network), if some general functions such as current limiting, fusing and the like are added between service calls, a Software Development Kit (SDK) can be packaged to be provided for each service to refer based on the mode, but one function is not only finished once Development, but also usually needs to be subjected to multiple iterative optimization upgrades, and each iterative upgrade needs to actively upgrade the SDK by the service, so that the maintenance cost is increased, and meanwhile, the communication cost of basic service component personnel and service personnel is increased. In addition, in some large-scale enterprises, the technology stacks used in the large-scale enterprises are also diversified, such as static strongly typed, compiled language (Go language), hypertext preprocessor (Personal Home Page, or PHP), high-level programming language (Java language), and the like, and this way leads to the realization of multiple languages for each basic function development, which will have high requirements on the technology stacks of the personnel responsible for the basic components and increase the maintenance cost; also, the more basic functions, the greater the impact on the service.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a flow processing method and a flow processing device, which are used for at least solving the technical problem that a sidecar mode in the related technology has a large influence on services.
According to an aspect of an embodiment of the present invention, there is provided a traffic processing method, including: responding to a flow transmission request sent by a first service node, acquiring a loopback address corresponding to a second service node, wherein the loopback address is used for representing a local address of a first proxy service node communicated with the second service node, the physical address of the first proxy service node is the same as that of the first service node, and the flow transmission request is used for requesting to transmit target flow from the first service node to the second service node; determining a physical address of the second serving node based on the loopback address; based on the physical address, a traffic transmission request is sent to the second serving node via the first proxy serving node.
Optionally, sending the traffic transmission request to the second serving node via the first proxy serving node based on the physical address, includes: sending a traffic transmission request to a second proxy service node via the first proxy service node based on the physical address, wherein the physical address of the second proxy service node is the same as the physical address of the second service node; the traffic transmission request is forwarded to the second service node via the second proxy service node.
Optionally, the method further comprises: acquiring identification information of a second service node; and coding the identification information based on the physical address of the first service node to generate a loopback address corresponding to the second service node.
Optionally, the obtaining a loopback address corresponding to the second service node includes: acquiring identification information of a second service node; sending the identification information to a target registration center, wherein the target registration center is used for inquiring a loop address corresponding to the identification information based on a first preset corresponding relation table, and the first preset corresponding relation table is used for representing the corresponding relation between the identification information and the loop address; and receiving a loop address corresponding to the identification information and fed back by the target registration center.
Optionally, determining the physical address of the second serving node based on the loopback address comprises: sending a loopback address to a target registration center through a first proxy service node, wherein the target registration center is used for inquiring a physical address corresponding to the loopback address based on a second preset corresponding relation table, and the second preset corresponding relation table is used for representing the corresponding relation between the loopback address and the physical address; and receiving a physical address corresponding to the loop back address fed back by the target registration center through the first proxy service node.
According to another aspect of the embodiments of the present invention, there is also provided a traffic processing apparatus, including: a first obtaining module, configured to obtain a loopback address corresponding to a second service node in response to a traffic transmission request sent by a first service node, where the loopback address is used to indicate a local address of a first proxy service node in communication with the second service node, a physical address of the first proxy service node is the same as a physical address of the first service node, and the traffic transmission request is used to request that a target traffic is transmitted from the first service node to the second service node; a determining module for determining a physical address of the second serving node based on the loopback address; and the control module is used for sending the flow transmission request to the second service node through the first proxy service node based on the physical address.
Optionally, a control module comprising: a first control unit for transmitting a traffic transmission request to a second proxy service node via a first proxy service node based on a physical address, wherein the physical address of the second proxy service node is the same as that of the second service node; a second control unit for forwarding the traffic transmission request to the second service node via the second proxy service node.
Optionally, the apparatus further comprises: a second obtaining module, configured to obtain identification information of a second service node; and the coding module is used for coding the identification information based on the physical address of the first service node and generating a loopback address corresponding to the second service node.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the above-mentioned traffic processing method.
According to another aspect of the embodiments of the present invention, there is also provided a processor, where the processor is configured to execute a program, where the program executes the above traffic processing method.
In the embodiment of the invention, a loopback address corresponding to a second service node is obtained by responding to a flow transmission request sent by a first service node, wherein the loopback address is used for representing a local address of a first proxy service node communicated with the second service node, the physical address of the first proxy service node is the same as that of the first service node, and the flow transmission request is used for requesting to transmit target flow from the first service node to the second service node; determining a physical address of the second serving node based on the loopback address; based on the physical address, the purpose of switching from the traditional calling mode to the sidecar mode without influencing the service is achieved by a mode of sending the flow transmission request to the second service node through the first proxy service node and by adding a registration center and a loopback address technology of the service, so that the technical effect of effectively reducing the influence of the sidecar mode on the service is realized, and the technical problem that the sidecar mode has a large influence on the service in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram illustrating a traffic handling method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative conventional service communication in accordance with an embodiment of the present invention;
FIG. 3 is a schematic illustration of an alternative sidecar communication mode according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an alternative traffic hijacking overall process, according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating an alternative loopback address encoding for service identification, according to an embodiment of the present invention;
FIG. 6 is a flow chart of the steps of an alternative traffic hijacking scheme in accordance with an embodiment of the present invention;
fig. 7 is a schematic diagram of a traffic handling apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a traffic handling method, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that herein.
Fig. 1 is a schematic flow chart of a traffic processing method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, responding to a flow transmission request sent by a first service node, acquiring a loopback address corresponding to a second service node, wherein the loopback address is used for representing a local address of a first proxy service node communicated with the second service node, the physical address of the first proxy service node is the same as that of the first service node, and the flow transmission request is used for requesting to transmit a target flow from the first service node to the second service node.
The first service node and the first proxy service node belong to service nodes on the same server, and the physical addresses of the service nodes are the same.
The first service node and the second service node do not belong to the service node on the same server, and the physical addresses of the first service node and the second service node are different.
The first service node in the above steps may be a node of microservice a (service a), the second service node may be a node of microservice b (service b), and the first proxy service node may be a node of sidecar a (sidecar a).
The loopback Address in the above steps, for example, 127.0.0.1, is generally called a local loopback Address (Loop back Address), and does not belong to any classified Address class, and it may represent a local virtual interface of the device, so that the loopback Address is regarded as an interface that is never down by default, and is generally used to check whether a local network protocol, a basic data interface, and the like are normal.
The physical Address may be an Internet Protocol Address (IP Address), which is a network layer Address used in the network.
In an optional embodiment, after responding to the traffic transmission request sent by the first service node, the loopback address of the second service node may be obtained, and since the loopback address may be the address of the proxy service node obtained on the premise of not affecting the service, the service level is not affected.
In an alternative embodiment, in order to implement network communication, in this scheme, a registry is further involved, that is, each micro server registers its own network address and other information to the registry when starting up, the registry stores these data, and the user can query the address of the service provider from the registry and call the interface of the service provider through the address.
In yet another alternative embodiment, in the network communication, after the sidecar architecture mode is set, in response to a traffic transmission request sent by the first service node, the registration center may automatically acquire a loopback address corresponding to the second service node, where the sidecar architecture mode may be to add additional functions to the existing service, and these functions do not affect the business logic.
In another optional embodiment, after the first service node sends the traffic transmission request to the registry, the registry automatically retrieves the loopback address corresponding to the second service node, but actually obtains the loopback address of the first proxy service node, and after obtaining the loopback address corresponding to the first proxy service node, the registry sends the loopback address corresponding to the first proxy service node to the first service node.
Step S104, the physical address of the second service node is determined based on the loopback address.
In an optional embodiment, after the first service node obtains the loopback address corresponding to the second service node, the first service node actually obtains an address of a first proxy service node capable of forwarding the request to the second service node, and the first proxy service node may query a physical address of the second service node according to the loopback address and forward the request to the second service node according to the physical address. Optionally, the first proxy service node may send the loopback address to the registry, the registry may query the physical address of the second service node according to the loopback address of the second service node, and then the registry re-sends the physical address of the second service node to the first proxy service node, so that the first proxy service node may forward the request to the server where the second service node is located according to the physical address, and when forwarding the request to the server where the second service node is located, the physical address is actually forwarded to the second proxy service node corresponding to the second service node, after receiving the request, the second proxy service node may forward the request to the second service node, in this process, the traffic request between the first service node and the second service node may be monitored or fused by a sidecar mode, so that the traffic between the first service node and the second service node may be processed in time when the traffic is abnormal, and because the first service node acquires the loopback address corresponding to the second service node, on the service level, the first service node does not need to directly forward the request to the first proxy service node, and the influence on the flow request between the first service node and the second service node on the service level can be reduced.
And step S106, based on the physical address, sending the flow transmission request to the second service node through the first proxy service node.
In an optional embodiment, the first service node and the first proxy service node are in the same server, the second service node and the second proxy service node are in the other same server, in order to monitor traffic and handle traffic between the first service node and the second service node in time when traffic is abnormal, the first service node can transmit a traffic transmission request of the first service node to the first proxy service node in a side car mode after acquiring a loopback address of the first proxy service node, the first proxy service node transmits the traffic transmission request to a server where the second service node is located based on the acquired physical address of the second proxy service node, and the second proxy service node can forward the traffic transmission request to the second service node, so that the traffic transmission can be realized without affecting a service level, the first proxy service node sends the flow transmission request to the second service node.
Through the above embodiment of the present invention, first, in response to a traffic transmission request sent by a first service node, a loopback address corresponding to a second service node is obtained, where the loopback address is used to indicate a local address of a first proxy service node in communication with the second service node, a physical address of the first proxy service node is the same as a physical address of the first service node, and the traffic transmission request is used to request that a target traffic is transmitted from the first service node to the second service node; determining a physical address of the second serving node based on the loopback address; based on the physical address, the purpose of switching from the traditional calling mode to the sidecar mode is achieved by a mode of sending the flow transmission request to the second service node through the first proxy service node and by adding a registration center and a loopback address technology of service, so that the technical effect of effectively reducing the influence of the sidecar mode on the service is achieved, and the technical problem that the sidecar mode has a large influence on the service in the related art is solved.
Optionally, sending the traffic transmission request to the second serving node via the first proxy serving node based on the physical address, includes: sending a traffic transmission request to a second proxy service node via the first proxy service node based on the physical address, wherein the physical address of the second proxy service node is the same as the physical address of the second service node; the traffic transmission request is forwarded to the second service node via the second proxy service node.
The second proxy service node may be a sidecar b (sidecar b).
In an alternative embodiment, the first service node is on the same server as the first proxy service node, the second service node is on another same server as the second proxy service node, in order to monitor the flow and timely process the flow when the flow between the first service node and the second service node is abnormal, the first service node may first send a flow transmission request to the first proxy service node through a side car mode, the first proxy service node sends the flow transmission request to a server where the second proxy service node is located based on the obtained physical address of the second proxy service node, and then the second proxy service node forwards the flow transmission request to the second service node, the first proxy service node can send the traffic transmission request to the second service node on the premise of not influencing the service level.
Optionally, the method further comprises: acquiring identification information of a second service node; and coding the identification information based on the physical address of the first service node to generate a loopback address corresponding to the second service node.
The identification information may be a unique identification of the service node, for example, the identification information of the first service node may be 1, the identification information of the second service node may be 2, and the user may set the identification information according to the needs of the user, which is not specifically limited in the present invention.
In an optional embodiment, in order to implement a sidecar mode in which a registration center and a loopback address are added, after the identification information of the second service node is obtained, the identification information of the second service node may be encoded based on the physical address of the first service node, so as to obtain a loopback address corresponding to the second service node, so that the local service node may communicate with another local service node through the loopback address.
Optionally, the obtaining a loopback address corresponding to the second service node includes: acquiring identification information of a second service node; sending the identification information to a target registration center, wherein the target registration center is used for inquiring a loop address corresponding to the identification information based on a first preset corresponding relation table, and the first preset corresponding relation table is used for representing the corresponding relation between the identification information and the loop address; and receiving a loop address corresponding to the identification information and fed back by the target registration center.
The first preset correspondence table is used for embodying a correspondence table between the identification information and the loopback address in one server, and may be set in advance by a user, the first preset correspondence table may have a plurality of groups of correspondence data, and the relationship between the identification information and the loopback address is a one-to-one correspondence.
The target registry may be a registry used when a server performs traffic transmission with another server.
In an optional embodiment, in order to enable the first service node to communicate with the second service node through the loopback address, after the first proxy service node obtains the identification information of the second service node, the first proxy service node sends the identification information of the second service node to the target registration center, then the target registration center queries the loopback address corresponding to the identification information of the second service node based on a first preset correspondence table set in advance by a user, and after the loopback address corresponding to the identification information of the second service node is obtained, the target registration center sends the corresponding loopback address to the first proxy service node, so that the first proxy service node can obtain the loopback address corresponding to the identification information of the second service node fed back by the target registration center.
Optionally, determining the physical address of the second serving node based on the loopback address comprises: sending a loopback address to a target registration center through a first proxy service node, wherein the target registration center is used for inquiring a physical address corresponding to the loopback address based on a second preset corresponding relation table, and the second preset corresponding relation table is used for representing the corresponding relation between the loopback address and the physical address; and receiving a physical address corresponding to the loop back address fed back by the target registration center through the first proxy service node.
The second preset correspondence table is used for embodying a correspondence table between the loopback address and the physical address in one server, and may be set in advance by a user, the first preset correspondence table may have a plurality of sets of correspondence data, and the relationship between the loopback address and the physical address is a one-to-one correspondence.
In an optional embodiment, in order to monitor traffic and timely handle the traffic when the traffic between the first service node and the second service node is abnormal, the first proxy service node may obtain a loopback address of the second service node, after obtaining the loopback address of the second service node, the first proxy service node sends the loopback address of the second service node to the target registry, the target registry queries a physical address corresponding to the loopback address of the second service node based on the second preset correspondence table, then the target registry sends the physical address corresponding to the loopback address of the second service node obtained by the query to the first proxy service node, and the first proxy service node may receive the physical address corresponding to the loopback address of the second service node fed back by the target registry.
The present embodiment is further explained with reference to fig. 2 to 6 below:
fig. 2 shows a conventional service communication method, that is, the microservice a directly calls the microservice B through the TCP network, which has high requirements on the technical stack of the personnel in charge of the basic component and also increases the cost.
Fig. 3 shows the conventional sidecar communication mode, but the conventional sidecar communication mode cannot make the microserver a sense that it is going to actively call the sidecar a and cannot make the sidecar a sense that it is calling the sidecar B.
Fig. 4 is a flow hijacking overall structure diagram of the present scheme, which mainly shows a method for acquiring a physical address of a second service node by a first service node through a registration center, a loopback address of a first proxy service node, and a loopback address of the second service node.
As shown in fig. 5, in order to enable a sidecar (sidecar) service to identify a destination service accessed by a first service node, a micro service needs to be encoded and the encoded is included in a loopback address, that is, it can be known which micro service the request needs to be forwarded to through the loopback address, for example, the identification information of the micro service B is 2, and then the micro service a can forward the request to the micro service B through the sidecar service by accessing the loopback address of the micro service B.
As shown in fig. 6, the specific process includes the following steps:
step S601, the first service node transfers the registration center to obtain the address of the second service node, actually obtain the loop back address of the first proxy service node, if obtain, enter the next step, if not, repeat this step;
step S602: the registration center returns a loopback address corresponding to the second service node, namely the registration center returns the loopback address corresponding to the first proxy service node to the first service node;
step S603: the first service node sends a request to an address obtained according to the registration center, and actually sends the request to the first proxy service node;
step S604: the first proxy service node queries the actual address of the second service node in the registration center according to the loopback address, and the actual address of the second proxy service node is actually obtained;
step S605: the registry returns the address of the second service node, and actually returns the actual address of the second proxy service node;
step S606: the first proxy service node accesses the service of the second proxy service node according to the address returned by the registration center;
step S607: the second proxy service node forwards the request to the second service node.
The first service node in the above steps may be ServiceA, the second service node may be ServiceB, the first proxy service node may be sidecar a, and the second proxy service node may be sidecar b. The invention realizes a set of traffic-unaware flow hijacking scheme by using a service registration center and a loopback address technology, and reduces the reconstruction cost of reconstructing a sidecar mode by using a traditional service mode.
Example 2
According to an embodiment of the present invention, a device for a traffic processing method is provided, where the device may perform the traffic processing method provided in embodiment 1, and a specific implementation manner and a preferred application scenario are the same as those in embodiment 1, which are not described herein again.
Fig. 7 is a schematic structural diagram of a traffic processing method apparatus according to an embodiment of the present invention, and as shown in fig. 7, the apparatus includes: a first obtaining module 70, configured to obtain a loopback address corresponding to a second service node in response to a traffic transmission request sent by a first service node, where the loopback address is used to indicate a local address of a first proxy service node in communication with the second service node, a physical address of the first proxy service node is the same as a physical address of the first service node, and the traffic transmission request is used to request that a target traffic is transmitted from the first service node to the second service node; a determining module 72 for determining a physical address of the second serving node based on the loopback address; a control module 74 for sending the traffic transmission request to the second serving node via the first proxy serving node based on the physical address.
Optionally, the control module further comprises: a first control unit for transmitting a traffic transmission request to a second proxy service node via a first proxy service node based on a physical address, wherein the physical address of the second proxy service node is the same as that of the second service node; a second control unit for forwarding the traffic transmission request to the second service node via the second proxy service node.
Optionally, the apparatus further comprises: the second acquisition module is used for acquiring the identification information of the second service node; and the coding module is used for coding the identification information based on the physical address of the first service node and generating a loopback address corresponding to the second service node.
Optionally, the second obtaining module includes: an obtaining unit, configured to obtain identification information of a second service node; the system comprises a first sending unit, a target registration center and a second sending unit, wherein the first sending unit is used for sending identification information to the target registration center, the target registration center is used for inquiring a loop address corresponding to the identification information based on a first preset corresponding relation table, and the first preset corresponding relation table is used for representing the corresponding relation between the identification information and the loop address; and the first receiving unit is used for receiving the loopback address which is fed back by the target registration center and corresponds to the identification information.
Optionally, the determining module includes a second sending unit, configured to send the loopback address to the target registration center via the first proxy service node, where the target registration center is configured to query, based on a second preset correspondence table, a physical address corresponding to the loopback address, and the second preset correspondence table is configured to represent a correspondence between the loopback address and the physical address; and the second receiving unit is used for receiving the physical address corresponding to the loopback address fed back by the target registration center through the first proxy service node.
Example 3
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the traffic processing method described in embodiment 1.
Example 4
According to another aspect of the embodiments of the present invention, there is also provided a processor, where the processor is configured to execute a program, where the program executes the traffic processing method described in embodiment 1.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A traffic processing method, comprising:
responding to a traffic transmission request sent by a first service node, acquiring a loopback address corresponding to a second service node, wherein the loopback address is used for representing a local address of a first proxy service node which is communicated with the second service node, the physical address of the first proxy service node is the same as that of the first service node, and the traffic transmission request is used for requesting to transmit target traffic from the first service node to the second service node;
determining a physical address of the second serving node based on the loopback address;
based on the physical address, sending the traffic transmission request to the second serving node via the first proxy serving node.
2. The method of claim 1, wherein sending the traffic transmission request to the second serving node via the first proxy serving node based on the physical address comprises:
sending the traffic transmission request to a second proxy service node via the first proxy service node based on the physical address, wherein the second proxy service node has the same physical address as the second service node;
forwarding the traffic transmission request to the second service node via the second proxy service node.
3. The method of claim 1, further comprising:
acquiring identification information of the second service node;
and coding the identification information based on the physical address of the first service node to generate the loopback address corresponding to the second service node.
4. The method of claim 3, wherein obtaining the loopback address corresponding to the second service node comprises:
acquiring the identification information of the second service node;
sending the identification information to a target registration center, wherein the target registration center is used for inquiring the loopback address corresponding to the identification information based on a first preset corresponding relation table, and the first preset corresponding relation table is used for representing the corresponding relation between the identification information and the loopback address;
and receiving the loopback address corresponding to the identification information and fed back by the target registration center.
5. The method of claim 4, wherein determining the physical address of the second serving node based on the loopback address comprises:
sending the loopback address to the target registry via the first proxy service node, wherein the target registry is configured to query the physical address corresponding to the loopback address based on a second preset correspondence table, and the second preset correspondence table is configured to represent a correspondence between the loopback address and the physical address;
receiving the physical address corresponding to the loopback address fed back by the target registration center through the first proxy service node.
6. A flow processing apparatus, comprising:
a first obtaining module, configured to obtain a loopback address corresponding to a second service node in response to a traffic transmission request sent by a first service node, where the loopback address is used to represent a local address of a first proxy service node in communication with the second service node, a physical address of the first proxy service node is the same as a physical address of the first service node, and the traffic transmission request is used to request that target traffic is transmitted from the first service node to the second service node;
a determining module to determine a physical address of the second serving node based on the loopback address;
a control module to send the traffic transmission request to the second serving node via the first proxy serving node based on the physical address.
7. The apparatus of claim 6, wherein the control module comprises:
a first control unit configured to send the traffic transmission request to a second proxy service node via the first proxy service node based on the physical address, wherein the physical address of the second proxy service node is the same as that of the second service node;
a second control unit to forward the traffic transmission request to the second service node via the second proxy service node.
8. The apparatus of claim 6, further comprising:
a second obtaining module, configured to obtain identification information of the second service node;
and the coding module is used for coding the identification information based on the physical address of the first service node and generating the loopback address corresponding to the second service node.
9. A computer-readable storage medium, comprising a stored program, wherein the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the traffic processing method according to any one of claims 1 to 5.
10. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the traffic processing method according to any one of claims 1 to 5 when running.
CN202210303182.4A 2022-03-25 2022-03-25 Flow processing method and device Active CN114615321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210303182.4A CN114615321B (en) 2022-03-25 2022-03-25 Flow processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210303182.4A CN114615321B (en) 2022-03-25 2022-03-25 Flow processing method and device

Publications (2)

Publication Number Publication Date
CN114615321A true CN114615321A (en) 2022-06-10
CN114615321B CN114615321B (en) 2024-03-12

Family

ID=81867348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210303182.4A Active CN114615321B (en) 2022-03-25 2022-03-25 Flow processing method and device

Country Status (1)

Country Link
CN (1) CN114615321B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242864A (en) * 2022-06-28 2022-10-25 度小满科技(北京)有限公司 Micro-service access method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106034330A (en) * 2015-03-17 2016-10-19 网宿科技股份有限公司 Mobile terminal flow processing method based on content distribution network, apparatus and system thereof
US20190303175A1 (en) * 2018-03-28 2019-10-03 Ebay Inc. Network address management systems and methods
CN110401696A (en) * 2019-06-18 2019-11-01 华为技术有限公司 A kind of method, communication agent, host and the storage medium of decentralization processing
CN110995829A (en) * 2019-11-29 2020-04-10 广州市百果园信息技术有限公司 Instance calling method and device and computer storage medium
CN111049854A (en) * 2019-12-25 2020-04-21 微民保险代理有限公司 Service request transmission method and device
US10764244B1 (en) * 2019-06-12 2020-09-01 Cisco Technology, Inc. Systems and methods providing a multi-cloud microservices gateway using a sidecar proxy
CN112769938A (en) * 2021-01-12 2021-05-07 烽火通信科技股份有限公司 Kubernetes cloud edge communication system and method based on QUIC
CN112887279A (en) * 2021-01-13 2021-06-01 太平金融科技服务(上海)有限公司 Micro-service calling method and device, computer equipment and storage medium
CN113419876A (en) * 2021-06-30 2021-09-21 广州华多网络科技有限公司 Remote interface proxy calling method and device, computer equipment and storage medium
CN114205297A (en) * 2020-08-28 2022-03-18 华为技术有限公司 Traffic forwarding processing method and equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106034330A (en) * 2015-03-17 2016-10-19 网宿科技股份有限公司 Mobile terminal flow processing method based on content distribution network, apparatus and system thereof
US20190303175A1 (en) * 2018-03-28 2019-10-03 Ebay Inc. Network address management systems and methods
US10764244B1 (en) * 2019-06-12 2020-09-01 Cisco Technology, Inc. Systems and methods providing a multi-cloud microservices gateway using a sidecar proxy
CN110401696A (en) * 2019-06-18 2019-11-01 华为技术有限公司 A kind of method, communication agent, host and the storage medium of decentralization processing
CN110995829A (en) * 2019-11-29 2020-04-10 广州市百果园信息技术有限公司 Instance calling method and device and computer storage medium
CN111049854A (en) * 2019-12-25 2020-04-21 微民保险代理有限公司 Service request transmission method and device
CN114205297A (en) * 2020-08-28 2022-03-18 华为技术有限公司 Traffic forwarding processing method and equipment
CN112769938A (en) * 2021-01-12 2021-05-07 烽火通信科技股份有限公司 Kubernetes cloud edge communication system and method based on QUIC
CN112887279A (en) * 2021-01-13 2021-06-01 太平金融科技服务(上海)有限公司 Micro-service calling method and device, computer equipment and storage medium
CN113419876A (en) * 2021-06-30 2021-09-21 广州华多网络科技有限公司 Remote interface proxy calling method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周桐庆: "基于软件定义网络的流量工程", 《软件学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242864A (en) * 2022-06-28 2022-10-25 度小满科技(北京)有限公司 Micro-service access method and device, electronic equipment and storage medium
CN115242864B (en) * 2022-06-28 2023-12-05 度小满科技(北京)有限公司 Micro-service access method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114615321B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
CN101159714B (en) Instant communication method and device
CN113301166B (en) Service calling method and device, storage medium and electronic device
CN115442423A (en) Method for discovering services provided by a network repository function
CN108366356B (en) Method and device for intercommunication between M2M system and identification analysis system
CN103051551A (en) Distributed system and automatic maintaining method for same
WO2009062414A1 (en) Integrate client and method of desktop application communicating with net web application
CN106970843B (en) Remote calling method and device
KR101867576B1 (en) The Agent System and method for LoRaWAN Network Server and oneM2M Platform
CN111245918A (en) Service request transmission method and device
CN101115309B (en) Access zone network, home zone network, access zone service use system, method and terminal
CN114615321A (en) Traffic processing method and device
CN109450768B (en) Method for interconnecting containers and system for interconnecting containers
JP2003141002A (en) Url length conversion system and program
CN101848456B (en) A kind of method for processing business, communication system and relevant device
CN117336346A (en) IPPBX and PMS docking state conversion method, terminal equipment and medium
JP2016144186A (en) Communication information controller, relay system, communication information control method, and communication information control program
JP2009130501A (en) Terminating device
CN103533001A (en) Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server
US20100296637A1 (en) Service Processing Method, Communication System and Related Device
EP4258706A1 (en) Lan group fee calculation method and related device
CN105871972A (en) Video resource distributed cathe method, device and system
US20230308346A1 (en) Method for configuring a terminal device
CN108600255A (en) Mock service management method, device, computer equipment and storage medium
KR100947114B1 (en) Method for collecting quality data of web service using dummy message
CN104346228A (en) Application program sharing method and terminal

Legal Events

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