CN114615321B - Flow processing method and device - Google Patents

Flow processing method and device Download PDF

Info

Publication number
CN114615321B
CN114615321B CN202210303182.4A CN202210303182A CN114615321B CN 114615321 B CN114615321 B CN 114615321B CN 202210303182 A CN202210303182 A CN 202210303182A CN 114615321 B CN114615321 B CN 114615321B
Authority
CN
China
Prior art keywords
service node
address
loop
physical address
proxy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210303182.4A
Other languages
Chinese (zh)
Other versions
CN114615321A (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

Landscapes

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

Abstract

The invention discloses a flow processing method and a flow processing device. Wherein the method comprises the following steps: responding to a flow transmission request sent by a first service node, and acquiring a loop-back address corresponding to a second service node, wherein the loop-back 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 service node based on the loop-back address; based on the physical address, a traffic transfer request is sent via the first proxy service node to the second service node. The invention solves the technical problem that the side car mode has larger influence on the service in the related technology.

Description

Flow processing method and device
Technical Field
The invention relates to the field of micro-service communication, in particular to a flow processing method and device.
Background
In the traditional micro-service communication mode, a service node in a server directly calls another service node through a transmission control protocol network (Transmission Control Protocol network, namely a TCP network), if a plurality of general functions such as current limiting, fusing and the like are added between service calls, a software development kit (Software Development Kit, namely an SDK) can be packaged to provide each service for reference based on the mode, but one function is not only developed once and is usually finished, and is often subjected to repeated iterative optimization and upgrading, and each iterative upgrading needs to actively upgrade the SDK by a service, so that the maintenance cost is increased, and the communication cost of basic service assembly personnel and service personnel is also increased. In addition, in some large enterprises, the technical stacks used are often diversified, such as static strong types, compiled languages (Go language), hypertext preprocessors (Personal Home Page, i.e., PHP), high-level programming languages (Java language), etc., and this approach results in that each basic function is developed and implemented based on multiple languages, which has high requirements on the technical stacks of the personnel responsible for the basic components and increases maintenance costs; moreover, the more basic functions, the greater the impact on traffic.
In view of the above problems, no effective solution has been proposed at present.
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 side car mode has a great influence on service in the related art.
According to an aspect of an embodiment of the present invention, there is provided a flow processing method, including: responding to a flow transmission request sent by a first service node, and acquiring a loop-back address corresponding to a second service node, wherein the loop-back 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 service node based on the loop-back address; based on the physical address, a traffic transfer request is sent via the first proxy service node to the second service node.
Optionally, based on the physical address, sending the traffic transmission request to the second service node via the first proxy service node includes: transmitting 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; forwarding the traffic transmission request 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 encoding the identification information based on the physical address of the first service node, and generating a loop-back address corresponding to the second service node.
Optionally, acquiring the loop address corresponding to the second service node includes: acquiring identification information of a second service node; the method comprises the steps of sending identification information to a target registry, wherein the target registry is used for inquiring a loop-back 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-back 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 service node based on the loop-back address includes: the method comprises the steps of sending a loop back address to a target registry through a first proxy service node, wherein the target registry is used for inquiring a physical address corresponding to the loop back 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 loop back address and the physical address; and receiving a physical address corresponding to the loop address fed back by the target registry through the first proxy service node.
According to another aspect of the embodiment of the present invention, there is also provided a flow processing apparatus, including: the first acquisition module is used for responding to a flow transmission request sent by the first service node, acquiring a loop address corresponding to the second service node, wherein the loop 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; a determining module, configured to determine a physical address of the second service node based on the ring address; and the control module is used for sending the traffic transmission request to the second service node through the first proxy service node based on the physical address.
Optionally, the control module includes: a first control unit, configured to send a traffic transmission request to a second proxy service node via a first proxy service node based on a physical address, where the physical address of the second proxy service node is the same as the physical address of the second service node; and the second control unit is used for forwarding the traffic transmission request to the second service node through 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 encoding module is used for encoding the identification information based on the physical address of the first service node and generating a loop-back address corresponding to the second service node.
According to another aspect of the embodiment of the present invention, there is further provided a computer readable storage medium, where the computer readable storage medium includes a stored program, and when the program runs, the device on which the computer readable storage medium is controlled to execute the above-mentioned flow processing method.
According to another aspect of the embodiment of the present invention, there is also provided a processor, configured to execute a program, where the program executes the above-mentioned flow processing method.
In the embodiment of the invention, a loop address corresponding to a second service node is acquired by responding to a traffic transmission request sent by the first service node, wherein the loop address is used for representing a local address of a first proxy service node which communicates with the second service node, the physical address of the first proxy service node is the same as the physical address 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 service node based on the loop-back address; based on the physical address, the mode of sending the flow transmission request to the second service node through the first proxy service node achieves the aim of switching from the traditional calling mode to the side car mode without influencing the service by adding the service registration center and the loop address technology, thereby realizing the technical effect of effectively reducing the influence of the side car mode on the service and further solving the technical problem of larger influence of the side car mode on the service in the related technology.
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 embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow diagram of a flow processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative conventional service communication scheme 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 invention;
FIG. 4 is a schematic diagram of an alternative flow hijacking overall process according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative ring address service identifier encoding in accordance with an embodiment of the present invention;
fig. 6 is a flow chart of steps of an alternative traffic hijacking scheme according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a traffic processor device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise 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 flow processing method, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system, such as a set of computer executable instructions, and, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order other than that shown or described herein.
Fig. 1 is a flow chart of a flow processing method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, a loop address corresponding to a second service node is obtained in response to a traffic transmission request sent by the first service node, wherein the loop address is used for representing a local address of a first proxy service node in communication with the second service node, the physical address of the first proxy service node is the same as the physical address of the first service node, and the traffic transmission request is used for requesting transmission of target traffic 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 nodes 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 a micro Service a (Service a), the second Service node may be a node of a micro Service B (Service B), and the first proxy Service node may be a node of a sidecar a (sidecar a).
The loop address in the above step, for example 127.0.0.1, commonly referred to as the local loop address (Loop back Address), does not belong to any category address class, and may represent a local virtual interface of the device, so the default is regarded as an interface that is never down, 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 (Internet Protocol Address, IP address), i.e. a network layer address used in the network.
In an alternative embodiment, after responding to the traffic transmission request sent by the first service node, the loop address of the second service node may be obtained, and since the loop address may be the address of the proxy service node obtained without affecting the service, no impact is caused on the service level.
In an alternative embodiment, in order to enable network communication, the scheme also relates to a registry, that is, when each micro server is started, information such as its own network address is registered in the registry, the registry stores the data, and a 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 network communication, after the sidecar architecture mode is set, in response to a traffic transmission request sent by the first service node, the registry automatically obtains a loopback address corresponding to the second service node, where the sidecar architecture mode may be an additional function added to the existing service, and these functions do not affect service logic.
In another alternative embodiment, after the first service node sends the traffic transmission request to the registry, the registry automatically invokes 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, determining the physical address of the second service node based on the loop-back address.
In an alternative embodiment, after the first service node obtains the ring address corresponding to the second service node, the first service node actually obtains the address of the first proxy service node capable of forwarding the request to the second service node, and the first proxy service node may query the physical address of the second service node according to the ring address and forward the request to the second service node according to the physical address. Optionally, the first proxy service node may send the ring back address to the registry, the registry may query the physical address of the second service node according to the ring back address of the second service node, and then the registry resends 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 a server where the second service node is located according to the physical address, when forwarding to the server where the second service node is located, it actually forwards the request 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 blown through a side car mode, so that when the traffic between the first service node and the second service node is abnormal, the traffic request between the first service node and the second service node may be processed in time, and since the first service node obtains the ring back address corresponding to the second service node, when forwarding to the server where the second service node is located, it is not required to forward the request directly to the second proxy service node corresponding to the second proxy service node, so that the traffic request between the first service node and the first service node may be affected.
Step S106, based on the physical address, sends the traffic transmission request to the second service node via the first proxy service node.
In an alternative embodiment, the first service node and the first proxy service node are located in the same server, and the second service node and the second proxy service node are located in another same server, so that in order to monitor traffic and timely process the traffic between the first service node and the second service node when the traffic between the first service node and the second service node is abnormal, the first service node may transmit a traffic transmission request of the first service node to the first proxy service node through a side car mode after acquiring a loop address of the first proxy service node, and the first proxy service node transmits the traffic transmission request to the server where the second service node is located based on the acquired physical address of the second proxy service node, so that the second proxy service node may forward the traffic transmission request to the second service node, and an effect that the first proxy service node transmits the traffic transmission request to the second service node on the premise of not affecting a traffic layer can be achieved.
According to the embodiment of the invention, firstly, a loop address corresponding to a second service node is obtained in response to a traffic transmission request sent by the first service node, wherein the loop address is used for representing a local address of a first proxy service node in communication 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 service node based on the loop-back address; based on the physical address, the mode of sending the flow transmission request to the second service node through the first proxy service node achieves the aim of switching from the traditional calling mode to the side car mode by adding the service registration center and the loop address technology, thereby realizing the technical effect of effectively reducing the influence of the side car mode on the service, and further solving the technical problem of larger influence of the side car mode on the service in the related technology.
Optionally, based on the physical address, sending the traffic transmission request to the second service node via the first proxy service node includes: transmitting 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; forwarding the traffic transmission request to the second service node via the second proxy service node.
The second agent service node may be a sidecar B (sidecar B).
In an optional embodiment, the first service node and the first proxy service node are located in the same server, the second service node and the second proxy service node are located in another same server, in order to monitor traffic and timely process traffic between the first service node and the second service node when the traffic is abnormal, the first service node may send a traffic transmission request to the first proxy service node through a side car mode, the first proxy service node sends the traffic transmission request to the 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 traffic transmission request to the second service node, so that the first proxy service node sends the traffic transmission request to the second service node on the premise of not affecting a service level.
Optionally, the method further comprises: acquiring identification information of a second service node; and encoding the identification information based on the physical address of the first service node, and generating a loop-back 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 according to his own requirement, which is not particularly limited in the present invention.
In an alternative embodiment, in order to implement a side car mode with a registration center and a loop address 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 the loop address corresponding to the second service node, so that the local service node may communicate with another local service node through the loop address.
Optionally, acquiring the loop address corresponding to the second service node includes: acquiring identification information of a second service node; the method comprises the steps of sending identification information to a target registry, wherein the target registry is used for inquiring a loop-back 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-back address; and receiving a loop address corresponding to the identification information and fed back by the target registration center.
The first preset corresponding relation table is used for reflecting the corresponding relation table between the identification information and the loop back address in one server, and can be set by a user in advance, multiple groups of corresponding relation data can be arranged in the first preset corresponding relation table, and the relation between the identification information and the loop back address is one-to-one correspondence.
The target registry may be a registry used when a primary server performs traffic transfer with another server.
In an alternative embodiment, in order to enable the first service node to communicate with the second service node through the loop 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 registry, then the target registry queries the loop address corresponding to the identification information of the second service node based on a first preset corresponding relation table set by a user in advance, after the loop address corresponding to the identification information of the second service node is obtained, the target registry sends the corresponding loop address to the first proxy service node, and then the first proxy service node can obtain the loop address corresponding to the identification information of the second service node fed back by the target registry.
Optionally, determining the physical address of the second service node based on the loop-back address includes: the method comprises the steps of sending a loop back address to a target registry through a first proxy service node, wherein the target registry is used for inquiring a physical address corresponding to the loop back 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 loop back address and the physical address; and receiving a physical address corresponding to the loop address fed back by the target registry through the first proxy service node.
The second preset corresponding relation table is used for reflecting the corresponding relation table between the loop address and the physical address in one server, and can be set by a user in advance, the first preset corresponding relation table can have a plurality of groups of corresponding relation data, and the relation between the loop address and the physical address is one-to-one correspondence.
In an alternative embodiment, in order to monitor traffic and timely process traffic between the first service node and the second service node when the traffic between the first service node and the second service node is abnormal, the first proxy service node may obtain the ring back address of the second service node, after obtaining the ring back address of the second service node, the first proxy service node sends the ring back address of the second service node to the target registry, the target registry queries a physical address corresponding to the ring back address of the second service node based on the second preset correspondence table, and then the target registry sends the physical address corresponding to the ring back address of the second service node obtained by the query to the first proxy service node, and then the first proxy service node may receive the physical address corresponding to the ring back address of the second service node fed back by the target registry.
The present embodiment is further explained below with reference to fig. 2 to 6:
fig. 2 shows a conventional service communication manner, that is, the micro service a directly calls the micro service B through the TCP network, which has a high requirement on the technical stack of the personnel responsible for the basic components, and increases the cost.
Fig. 3 shows a conventional side car communication mode, but the conventional side car communication mode cannot make the micro service a feel that the side car a is called actively and cannot make the side car a feel that the side car B is called.
Fig. 4 is a flow hijacking overall structure diagram of the present solution, mainly illustrating a method for obtaining, by a first service node, a ring address of a first proxy service node and a ring address of a second service node, a physical address of the second service node through a registry.
As shown in fig. 5, in order to enable a side car (side car) service to identify a destination service accessed by a first service node, it is necessary to encode a micro service and include the encoding in a loop address, that is, it is known to which micro service the request needs to be forwarded through the loop address, for example, the identification information of the micro service B is 2, and then the micro service a may forward the request to the micro service B through the side car service by accessing the loop address of the micro service B.
As shown in fig. 6, the specific flow includes the following steps:
step S601, the first service node adjusts the registration center to acquire the address of the second service node, the actually acquired address is the loop address of the first proxy service node, if the acquired address is acquired, the next step is entered, if the acquired address is not acquired, the step is repeated;
step S602: the registration center returns a loop address corresponding to the second service node, namely the registration center returns the loop address corresponding to the first proxy service node to the first service node;
step S603: the first service node sends the request to the address acquired according to the registry, and the request is actually sent to the first proxy service node;
step S604: the first proxy service node searches the actual address of the second service node according to the loop back address to the registry, 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 in fact returns the actual address of the second proxy service node;
step S606: the first proxy service node accesses the second proxy service node service 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 codecard, and the second proxy service node may be codecard. The invention realizes a set of traffic hijacking scheme without sensing service by using the service registration center and the loop address technology, and reduces the modification cost of modifying the side car mode by the traditional service mode.
Example 2
According to the embodiment of the present invention, a device for a flow processing method is provided, which can execute the flow processing method provided in the above embodiment 1, and a specific implementation manner and a preferred application scenario are the same as those of the above embodiment 1, and are not described herein.
Fig. 7 is a schematic structural diagram of a flow processing method device according to an embodiment of the present invention, as shown in fig. 7, the device includes: a first obtaining module 70, configured to obtain a loop address corresponding to a second service node in response to a traffic transmission request sent by the first service node, where the loop address is used to represent a local address of a first proxy service node that communicates with the second service node, and the physical address of the first proxy service node is the same as the physical address of the first service node, and the traffic transmission request is used to request transmission of a target traffic from the first service node to the second service node; a determining module 72, configured to determine a physical address of the second service node based on the loop-back address; the control module 74 is configured to send a traffic transmission request to the second service node via the first proxy service node based on the physical address.
Optionally, the control module further comprises: a first control unit, configured to send a traffic transmission request to a second proxy service node via a first proxy service node based on a physical address, where the physical address of the second proxy service node is the same as the physical address of the second service node; and the second control unit is used for forwarding the traffic transmission request to the second service node through 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 encoding module is used for encoding the identification information based on the physical address of the first service node and generating a loop-back address corresponding to the second service node.
Optionally, the second acquisition module includes: an obtaining unit, configured to obtain identification information of a second service node; the first sending unit is used for sending the identification information to the target registry, wherein the target registry is used for inquiring the loop-back 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-back address; and the first receiving unit is used for receiving the loop address corresponding to the identification information and fed back by the target registration center.
Optionally, the determining module includes a second sending unit, configured to send the ring back address to the target registry via the first proxy server node, where the target registry is configured to query a physical address corresponding to the ring back address based on a second preset correspondence table, and the second preset correspondence table is configured to represent a correspondence between the ring back address and the physical address; and the second receiving unit is used for receiving the physical address corresponding to the loop address fed back by the target registry through the first proxy service node.
Example 3
According to another aspect of the embodiments of the present invention, there is further provided a computer readable storage medium, where the computer readable storage medium includes a stored program, and when the program runs, the device in which the computer readable storage medium is controlled to execute the flow processing method described in embodiment 1.
Example 4
According to another aspect of the embodiment of the present invention, there is further provided a processor, configured to execute a program, where the program executes the flow processing method described in embodiment 1.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform 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, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (10)

1. A flow processing method, comprising:
responding to a flow transmission request sent by a first service node, and acquiring a loop-back address corresponding to a second service node, wherein the loop-back 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 service node based on the loop-back address;
the traffic transmission request is sent to the second service node via the first proxy service node based on the physical address of the second service 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:
transmitting 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 is 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 according to claim 1, wherein the method further comprises:
acquiring the identification information of the second service node;
and encoding the identification information based on the physical address of the first service node, and generating the loop-back address corresponding to the second service node.
4. A method according to claim 3, wherein obtaining the ring address corresponding to the second service node comprises:
acquiring the identification information of the second service node;
the identification information is sent to a target registry, wherein the target registry is used for inquiring the loop-back 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-back address;
and receiving the loop-back address corresponding to the identification information and fed back by the target registry.
5. The method of claim 4, wherein determining the physical address of the second serving node based on the loop-back address comprises:
the loop-back address is sent to the target registry through the first proxy service node, wherein the target registry is used for inquiring the physical address corresponding to the loop-back 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 loop-back address and the physical address;
and receiving the physical address corresponding to the loop-back address fed back by the target registry through the first proxy service node.
6. A flow processing apparatus, comprising:
the first acquisition module is used for responding to a traffic transmission request sent by a first service node, acquiring a loop-back address corresponding to a second service node, wherein the loop-back 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 traffic transmission request is used for requesting to transmit target traffic from the first service node to the second service node;
a determining module, configured to determine a physical address of the second service node based on the loopback address;
and the control module is used for sending the traffic transmission request to the second service node through the first proxy service node based on the physical address of the second service node.
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, where the physical address of the second proxy service node is the same as the physical address of the second service node;
and the second control unit is used for forwarding the traffic transmission request to the second service node through the second proxy service node.
8. The apparatus of claim 6, wherein the apparatus further comprises:
the second acquisition module is used for acquiring the identification information of the second service node;
and the encoding module is used for encoding the identification information based on the physical address of the first service node and generating the loop-back address corresponding to the second service node.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the computer-readable storage medium is located to perform the flow processing method according to any one of claims 1 to 5.
10. A processor for running a program, wherein the program when run performs the flow processing method of any one of claims 1 to 5.
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 CN114615321A (en) 2022-06-10
CN114615321B true 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)

Families Citing this family (1)

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

Citations (9)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10705856B2 (en) * 2018-03-28 2020-07-07 Ebay Inc. Network address management systems and methods

Patent Citations (9)

* 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
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
基于软件定义网络的流量工程;周桐庆;《软件学报》;全文 *

Also Published As

Publication number Publication date
CN114615321A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
JP3966598B2 (en) Server selection system
JP5726991B2 (en) Communication network
CN105939365B (en) Master control borad User space obtains the method and device of data from business intralaminar nuclei state
CA2403769A1 (en) Processing network communication control messages
CN108958949B (en) Calling method and system of application program
CN108366356B (en) Method and device for intercommunication between M2M system and identification analysis system
CN111327668B (en) Network management method, device, equipment and storage medium
CN114615321B (en) Flow processing method and device
CN106970843B (en) Remote calling method and device
US12074758B2 (en) Method for configuring a terminal device
JP2000003322A (en) Transmission device/method in communication network
US20080281969A1 (en) Controlling access to versions of application software by a server, based on site ID
US7218714B2 (en) Method of calling service among devices in home network
NO323264B1 (en) terminal administrator for access to multiple heterogeneous telecommunications networks
US20040172441A1 (en) Systems and methods for defining conversation information for web-services
US20050267984A1 (en) Method and apparatus for interoperability and relay for WV and IMS group management services
KR100947114B1 (en) Method for collecting quality data of web service using dummy message
Cisco Configuring LAT
Cisco Configuring LAT
Cisco Configuring LAT
Cisco Configuring LAT
Cisco Configuring LAT
CN106330708A (en) Local DNS service system and method
JP5569105B2 (en) Network terminal management system, network terminal management method, network terminal management program
CN105827567A (en) Service control method and capability opening platform

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