CN116846896A - Message processing method, device, physical machine and storage medium - Google Patents

Message processing method, device, physical machine and storage medium Download PDF

Info

Publication number
CN116846896A
CN116846896A CN202311120616.8A CN202311120616A CN116846896A CN 116846896 A CN116846896 A CN 116846896A CN 202311120616 A CN202311120616 A CN 202311120616A CN 116846896 A CN116846896 A CN 116846896A
Authority
CN
China
Prior art keywords
address
response message
load balancer
port number
physical machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311120616.8A
Other languages
Chinese (zh)
Inventor
田文杰
郑王力
赵维五
王宪良
李文龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
AVIC INTERNATIONAL E-BUSINESS Inc
Original Assignee
AVIC INTERNATIONAL E-BUSINESS Inc
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 AVIC INTERNATIONAL E-BUSINESS Inc filed Critical AVIC INTERNATIONAL E-BUSINESS Inc
Priority to CN202311120616.8A priority Critical patent/CN116846896A/en
Publication of CN116846896A publication Critical patent/CN116846896A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Landscapes

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

Abstract

The embodiment of the application provides a message processing method, a message processing device, a physical machine and a storage medium, wherein the method comprises the following steps: receiving a request message sent by a load balancer; responding to the request message and generating a response message; in the process of sending the response message, if the response message reaches a preset mounting point of a kernel packet sending path, rewriting a source IP address of the response message into a virtual IP address of a load balancer, and rewriting a source port number into a virtual port number of the load balancer to obtain a target response message; and sending a target response message. The physical machine can rewrite the source IP address and the source port of the response message into the virtual IP address and the virtual port number of the load balancer to obtain the target response message, and then directly send the target response message to the client without forwarding through the load balancer, so that the number of messages forwarded by the load balancer is reduced, the problem that the load balancer is easy to become a performance bottleneck is solved, and the message processing efficiency is improved.

Description

Message processing method, device, physical machine and storage medium
Technical Field
The present application relates to the field of network communications technologies, and in particular, to a method and apparatus for processing a message, a physical machine, and a storage medium.
Background
The current service platform generally provides services to the outside based on virtual server cluster systems such as LVS (Linux Virtual Server ) and the like. When the client requests service to the virtual server cluster system, the load balancer receives a request message sent by the client and aiming at the service request, and distributes a physical machine responding to the request message based on a load balancing algorithm, wherein the physical machine responds to the request message distributed by the load balancer. The virtual server cluster system has a plurality of working modes, wherein the NAT (Network Address Translation ) mode is a working mode which is widely applied.
In NAT mode, after receiving request message of client for service request, load balancer forwards the request message to a physical machine, when the physical machine generates response message for the request message, the response message is sent to load balancer, and then the load balancer forwards the response message to client so as to provide service requested by the client.
The above process can show that the load balancer needs to forward the request message to the physical machine and the response message to the client, so that the load balancer is easy to cause the message Wen Jiaoduo to be forwarded under the condition that the request message of the request service is more, and the load balancer becomes the performance bottleneck of the virtual server cluster system, and the message processing efficiency is low.
Disclosure of Invention
The embodiment of the application aims to provide a message processing method, a device, a physical machine and a storage medium, so as to improve the message processing efficiency. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for processing a message, which is applied to a physical machine in a virtual server cluster system, where the method includes:
receiving a request message sent by a load balancer, wherein the request message comprises: the IP address and port number of the client requesting the service;
responding to the request message and generating a response message, wherein the source IP address of the response message is the IP address of the physical machine, the source port number is the port number of the physical machine, the destination IP address is the IP address of the client, and the destination port number is the port number of the client;
sending the response message according to the kernel packet sending path;
in the process of sending the response message, if the response message reaches a preset mounting point of the kernel packet sending path, rewriting a source IP address of the response message into a virtual IP address of the load balancer and rewriting a source port number into a virtual port number of the load balancer to obtain a target response message;
And sending the target response message.
Optionally, the preset mounting point is provided with an information rewriting hook function;
if the response message reaches the preset mounting point of the kernel packet sending path, rewriting a source IP address of the response message into a virtual IP address of the load balancer and rewriting a source port number into a virtual port number of the load balancer, so as to obtain a target response message, including:
and if the information rewriting hook function is called, rewriting the source IP address of the response message into the virtual IP address of the load balancer and rewriting the source port number into the virtual port number of the load balancer through the information rewriting hook function to obtain a target response message.
Optionally, the preset mounting point is tc egress.
Optionally, a packet sending program for sending a message is running on the physical machine, and the sending the target response message includes:
and calling the package sending program to send the target response message.
Optionally, the rewriting the source IP address of the response packet to the virtual IP address of the load balancer and the source port number to the virtual port number of the load balancer includes:
Judging whether a target address port pair exists in a corresponding relation between a pre-stored address port pair of a physical machine and an address port pair of a load balancer, wherein the address port pair comprises: IP address and port number, the destination address port pair comprising: the source IP address and the source port number of the response message;
if the address port pair exists, searching an address port pair of the load balancer corresponding to the target address port pair from the corresponding relation;
and rewriting the source IP address of the response message into the IP address in the searched address port pair, and rewriting the source port number into the port number in the searched address port pair.
Optionally, the corresponding relationship is stored by adopting a key-value data structure, wherein a key value in the key-value comprises: the IP address and port number of the physical machine, the value includes: virtual IP address and virtual port number of the load balancer.
Optionally, before the receiving the request message sent by the load balancer, the method further includes:
and after a packet sending program running on the physical machine receives a creation notification sent by the load balancer, the corresponding relation is created by calling an ebpf API interface through the packet sending program.
Optionally, the method further comprises:
when a packet sending program running on the physical machine receives a deletion notification sent by the load balancer, calling an ebpf API interface through the packet sending program to delete the corresponding relation, wherein the deletion notification is sent by the load balancer when a downlink instruction for the physical machine is received.
In a second aspect, an embodiment of the present application provides a packet processing device, which is applied to a physical machine in a virtual server cluster system, where the device includes:
the receiving module is configured to receive a request packet sent by the load balancer, where the request packet includes: the IP address and port number of the client requesting the service;
the response module is used for responding to the request message and generating a response message, wherein the source IP address of the response message is the IP address of the physical machine, the source port number is the port number of the physical machine, the destination IP address is the IP address of the client, and the destination port number is the port number of the client;
the first sending module is used for sending the response message according to the kernel packet sending path;
the rewriting module is used for rewriting a source IP address of the response message into a virtual IP address of the load balancer and rewriting a source port number into a virtual port number of the load balancer in the process of sending the response message if the response message reaches a preset mounting point of the kernel packet sending path, so as to obtain a target response message;
And the second sending module is used for sending the target response message.
Optionally, the preset mounting point is provided with an information rewriting hook function;
the rewriting module is specifically configured to rewrite, when the information rewriting hook function is called, a source IP address of the response message to a virtual IP address of the load balancer and a source port number to a virtual port number of the load balancer through the information rewriting hook function, so as to obtain a target response message.
Optionally, the preset mounting point is tc egress.
Optionally, a packet sending program for sending the message is run on the physical machine;
the second sending module is specifically configured to invoke the packet sending program to send the target response message.
Optionally, the rewriting module includes:
a judging unit, configured to judge whether a target address port pair exists in a correspondence between a pre-stored address port pair of a physical machine and an address port pair of a load balancer, where the address port pair includes: IP address and port number, the destination address port pair comprising: the source IP address and the source port number of the response message;
an address port pair searching unit, configured to find, in a correspondence between a pre-stored address port pair of a physical machine and an address port pair of a load balancer, a target address port pair, from the correspondence, an address port pair of the load balancer corresponding to the target address port pair;
And the rewriting unit is used for rewriting the source IP address of the response message into the IP address in the searched address port pair and rewriting the source port number into the port number in the searched address port pair.
Optionally, the corresponding relationship is stored by adopting a key-value data structure, wherein a key value in the key-value comprises: the IP address and port number of the physical machine, the value includes: virtual IP address and virtual port number of the load balancer.
Optionally, the apparatus further includes:
and the corresponding relation creation module is used for creating the corresponding relation by calling an ebpf API interface through the packet sending program after the packet sending program running on the physical machine receives the creation notification sent by the load balancer before receiving the request message sent by the load balancer.
Optionally, the apparatus further includes:
and the corresponding relation deleting module is used for deleting the corresponding relation by calling an ebpf API interface through the package issuing program when the package issuing program running on the physical machine receives a deleting notification sent by the load balancer, wherein the deleting notification is sent by the load balancer when receiving a downlink instruction aiming at the physical machine.
In a third aspect, an embodiment of the present application provides a physical machine, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method according to any one of the first aspect when executing a program stored in the memory.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having a computer program stored therein, which when executed by a processor implements the method of any of the first aspects.
The embodiment of the application has the beneficial effects that:
in the scheme provided by the embodiment of the application, a physical machine in a virtual server cluster system can receive a request message sent by a load balancer, wherein the request message comprises: the IP address and port number of the client requesting the service; responding to the request message and generating a response message, wherein the source IP address of the response message is the IP address of the physical machine, the source port number is the port number of the physical machine, the destination IP address is the IP address of the client, and the destination port number is the port number of the client; sending a response message according to the kernel packet sending path; in the process of sending the response message, if the response message reaches a preset mounting point of a kernel packet sending path, rewriting a source IP address of the response message into a virtual IP address of a load balancer, and rewriting a source port number into a virtual port number of the load balancer to obtain a target response message; and sending a target response message. After the physical machine responds to the request message and generates a response message, when the response message reaches a preset mounting point of a kernel packet sending path, the source IP address and the source port number of the response message are rewritten into the virtual IP address and the virtual port number of the load balancer to obtain a target response message, and then the target response message is directly sent to the client, so that the response message does not pass through the load balancer, the message which the load balancer needs to forward is reduced, the problem that the load balancer is easy to become a performance bottleneck of the virtual server cluster system is solved, and the message processing efficiency is improved.
Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the application, and other embodiments may be obtained according to these drawings to those skilled in the art.
FIG. 1 is a flow chart of a message processing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a workflow of a virtual server cluster system with NAT mode operation;
FIG. 3 is a schematic diagram of a workflow of a virtual server cluster system based on the embodiment shown in FIG. 1;
FIG. 4 is a flow chart of a message rewriting method based on the embodiment shown in FIG. 1;
FIG. 5 is a schematic diagram of a message processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a physical machine according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
In order to improve the message processing efficiency, the embodiment of the application provides a message processing method, a device, a physical machine, a computer readable storage medium and a computer program product, and the message processing method provided by the embodiment of the application is first described below.
The message processing method provided by the embodiment of the application can be applied to the physical machines in the virtual server cluster system, and is called as the physical machines for the sake of clarity.
As shown in fig. 1, a method for processing a message includes:
s101, receiving a request message sent by a load balancer;
wherein, the request message includes: the IP address and port number of the client requesting the service;
s102, responding to the request message and generating a response message;
the source IP address of the response message is the IP address of the physical machine, the source port number is the port number of the physical machine, the destination IP address is the IP address of the client, and the destination port number is the port number of the client;
s103, sending the response message according to a kernel packet sending path;
s104, in the process of sending the response message, if the response message reaches a preset mounting point of the kernel packet sending path, rewriting a source IP address of the response message into a virtual IP address of the load balancer and rewriting a source port number into a virtual port number of the load balancer to obtain a target response message;
S105, the target response message is sent.
In the scheme provided by the embodiment of the application, after the physical machine responds to the request message and generates the response message, when the response message reaches the preset mounting point of the kernel packet sending path, the source IP address and the source port number of the response message are rewritten to the virtual IP address and the virtual port number of the load equalizer respectively to obtain the target response message, and then the target response message is directly sent to the client, so that the response message does not pass through the load equalizer, the message which needs to be forwarded by the load equalizer is reduced, the problem that the load equalizer is easy to become the performance bottleneck of the virtual server cluster system is solved, and the message processing efficiency is improved.
When the client requests the service from the virtual server cluster system, the client may send a request message for the service request to the virtual server cluster system, and a load balancer in the virtual server cluster system may be configured to receive the request message sent by the client, determine a physical machine for responding to the request message based on a load balancing algorithm, and forward the request message to the physical machine for processing, where the physical machine may receive the request message sent by the load balancer, and then execute the step S101.
The request message may include an IP address and a port number of the client that requests the service, for example, the source IP address of the request message is the IP address of the client, the source port number is the port number of the client, and further, the destination IP address of the request message may be a virtual IP address of the load balancer, and the source port number is a virtual port number of the load balancer.
The load balancer in the virtual server cluster system is a device or a process for analyzing an incoming request and transferring the incoming request to an associated physical machine, which may be a physical device in a network or a virtualized instance running on dedicated hardware, and is not specifically limited herein.
After receiving the request message, the physical machine may respond to the request message based on its corresponding processing resource, storage resource, etc., and generate a response message, that is, execute the step S102. The source IP address of the response message is the IP address of the physical machine, the source port number is the port number of the physical machine, the destination IP address is the IP address of the client, and the destination port number is the port number of the client.
In one embodiment, since the two ends of the connection, that is, the client and the physical machine, will produce a socket (socket), in which the socket records connection information such as a source IP address, a destination IP address, a source port number, and a destination port number, and therefore, after responding to a request message to obtain response data, when the response data passes through the kernel of the physical machine, the source IP address, the destination IP address, the source port number, and the destination port number recorded in the socket will be encapsulated on the response data, thereby obtaining a response message.
After generating the response message, the physical machine may send the response message according to the kernel packet sending path, that is, execute the step S103. In this process, because the source IP address of the response packet is the IP address of the physical machine and the source port number is the port number of the physical machine, and when the virtual server cluster system provides the service to the outside, only the virtual IP address and the virtual port number corresponding to the load balancer are exposed to the outside, and the IP address and the port number of each physical machine in the virtual server cluster system are not exposed to the outside, the physical machine needs to rewrite the source IP address and the source port number in the response packet before sending the response packet to the client, so as to avoid exposing the IP address and the port number of the physical machine.
Therefore, a message rewriting function may be set at a preset mounting point on the kernel packet sending path of the physical machine, so that when the physical machine sends a response message according to the kernel packet sending path, if the response message reaches the preset mounting point of the kernel packet sending path, the corresponding message rewriting function may be triggered, and the source IP address of the response message is rewritten to the virtual IP address of the load balancer, and the source port number is rewritten to the virtual port number of the load balancer, so as to obtain a target response message, that is, the step S104 is executed. The source IP address of the target response message obtained after the rewriting operation is the virtual IP address of the load balancer, the source port number is the virtual port number of the load balancer, the destination IP address is the IP address of the client, and the destination port number is the port number of the client.
After the physical machine finishes executing the step S104, because the destination IP address of the target response packet is still the IP address of the client and the destination port number is the port number of the client, the physical machine may send the target response packet to the client based on the destination IP address and the destination port number in the target response packet when sending the target response packet, thereby providing the requested service for the client. And because the source IP address of the target response message is the virtual IP address of the load balancer and the source port number is the virtual port number of the load balancer, the physical machine sends the target response message to the client, and the IP address and the port number of the physical machine in the virtual server cluster system are not exposed. Therefore, after obtaining the target response message, the physical machine may execute step S105 to send the target response message.
In the scheme provided by the embodiment of the application, after the physical machine responds to the request message and generates the response message, when the response message reaches the preset mounting point of the kernel packet sending path, the source IP address and the source port number of the response message are rewritten to the virtual IP address and the virtual port number of the load equalizer respectively to obtain the target response message, and then the target response message is directly sent to the client, so that the response message does not pass through the load equalizer, the message which needs to be forwarded by the load equalizer is reduced, the problem that the load equalizer is easy to become the performance bottleneck of the virtual server cluster system is solved, and the message processing efficiency is improved.
As an implementation manner of the embodiment of the present application, the working mode of the virtual server cluster system is NAT mode.
When the working mode of the virtual server cluster system is NAT mode, as shown in fig. 2, when the client 210 requests a service to the virtual server cluster system 220, a request message may be sent to the virtual server cluster system 220 for the service request, and because the IP address and the port number exposed by the virtual server cluster system 220 are the IP address and the port number of the load balancer 2201, the source IP address of the request message is the IP address of the client 210, the source port number is the port number of the client 210, the destination IP address is the virtual IP address of the load balancer 2201, and the source port number is the virtual port number of the load balancer 2201, and accordingly, the client 210 sends the request message to the virtual server cluster system 220, and the load balancer 2201 in the virtual server cluster system 220 receives the request message.
After the load balancer 2201 receives the request packet sent by the client 210, a physical machine for processing the request packet may be determined from the physical machines 2202 included in the virtual server cluster system 220 according to a scheduling algorithm, and assuming that the physical machine for processing the request packet is the physical machine 1, the load balancer 2201 may rewrite the destination IP address of the request packet from the virtual IP address of the load balancer 2201 to the IP address of the physical machine 1, rewrite the destination port number of the request packet from the virtual port number of the load balancer 2201 to the port number of the physical machine 1, and then the load balancer 2201 may forward the rewritten request packet to the physical machine 1.
After receiving the request message, the physical machine 1 may generate a response message for the request message. Since the next-hop devices of the physical machine 2202 are all set as the load balancer 2201 in the NAT mode, after generating a response packet, the physical machine 1 may send the response packet to the load balancer 2201, where the source IP address of the response packet is the IP address of the physical machine 1, the source port number is the port number of the physical machine 1, the destination IP address is the IP address of the client 210, and the destination port number is the port number of the client 210.
After receiving the response message, the load balancer 2201, because the source IP address of the response message is the IP address of the physical machine 1 and the source port number is the port number of the physical machine 1, if the response message is directly forwarded to the client 210, on one hand, exposes the IP address and the port number of the physical machine 1 to the client 210, and on the other hand, the client 210 may also fail to identify the response message as the response content corresponding to the request message because the destination IP address and the destination port number of the request message are inconsistent with the IP address and the port number of the response message, so that an error occurs. Therefore, after the load balancer 2201 receives the response message, the source IP address of the response message may be rewritten to the virtual IP address and the source port number of the load balancer 2201, and then rewritten to the virtual port number of the load balancer 2201 according to the connection session recorded when the request message is rewritten, and the rewritten response message is forwarded to the client 210, so as to provide the requested service for the client.
The above process can show that the load balancer needs to forward the request message to the physical machine and the response message to the client, so that the load balancer is easy to cause the message Wen Jiaoduo to be forwarded under the condition that the request message of the request service is more, and the load balancer becomes the performance bottleneck of the virtual server cluster system, and the message processing efficiency is low.
The scheme provided by the embodiment of the present application is that the sending manner of the response message is improved based on the NAT mode, and the workflow of the improved virtual server cluster system may be as shown in fig. 3, where the process that the client 210 sends the request message to the virtual server cluster system 220, and the load balancer 2201 rewrites the request message, and forwards the rewritten request message to the physical machine 1 is similar to the process that the client 210 sends the request message to the virtual server cluster system 220 in the workflow of the virtual server cluster system 220 in the NAT mode, and the process that the load balancer 2201 rewrites the request message, and forwards the rewritten request message to the physical machine 1, and the difference between them is that the load balancer 2201 does not need to record a connection session when rewriting the request message, so that details are not repeated.
After receiving the request message, the physical machine 1 may generate a response message for the request message and send the response message according to a kernel packet sending path, where a source IP address of the response message is an IP address of the physical machine 1, a source port number is a port number of the physical machine 1, a destination IP address is an IP address of the client 210, and a destination port number is a port number of the client 210.
When the response message reaches the preset mounting point of the kernel packet sending path, the physical machine 1 may rewrite the source IP address of the response message to the virtual IP address of the load balancer 2201, and rewrite the source port number to the virtual port number of the load balancer 2201, so as to obtain the target response message. Because the source IP address of the target response message is the virtual IP address of the load balancer and the source port number is the virtual port number of the load balancer, sending the target response message to the client by the physical machine does not expose the IP address and the port number of the physical machine in the virtual server cluster system. Therefore, after obtaining the target response message, the physical machine may directly send the target response message to the client 210.
In the scheme provided by the embodiment of the application, the mode of sending the response message by the physical machine of the virtual server cluster system with the NAT mode is improved, after the physical machine responds to the request message and generates the response message, when the response message reaches the preset mounting point of the kernel packet sending path, the source IP address and the source port number of the response message are rewritten into the virtual IP address and the virtual port number of the load balancer respectively to obtain the target response message, and then the target response message is directly sent to the client, so that the response message does not pass through the load balancer, the message which needs to be forwarded by the load balancer is reduced, the problem that the load balancer easily becomes the performance bottleneck of the virtual server cluster system is solved, and the message processing efficiency is improved.
Compared with the existing TUN (tunnel) mode and DR (Direct Routing) mode, although the working mode of the virtual server cluster system is TUN mode or DR mode, the response message does not need to pass through the load balancer, so that the problem that the load balancer easily becomes a performance bottleneck of the virtual server cluster system can be solved, and the message processing efficiency is improved. However, for TUN mode, this mode requires that all physical machines must support either the "IP tunneling" protocol or the "IP encapsulation" protocol, and because of the need for message encapsulation, the valid data portion carried in the transport protocol is occupied by the encapsulated header. In the scheme provided by the embodiment of the application, the physical machine is not required to support the IP tunneling protocol or the IP encapsulation protocol, so that the physical machine is not required, and the effective data part carried in the transmission protocol is not occupied by the encapsulated header because the message encapsulation is not required.
For the DR mode, the mode requires that the physical machine and the load equalizer are in a two-layer network, so that the topology expansibility of the network is limited, but in the scheme provided by the embodiment of the application, the physical machine and the load equalizer are not required to be in the two-layer network, and only three layers of the modes can be achieved, namely, the physical machine and the load equalizer can communicate through IP addresses, and the topology expansibility of the network is not limited.
As an implementation manner of the embodiment of the present application, the preset mounting point may be mounted with an information rewriting hook function;
if the response message reaches the preset mounting point of the kernel packet sending path, rewriting the source IP address of the response message to be the virtual IP address of the load balancer and rewriting the source port number to be the virtual port number of the load balancer, to obtain a target response message may include:
and if the information rewriting hook function is called, rewriting the source IP address of the response message into the virtual IP address of the load balancer and rewriting the source port number into the virtual port number of the load balancer through the information rewriting hook function to obtain a target response message.
The information rewriting hook function can be mounted at a preset mounting point on a kernel packet sending path of the physical machine, so that when an event occurs at the preset mounting point, the information rewriting hook function is called, and correspondingly, when the information rewriting hook function is called, the source IP address of the response message can be rewritten to be the virtual IP address of the load equalizer, and the source port number can be rewritten to be the virtual port number of the load equalizer through the information rewriting hook function, so that the target response message is obtained.
In one embodiment, the preset mounting point may be tc egress, the physical machine may determine, based on eBPF (Extended Berkeley Packet Filter), whether the information rewrite Hook function mounted by tc egress is called, specifically, tc egress may be provided with a Hook point, for example: the dynamic kernel mode probe, the eBPF can monitor a specific event in the kernel through a Hook point set at tc egress, namely, a response message reaches tc egress event, if the specific event occurs, user-defined processing can be executed, namely, an information rewriting Hook function is called, and the source IP address of the response message is rewritten into the virtual IP address of the load equalizer and the source port number is rewritten into the virtual port number of the load equalizer through the information rewriting Hook function, so that a target response message is obtained.
In the scheme provided by the embodiment of the application, the hook function can be rewritten by mounting information at the preset mounting point on the kernel packet sending path of the physical machine, so that when the physical machine sends a response message according to the kernel packet sending path to reach the preset mounting point, the source IP address of the response message can be rewritten into the virtual IP address of the load equalizer and the source port number can be rewritten into the virtual port number of the load equalizer by calling the information rewrite hook function, thereby avoiding exposing the IP address and the port number of the physical machine and ensuring the consistency of the source IP address and the source port number of the response message sent from the virtual server cluster system.
As an implementation manner of the embodiment of the present application, the physical machine may be running with a packet sending program for sending a packet, and the sending the target response packet may include:
and calling the package sending program to send the target response message.
In the scheme provided by the embodiment of the application, the physical machine does not forward the response message to the load equalizer, and the load equalizer forwards the response message to the client, but the physical machine sends the response message to the client, so that a packet sending program for sending the message can be run on the physical machine in advance. Thus, after the physical machine rewrites the response message to obtain the target response message, the package sending program can be called to send the target response message.
In one embodiment, the foregoing packet sending program may be a webserver program, and because the webserver program may be used to process an HTTP request packet from a client, match the request packet with a resource on a server to generate a response packet, and send the response packet to the client, when the webserver program is running on the physical machine, the physical machine responds to a service request of the client to generate the response packet, and rewrites the response packet to obtain a target response packet, and then may send the target response packet to the client through a function of the webserver program to send the response packet to the client, thereby providing the service requested by the client.
In the scheme provided by the embodiment of the application, the physical machine can run a packet sending program for sending the message, so that the physical machine can send the target response message to the client by calling the packet sending program after responding to the service request of the client to generate the response message and rewriting the response message to obtain the target response message, thereby providing the requested service for the client.
As shown in fig. 4, the above-mentioned rewriting the source IP address of the response packet to the virtual IP address of the load balancer and the source port number to the virtual port number of the load balancer may include:
s401, judging whether a target address port pair exists in the corresponding relation between the address port pair of the pre-stored physical machine and the address port pair of the load balancer;
the correspondence relationship between the IP address of the load balancer and the IP address of each physical machine in the virtual server cluster system and the correspondence between the port number of the load balancer and the port number of each physical machine are stored in the correspondence relationship, wherein the IP address and the port number of one device are corresponding, so that a port pair including the IP address and the port number address can be generated by the IP address and the port number of one device, and then the correspondence relationship between the address port pairs of each device, namely, the correspondence relationship between the address port pairs of the physical machines and the address port pairs of the load balancer is established.
In this case, when the physical machine rewrites the source IP address of the response message to the virtual IP address of the load balancer and the source port number to the virtual port number of the load balancer, it may be determined whether or not there is a target address port pair in the correspondence relationship between the address port pair of the physical machine and the address port pair of the load balancer stored in advance in the physical machine. That is, when the physical machine performs the rewrite operation, it may be determined whether the source IP address and the source port number of the response message exist in the pre-stored correspondence, that is, whether the source IP address and the source port number of the response message can be rewritten based on the correspondence, and if so, step S402 may be executed.
If not, the response message can be sent to the load balancer, and the load balancer forwards the response message to the client, or outputs prompt information and the like.
S402, searching an address port pair of the load balancer corresponding to the target address port pair from the corresponding relation;
if there is a target address port pair in the correspondence between the address port pair of the physical machine and the address port pair of the load balancer stored in advance in the physical machine, it is explained that the physical machine can rewrite the source IP address and the source port number of the response message based on the correspondence, so that the physical machine can check the address port pair of the load balancer corresponding to the target address port pair from the correspondence.
S403, rewriting the source IP address of the response message into the IP address in the searched address port pair, and rewriting the source port number into the port number in the searched address port pair.
After the physical machine finds the address port pair of the load balancer corresponding to the target address port pair, that is, after the address port pair of the load balancer in the virtual server cluster system where the physical machine is located is found, the source IP address of the response message may be rewritten to the IP address in the found address port pair and the source port number may be rewritten to the port number in the found address port pair, that is, the source IP address of the response message may be rewritten to the IP address of the load balancer and the source port number may be rewritten to the port number of the load balancer.
In the scheme provided by the embodiment of the application, when the physical machine rewrites the source IP address and the source port number of the response message, whether the rewriting operation can be executed or not can be judged based on the corresponding relation between the address port pair of the pre-stored physical machine and the address port pair of the load equalizer, if the rewriting operation can be executed, the source IP address and the source port number of the response message can be rewritten based on the address port pair of the load equalizer in the corresponding relation, if the rewriting operation cannot be executed, the response message can be sent to the load equalizer, the response message is forwarded to the client by the load equalizer, or prompt information and the like are output, so that the success rate of providing the requested service for the client is ensured.
As an implementation manner of the embodiment of the present application, the foregoing correspondence may be stored by using a key-value data structure, where a key value in the key-value includes: the IP address and port number of the physical machine, the value includes: virtual IP address and virtual port number of the load balancer.
The key value is the address port pair of the physical machine, and the value is the address port pair of the load balancer. The key value and the value may also be generated by a custom function or a list, which is not limited herein.
After obtaining each key value corresponding to each physical machine and each value corresponding to the load balancer in the virtual server cluster system, a key-value data structure can be established according to each key value corresponding to each physical machine and each value corresponding to the load balancer, wherein each key value corresponding to each physical machine in the key-value data structure corresponds to the value corresponding to the load balancer.
Correspondingly, when the corresponding relation is stored by adopting a key-value data structure, in judging whether a target address port pair exists in the corresponding relation between the address port pair of the pre-stored physical machine and the address port pair of the load balancer, a key value to be matched can be generated according to a source IP address and a source port number of a response message in the same key value generation mode when the key-value data structure is created, and then whether the key value to be matched exists in the key-value data structure is judged, so that whether the target address port pair exists in the corresponding relation between the address port pair of the pre-stored physical machine and the address port pair of the load balancer is judged.
In the corresponding relation, the address port pair of the load balancer corresponding to the target address port pair is searched, which may be that a value corresponding to a key value to be matched in a key-value is determined, and the value is used as the address port pair of the load balancer corresponding to the target address port pair.
In the scheme provided by the embodiment of the application, the physical machine can adopt the key-value data structure to store the corresponding relation between the address port pair of the physical machine and the address port pair of the load equalizer, so that the physical machine can realize quick inquiry when judging whether the corresponding relation between the address port pair of the pre-stored physical machine and the address port pair of the load equalizer exists or not and searching the address port pair of the load equalizer corresponding to the target address port pair from the corresponding relation.
As an implementation manner of the embodiment of the present application, before the receiving the request packet sent by the load balancer, the method further includes:
and after a packet sending program running on the physical machine receives a creation notification sent by the load balancer, the corresponding relation is created by calling an ebpf API interface through the packet sending program.
After the physical machine determines that the packet sending program running on the physical machine receives the creation notification sent by the load balancer, the physical machine can determine the corresponding relation between the address port pair of the load balancer to be created and the address port pair of the physical machine, and at this time, the physical machine can create the corresponding relation by calling the ebpf API interface through the packet sending program.
In one embodiment, the creation notification sent by the load balancer may include a virtual IP address and a virtual port number of the load balancer, so after receiving the creation notification, the packet sending program may call the ebpf API through the packet sending program according to the virtual IP address and the virtual port number of the load balancer and the IP address and the port number of the physical machine included in the creation notification, and create a correspondence between an address port pair of the physical machine and an address port pair of the load balancer on the physical machine.
In another embodiment, because the load balancer needs to forward the request message to the physical machine after receiving the request message sent by the client, the load balancer also needs to create a correspondence between the address port pair of the physical machine and the address port pair of the load balancer, for example, the load balancer may configure the correspondence between the address port pair of the physical machine and the address port pair of the load balancer through the ipvssadm tool. Therefore, the creation notification sent by the load balancer may include the correspondence relationship, so that after receiving the creation notification, the packet sending program may call the ebpf API interface through the packet sending program according to the correspondence relationship included in the creation notification, and create a correspondence relationship between the address port pair of the physical machine and the address port pair of the load balancer on the physical machine.
The load balancer sends the creation notification to the packet sending program running on the physical machine, which may be sent when the virtual server cluster system is created, or may be sent when the existing virtual server cluster system improves the sending manner of the response message, or may be sent when a new physical machine joins the virtual server cluster system, which is not limited herein.
In the scheme provided by the embodiment of the application, after the corresponding packet sending program of the physical machine receives the creation notification sent by the load equalizer, namely, after the packet sending program running on the physical machine receives the creation notification sent by the load equalizer, the corresponding relation between the address port pair of the physical machine and the address port pair of the load equalizer can be created by calling the ebpf API interface through the packet sending program, so that the physical machine can rewrite the source IP address and the source port number of the response message according to the corresponding relation, thereby avoiding exposing the IP address and the port number of the physical machine and ensuring the consistency of the source IP address and the source port number of the response message sent from the virtual server cluster system.
As an implementation manner of the embodiment of the present application, the method may further include:
When a packet sending program running on the physical machine receives a deleting notification sent by the load balancer, an ebpf API interface is called by the packet sending program, and the corresponding relation is deleted.
Because the offline instruction of the physical machine characterizes that the physical machine needs to be offline from the virtual server cluster system, the physical machine is not required to receive the request message sent by the load balancer again, and is not required to send the response message to the client again, so that the corresponding relation between the address port pair of the physical machine for rewriting the response message and the address port pair of the load balancer is not required to be stored in the physical machine.
Therefore, when the load balancer receives the offline instruction for the physical machine, a deletion notification may be sent to the packet sending program running on the physical machine to instruct the physical machine to delete the corresponding relationship, specifically, after determining that the packet sending program running on the physical machine receives the deletion notification sent by the load balancer, the physical machine may call the ebpf API interface through the packet sending program to delete the corresponding relationship.
The offline instruction received by the load balancer may be sent by the client, or may be sent by a technician to the load balancer through other devices, for example, when the technician needs to remove the physical machine from the virtual server cluster system when the physical machine is in error or damaged, the offline instruction for the physical machine may be sent to the load balancer through a terminal device connected to the load balancer.
In the scheme provided by the embodiment of the application, after the corresponding packet sending program of the physical machine receives the deleting notification sent by the load balancer, namely after the packet sending program running on the physical machine receives the deleting notification sent by the load balancer, the corresponding relation between the address port pair of the physical machine and the address port pair of the load balancer can be deleted by calling the ebpf API interface through the packet sending program, so that the storage space of the physical machine is saved. And the problem that the corresponding relation stored in the previous virtual server cluster system of the physical machine affects the current virtual server cluster system is avoided when the physical machine is on line again in other virtual server cluster systems.
Corresponding to the above message processing method, the embodiment of the present application further provides a message processing device applied to a physical machine in a virtual server cluster system, and the following describes the message processing device provided by the embodiment of the present application.
As shown in fig. 5, a message processing apparatus includes:
a receiving module 510, configured to receive a request packet sent by a load balancer, where the request packet includes: the IP address and port number of the client requesting the service;
The response module 520 is configured to respond to the request packet and generate a response packet, where a source IP address of the response packet is an IP address of the physical machine, a source port number is a port number of the physical machine, a destination IP address is an IP address of the client, and a destination port number is a port number of the client;
a first sending module 530, configured to send the response message according to a kernel packet sending path;
the rewriting module 540 is configured to rewrite a source IP address of the response message to be a virtual IP address of the load balancer and rewrite a source port number to be a virtual port number of the load balancer if the response message reaches a preset mounting point of the kernel packet transmission path in the process of sending the response message, so as to obtain a target response message;
and a second sending module 550, configured to send the target response packet.
In the scheme provided by the embodiment of the application, after the physical machine responds to the request message and generates the response message, when the response message reaches the preset mounting point of the kernel packet sending path, the source IP address and the source port number of the response message are rewritten to the virtual IP address and the virtual port number of the load equalizer respectively to obtain the target response message, and then the target response message is directly sent to the client, so that the response message does not pass through the load equalizer, the message which needs to be forwarded by the load equalizer is reduced, the problem that the load equalizer is easy to become the performance bottleneck of the virtual server cluster system is solved, and the message processing efficiency is improved.
As an implementation manner of the embodiment of the present application, the preset mounting point may be mounted with an information rewriting hook function;
the rewriting module 540 is specifically configured to rewrite, when the information rewriting hook function is called, the source IP address of the response message to the virtual IP address of the load balancer and the source port number to the virtual port number of the load balancer through the information rewriting hook function, so as to obtain a target response message.
As an implementation manner of the embodiment of the present application, the preset mounting point may be tc egress.
As an implementation manner of the embodiment of the present application, a packet sending program for sending a packet may be run on the physical machine;
the second sending module 550 may be specifically configured to invoke the packet sending program to send the target response message.
As an implementation manner of the embodiment of the present application, the rewriting module 540 may include:
a judging unit, configured to judge whether a target address port pair exists in a correspondence between a pre-stored address port pair of a physical machine and an address port pair of a load balancer, where the address port pair includes: IP address and port number, the destination address port pair comprising: the source IP address and the source port number of the response message;
An address port pair searching unit, configured to find, in a correspondence between a pre-stored address port pair of a physical machine and an address port pair of a load balancer, a target address port pair, from the correspondence, an address port pair of the load balancer corresponding to the target address port pair;
and the rewriting unit is used for rewriting the source IP address of the response message into the IP address in the searched address port pair and rewriting the source port number into the port number in the searched address port pair.
As an implementation manner of the embodiment of the present application, the foregoing correspondence may be stored by using a key-value data structure, where a key value in the key-value includes: the IP address and port number of the physical machine, the value includes: virtual IP address and virtual port number of the load balancer.
As an implementation manner of the embodiment of the present application, the foregoing apparatus may further include:
and the corresponding relation creation module is used for creating the corresponding relation by calling an ebpf API interface through the packet sending program after the packet sending program running on the physical machine receives the creation notification sent by the load balancer before receiving the request message sent by the load balancer.
As an implementation manner of the embodiment of the present application, the foregoing apparatus may further include:
and the corresponding relation deleting module is used for deleting the corresponding relation by calling an ebpf API interface through the package issuing program when the package issuing program running on the physical machine receives a deleting notification sent by the load balancer, wherein the deleting notification is sent by the load balancer when receiving a downlink instruction aiming at the physical machine.
The embodiment of the present application also provides a physical machine, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 perform communication with each other through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the message processing method according to any one of the embodiments described above when executing the program stored in the memory 603.
In the scheme provided by the embodiment of the application, after the physical machine responds to the request message and generates the response message, when the response message reaches the preset mounting point of the kernel packet sending path, the source IP address and the source port number of the response message are rewritten to the virtual IP address and the virtual port number of the load equalizer respectively to obtain the target response message, and then the target response message is directly sent to the client, so that the response message does not pass through the load equalizer, the message which needs to be forwarded by the load equalizer is reduced, the problem that the load equalizer is easy to become the performance bottleneck of the virtual server cluster system is solved, and the message processing efficiency is improved.
The communication bus mentioned by the physical machine may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the physical machine and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present application, a computer readable storage medium is provided, where a computer program is stored, where the computer program is executed by a processor to implement the method for processing a message according to any one of the foregoing embodiments.
In yet another embodiment of the present application, a computer program product containing instructions that, when executed on a computer, cause the computer to perform the method of any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a Solid State Disk (SSD), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus, physical machine, computer readable storage medium and computer program product, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the parts of the description of the method embodiments being relevant.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (18)

1. The message processing method is characterized by being applied to a physical machine in a virtual server cluster system, and comprises the following steps:
receiving a request message sent by a load balancer, wherein the request message comprises: the IP address and port number of the client requesting the service;
responding to the request message and generating a response message, wherein the source IP address of the response message is the IP address of the physical machine, the source port number is the port number of the physical machine, the destination IP address is the IP address of the client, and the destination port number is the port number of the client;
sending the response message according to the kernel packet sending path;
in the process of sending the response message, if the response message reaches a preset mounting point of the kernel packet sending path, rewriting a source IP address of the response message into a virtual IP address of the load balancer and rewriting a source port number into a virtual port number of the load balancer to obtain a target response message;
And sending the target response message.
2. The method of claim 1, wherein the preset mounting point is loaded with an information-rewriting hook function;
if the response message reaches the preset mounting point of the kernel packet sending path, rewriting a source IP address of the response message into a virtual IP address of the load balancer and rewriting a source port number into a virtual port number of the load balancer, so as to obtain a target response message, including:
and if the information rewriting hook function is called, rewriting the source IP address of the response message into the virtual IP address of the load balancer and rewriting the source port number into the virtual port number of the load balancer through the information rewriting hook function to obtain a target response message.
3. The method of claim 2, wherein the predetermined mounting point is tc egress.
4. A method according to any one of claims 1-3, wherein a packet sending program for sending a message is run on the physical machine, and the sending the target response message includes:
and calling the package sending program to send the target response message.
5. A method according to any one of claims 1-3, wherein said rewriting the source IP address of the response message to the virtual IP address of the load balancer and rewriting the source port number to the virtual port number of the load balancer comprises:
Judging whether a target address port pair exists in a corresponding relation between a pre-stored address port pair of a physical machine and an address port pair of a load balancer, wherein the address port pair comprises: IP address and port number, the destination address port pair comprising: the source IP address and the source port number of the response message;
if the address port pair exists, searching an address port pair of the load balancer corresponding to the target address port pair from the corresponding relation;
and rewriting the source IP address of the response message into the IP address in the searched address port pair, and rewriting the source port number into the port number in the searched address port pair.
6. The method of claim 5, wherein the step of determining the position of the probe is performed,
the corresponding relation is stored by adopting a key-value data structure, wherein the key value in the key-value comprises: the IP address and port number of the physical machine, the value includes: virtual IP address and virtual port number of the load balancer.
7. The method of claim 5, wherein prior to receiving the request message sent by the load balancer, the method further comprises:
and after a packet sending program running on the physical machine receives a creation notification sent by the load balancer, the corresponding relation is created by calling an ebpf API interface through the packet sending program.
8. The method of claim 5, wherein the method further comprises:
when a packet sending program running on the physical machine receives a deletion notification sent by the load balancer, calling an ebpf API interface through the packet sending program to delete the corresponding relation, wherein the deletion notification is sent by the load balancer when a downlink instruction for the physical machine is received.
9. A message processing apparatus, applied to a physical machine in a virtual server cluster system, the apparatus comprising:
the receiving module is configured to receive a request packet sent by the load balancer, where the request packet includes: the IP address and port number of the client requesting the service;
the response module is used for responding to the request message and generating a response message, wherein the source IP address of the response message is the IP address of the physical machine, the source port number is the port number of the physical machine, the destination IP address is the IP address of the client, and the destination port number is the port number of the client;
the first sending module is used for sending the response message according to the kernel packet sending path;
the rewriting module is used for rewriting a source IP address of the response message into a virtual IP address of the load balancer and rewriting a source port number into a virtual port number of the load balancer in the process of sending the response message if the response message reaches a preset mounting point of the kernel packet sending path, so as to obtain a target response message;
And the second sending module is used for sending the target response message.
10. The apparatus of claim 9, wherein the preset mounting point is populated with an information-rewriting hook function;
the rewriting module is specifically configured to rewrite, when the information rewriting hook function is called, a source IP address of the response message to a virtual IP address of the load balancer and a source port number to a virtual port number of the load balancer through the information rewriting hook function, so as to obtain a target response message.
11. The device of claim 10, wherein the predetermined mounting point is tc egress.
12. The apparatus according to any one of claims 9-11, wherein a packet sending program for sending a message is run on the physical machine;
the second sending module is specifically configured to invoke the packet sending program to send the target response message.
13. The apparatus of any one of claims 9-11, wherein the rewrite module comprises:
a judging unit, configured to judge whether a target address port pair exists in a correspondence between a pre-stored address port pair of a physical machine and an address port pair of a load balancer, where the address port pair includes: IP address and port number, the destination address port pair comprising: the source IP address and the source port number of the response message;
An address port pair searching unit, configured to find, in a correspondence between a pre-stored address port pair of a physical machine and an address port pair of a load balancer, a target address port pair, from the correspondence, an address port pair of the load balancer corresponding to the target address port pair;
and the rewriting unit is used for rewriting the source IP address of the response message into the IP address in the searched address port pair and rewriting the source port number into the port number in the searched address port pair.
14. The apparatus of claim 13, wherein the device comprises a plurality of sensors,
the corresponding relation is stored by adopting a key-value data structure, wherein the key value in the key-value comprises: the IP address and port number of the physical machine, the value includes: virtual IP address and virtual port number of the load balancer.
15. The apparatus of claim 13, wherein the apparatus further comprises:
and the corresponding relation creation module is used for creating the corresponding relation by calling an ebpf API interface through the packet sending program after the packet sending program running on the physical machine receives the creation notification sent by the load balancer before receiving the request message sent by the load balancer.
16. The apparatus of claim 13, wherein the apparatus further comprises:
and the corresponding relation deleting module is used for deleting the corresponding relation by calling an ebpf API interface through the package issuing program when the package issuing program running on the physical machine receives a deleting notification sent by the load balancer, wherein the deleting notification is sent by the load balancer when receiving a downlink instruction aiming at the physical machine.
17. The physical machine is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any of claims 1-8 when executing a program stored on a memory.
18. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-8.
CN202311120616.8A 2023-09-01 2023-09-01 Message processing method, device, physical machine and storage medium Pending CN116846896A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311120616.8A CN116846896A (en) 2023-09-01 2023-09-01 Message processing method, device, physical machine and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311120616.8A CN116846896A (en) 2023-09-01 2023-09-01 Message processing method, device, physical machine and storage medium

Publications (1)

Publication Number Publication Date
CN116846896A true CN116846896A (en) 2023-10-03

Family

ID=88174717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311120616.8A Pending CN116846896A (en) 2023-09-01 2023-09-01 Message processing method, device, physical machine and storage medium

Country Status (1)

Country Link
CN (1) CN116846896A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752188A (en) * 2011-04-21 2012-10-24 北京邮电大学 Transmission control protocol connection migratory method and system
CN104079497A (en) * 2014-07-21 2014-10-01 北京信诺瑞得软件系统有限公司 High-availability loading balancing equipment and method under transparent network bridge mode
US20180176124A1 (en) * 2016-12-21 2018-06-21 Nicira, Inc. Bypassing a load balancer in a return path of network traffic
CN113067824A (en) * 2021-03-22 2021-07-02 平安科技(深圳)有限公司 Data scheduling method, system, virtual host and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752188A (en) * 2011-04-21 2012-10-24 北京邮电大学 Transmission control protocol connection migratory method and system
CN104079497A (en) * 2014-07-21 2014-10-01 北京信诺瑞得软件系统有限公司 High-availability loading balancing equipment and method under transparent network bridge mode
US20180176124A1 (en) * 2016-12-21 2018-06-21 Nicira, Inc. Bypassing a load balancer in a return path of network traffic
CN113067824A (en) * 2021-03-22 2021-07-02 平安科技(深圳)有限公司 Data scheduling method, system, virtual host and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN108449282B (en) Load balancing method and device
US11088944B2 (en) Serverless packet processing service with isolated virtual network integration
JP2020530722A (en) PDU type setting method, UE policy setting method, and related entities
CN111193773B (en) Load balancing method, device, equipment and storage medium
CN114095430B (en) Access message processing method, system and working node
CN107135242B (en) Mongodb cluster access method, device and system
CN113301116A (en) Cross-network communication method, device, system and equipment for microservice application
CN113141405B (en) Service access method, middleware system, electronic device, and storage medium
CN113220723A (en) Flow control method and device, computer equipment and storage medium
CN111953770B (en) Route forwarding method and device, route equipment and readable storage medium
CN113259479A (en) Data processing method and equipment
CN114205342A (en) Routing method, electronic device, medium, and program product for service debugging
CN114281263A (en) Storage resource processing method, system and equipment of container cluster management system
US20160226963A1 (en) Load balancing using predictable state partitioning
CN110661673B (en) Heartbeat detection method and device
CN113364660B (en) Data packet processing method and device in LVS load balancing
CN115913597A (en) Method and device for determining lost host
US11296981B2 (en) Serverless packet processing service with configurable exception paths
CN115190062B (en) Service processing method and device, electronic equipment and computer readable storage medium
CN116389599A (en) Gateway service request processing method and device and cloud native gateway system management method and device
CN116846896A (en) Message processing method, device, physical machine and storage medium
US20220141080A1 (en) Availability-enhancing gateways for network traffic in virtualized computing environments
US20230102122A1 (en) Methods, systems, and computer readable media for identifying alternate delivery endpoints for mobile originated data and monitoring reports in a communications network
CN114338809A (en) Access control method, device, electronic equipment and storage medium
CN114048028A (en) Service calling method and device, storage medium and electronic equipment

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