CN104468389B - Processing method, server and the server system of message - Google Patents
Processing method, server and the server system of message Download PDFInfo
- Publication number
- CN104468389B CN104468389B CN201410705646.XA CN201410705646A CN104468389B CN 104468389 B CN104468389 B CN 104468389B CN 201410705646 A CN201410705646 A CN 201410705646A CN 104468389 B CN104468389 B CN 104468389B
- Authority
- CN
- China
- Prior art keywords
- server
- application
- bridge
- port
- network card
- 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
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the present invention provides a kind of processing method of message, server and server system, and the system includes at least two servers, and each server includes two network interface cards;First network interface card of each server is correspondingly arranged the first bridge, second network interface card is correspondingly arranged the second bridge, each bridge includes two ports, the first port of each bridge is bound into an aggregation port, the address of aggregation port is arranged to the address of the first network interface card of each server, the aggregation port that using access request message is forwarded to each server of the configuration forwarding flow table so that the second network interface card of each server to be received on the second bridge of each server.Processing method, server and the server system of message provided in an embodiment of the present invention have reached when realizing Network Load Balance, in the case that a server can not be bound multiple network interface cards using IEEE 802.3ad agreements wherein, normal data communication can also be carried out between server.
Description
Technical Field
The embodiment of the invention relates to an IT technology, in particular to a message processing method, a server and a server system.
Background
With the rapid development of Information Technology (IT), IT has become more and more important to improve the reliability and throughput of server network connection.
In the prior art, a server is configured by multiple network cards, the multiple network cards are bound together by using an ieee802.3ad Protocol, and a Link Aggregation Control Protocol (LACP) is used on a switch to realize load balancing among the servers in order to match with network card binding of the server.
However, in the conventional load balancing implementation scheme, if a server cannot bind multiple network cards by using the ieee802.3ad protocol in a certain scenario, the server may send a non-LACP protocol message to the switch to complete communication between the servers. Because the switch has been configured with the LACP protocol, and before the LACP protocol becomes effective, the port of the switch cannot send and receive any non-LACP protocol messages. Therefore, the message sent by the server is discarded by the switch after reaching the switch, so that the server cannot normally communicate with other servers, and the service is blocked.
Disclosure of Invention
The embodiment of the invention provides a message processing method, a server and a server system, which are used for solving the problem that when a certain server cannot adopt an IEEE802.3ad protocol to bind a plurality of network cards when network load balancing is realized in the prior art, the server cannot normally communicate with other servers.
In a first aspect, an embodiment of the present invention provides a method for processing a message, which is applied to a server system, where the system includes at least two servers, each server includes two network cards, two physical channels are included between each two servers, a first physical channel between each two servers is formed by connecting the first network cards of the two servers, and a second physical channel between each two servers is formed by connecting the second network cards of the two servers;
the method comprises the steps that a first network card of each server is correspondingly provided with a first network bridge, a second network card of each server is correspondingly provided with a second network bridge, each network bridge comprises two ports, the first port of each network bridge is bound into an aggregation port, the address of each aggregation port is set to be the address of the first network card of each server, each aggregation port is connected with an application processor in an interface mode, the second port of each network bridge is connected with an application loading processor in an interface mode, and a forwarding flow table is configured on the second network bridge of each server so that application access request messages received by the second network card of each server can be forwarded to the aggregation port of each server.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the method further includes:
receiving an application loading message sent by a second server through a first network card of a first server, sending the application loading message to the application loading processor through a second port of a first bridge of the first server, receiving a response message of the application loading message through a second port of the first bridge of the first server, and sending the response message of the application loading message to the second server through the first network card of the first server;
or,
receiving an application loading message sent by a second server through a second network card of a first server, sending the application loading message to the application loading processor through a second port of a second network bridge of the first server, receiving a response message of the application loading message through a second port of the second network bridge of the first server, and sending the response message of the application loading message to the second server through the second network card of the first server.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the method further includes:
receiving an application access request message sent by a second server through a first network card of a first server, sending the application access request message to an aggregation port of the first server through a first port of a first bridge of the first server, and sending the application access request to the application processor through the aggregation port of the first server;
or,
receiving an application access request message sent by a second server through a second network card of the first server, modifying a destination address of the application access request message into an address of a first network card of the first server according to a forwarding flow table configured on a second bridge of the first server, sending the application access request message to an aggregation port of the first server through a first port of the second bridge of the first server, and sending the application access request to the application processor through the aggregation port of the first server.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, a load balancing policy is further configured on the aggregation port of the first server, and the method further includes:
after the aggregation port of the first server receives the response message of the application access request message sent by the application processor, the first network card of the first server or the second network card of the first server is selected to forward the response message of the application access request message to the second server according to the load balancing policy.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, when the aggregation port of the first server selects the first network card of the first server to forward the response message of the application access request message to the second server, the forwarding step includes:
the aggregation port of the first server sends the response message of the application access request message to the first port of the first bridge of the first server, and the first port of the first bridge of the first server sends the response message of the application access request message to the second server through the first network card of the first server.
With reference to the third possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, when the aggregation port of the first server selects the second network card of the first server to forward the response message of the application access request message to the second server, the forwarding step includes:
the aggregation port of the first server sends a response message of the application access request message to a first port of a second bridge of the first server, the first port of the second bridge of the first server modifies a source address of the response message of the application access request message from an address of a first network card of the first server to an address of a second network card of the first server according to a forwarding flow table configured on the second bridge of the first server, and sends the response message of the application access request message to the second server through the second network card of the first server.
In a second aspect, an embodiment of the present invention provides a server, which is applied to a server system, where the system includes at least two servers, each server includes two network cards, two physical channels are included between each two servers, a first physical channel between each two servers is formed by connecting the first network cards of the two servers, and a second physical channel between each two servers is formed by connecting the second network cards of the two servers;
the method comprises the steps that a first network card of each server is correspondingly provided with a first network bridge, a second network card of each server is correspondingly provided with a second network bridge, each network bridge comprises two ports, the first port of each network bridge is bound into an aggregation port, the address of each aggregation port is set to be the address of the first network card of each server, each aggregation port is connected with an application processor in an interface mode, the second port of each network bridge is connected with an application loading processor in an interface mode, and a forwarding flow table is configured on the second network bridge of each server so that application access request messages received by the second network card of each server can be forwarded to the aggregation port of each server.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the first network card of the first server is configured to receive an application loading message sent by the second server;
a second port of the first bridge of the first server for sending the application load message to the application load processor;
the second port of the first bridge of the first server is further configured to receive a response message of the application loading message, and send the response message of the application loading message to the second server through the first network card of the first server;
the second network card of the first server is used for receiving the application loading message sent by the second server;
a second port of a second bridge of the first server for sending the application load message to the application load processor;
the second port of the second bridge of the first server is further configured to receive a response message of the application loading message, and send the response message of the application loading message to the second server through the second network card of the first server.
With reference to the second aspect, in a second possible implementation manner of the second aspect, the first network card of the first server is further configured to receive an application access request message sent by the second server;
a first port of a first bridge of the first server further for sending the application access request message to an aggregation port of the first server;
an aggregation port of a first server for sending the application access request to the application processor;
the second network card of the first server is used for receiving an application access request message sent by the second server, and modifying a destination address of the application access request message into an address of the first network card of the first server according to a forwarding flow table configured on a second network bridge of the first server;
a first port of a second bridge of the first server further for sending the application access request message to an aggregation port of the first server;
the aggregation port of the first server is further configured to send the application access request to the application processor.
With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, a load balancing policy is further configured on the aggregation port of the first server, where:
the aggregation port of the first server is further configured to select, after receiving a response message of the application access request message sent by the application processor, the first network card of the first server or the second network card of the first server to forward the response message of the application access request message to the second server according to the load balancing policy.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the aggregation port of the first server is further configured to send a response message of the application access request message to the first port of the first bridge of the first server;
the first port of the first bridge of the first server is further configured to send a response message of the application access request message to the second server through the first network card of the first server.
With reference to the third possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the aggregation port of the first server is further configured to send a response message of the application access request message to the first port of the second bridge of the first server;
the first port of the second bridge of the first server is further configured to modify, according to a forwarding flow table configured on the second bridge of the first server, a source address of a response message of the application access request message from an address of the first network card of the first server to an address of the second network card of the first server, and send the response message of the application access request message to the second server through the second network card of the first server.
In a third aspect, an embodiment of the present invention provides a server system, including: a gateway device and a server as in the second aspect, any one of the first to fifth of the second aspects.
The invention provides a message processing method, a server and a server system, wherein a first network card of the server is correspondingly provided with a first bridge, a second network card of the server is correspondingly provided with a second bridge, each bridge comprises two ports, the first port of each bridge is bound into an aggregation port, the address of the aggregation port is set as the address of the first network card of each server, each aggregation port has an interface with an application processor, the second port of each bridge has an interface with an application loading processor, a forwarding flow table is configured on the second bridge of each server to forward an application access request message received by the second network card of each server to the aggregation port of each server so as to complete data interaction between the two servers, so that when network load balance is realized, under the condition that one server can not bind a plurality of network cards by adopting an IEEE802.3ad protocol, normal data communication can be carried out between the servers.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a server system on which the message processing method of the present invention is based;
FIG. 2 is a flowchart illustrating a first embodiment of a message processing method according to the present invention;
FIG. 3 is a flowchart illustrating a second message processing method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a message processing method according to the present invention;
FIG. 5 is a flowchart illustrating a fourth embodiment of a message processing method according to the present invention;
fig. 6 is a schematic structural diagram of a server according to a first embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic structural diagram of a server system based on which the message processing method of the present invention is based, where the system shown in fig. 1 includes at least two servers, each server includes two network cards, two physical channels are included between each two servers, a first physical channel between each two servers is formed by connecting the first network cards of the two servers, and a second physical channel between each two servers is formed by connecting the second network cards of the two servers.
The system shown in fig. 1 includes two servers, namely, a server 11 and a server 12. The server 11 and the server 12 each include two network cards, assuming that the two network cards in the server 11 are respectively a first network card 13 and a second network card 14, and the two network cards in the server 12 are respectively a first network card 15 and a second network card 16, the first network card 13 of the server 11 is connected to the gateway device 41, the first network card 15 of the server 12 is also connected to the gateway device 41, and thus a first physical channel can be formed by connecting the first network cards of the two servers and the gateway device, and similarly, the second network card 14 of the server 11 is connected to the gateway device 42, and the second network card 16 of the server 12 is also connected to the gateway device 42, so that a second physical channel between the two servers is formed.
Fig. 2 is a flowchart illustrating a first embodiment of a message processing method according to the present invention, as shown in fig. 2, the method of this embodiment may include:
step 201, a first network card of each server is correspondingly provided with a first network bridge, a second network card of each server is correspondingly provided with a second network bridge, each network bridge comprises two ports, the first port of each network bridge is bound into an aggregation port, the address of each aggregation port is set as the address of the first network card of each server, each aggregation port has an interface with an application processor, and the second port of each network bridge has an interface with an application loading processor.
In this embodiment, as shown in fig. 1, a first network bridge 17 and a second network bridge 18 are respectively disposed on a first network card 13 and a second network card 14 of a server 11, a first port 21 of the first network bridge 17 and a first port 23 of the second network bridge 18 are bound into an aggregation port 29 of the server 11, the aggregation port 29 has an interface with an application processor 31, and a second port 22 of the first network bridge 17 and a second port 24 of the second network bridge 18 have an interface with an application loading processor 33.
Step 202, configuring a forwarding flow table on the second bridge of each server to forward the application access request message received by the second network card of each server to the aggregation port of each server.
In this embodiment, a forwarding flow table is configured on the second bridge of each server, and is used to modify the source address of the application access request message, so that the application access request message is forwarded to the aggregation port of each server.
The message processing method provided by the invention is characterized in that a first network card of a server is correspondingly provided with a first network bridge, a second network card of the server is correspondingly provided with a second network bridge, each network bridge comprises two ports, the first port of each network bridge is bound into an aggregation port, the address of the aggregation port is set as the address of the first network card of each server, each aggregation port has an interface with an application processor, the second port of each network bridge has an interface with an application loading processor, a forwarding flow table is configured on the second network bridge of each server, so that an application access request message received by the second network card of each server is forwarded to the aggregation port of each server to complete data interaction between the two servers, and when network load balance is realized, under the condition that one server cannot bind a plurality of network cards by adopting an IEEE802.3ad protocol, normal data communication can be carried out between the servers.
In addition, the gateway device 41 and the gateway device 42 in fig. 1 may be, for example, switches, and the present invention is not particularly limited herein with respect to a specific type of the gateway device.
Fig. 3 is a flowchart illustrating a second embodiment of a message processing method according to the present invention, in this embodiment, based on the system shown in fig. 1, as shown in fig. 3, the method of this embodiment may include:
step 301, receiving an application loading message sent by a second server through a first network card of a first server.
In this embodiment, when the second server sends the application loading message to the first server, the application loading message is sent to the gateway device, and then the gateway device sends the application loading message to the first network card of the first server. The application loading message may be, for example, a pre-boot execution environment PXE message.
Step 302, sending an application load message to the application load processor through a second port of the first bridge of the first server.
In the actual application process, the second server cannot bind the two network cards through the IEEE802.3ad protocol for some reasons, for example, the second server may be directly accessed by a bare computer, the kernel version of the linux Operating System is lower than 2.4, or the Operating System (OS for short) uses other Operating systems that do not support internet access binding. In the prior art, if the second server cannot bind the two network cards, the first server cannot normally communicate with the second server, which results in blocking of services. In this embodiment, by setting the first bridge in the open virtual switching standard mode on the first network card of the first server, after the second server sends the application loading message to the gateway device, the first network card of the first server receives the application loading message and sends the application loading message to the first bridge of the first server. When the first bridge of the first server receives the application loading message, the application loading message is broadcasted from the first port and the second port in a broadcasting mode, because an interface exists between the second port and the application loading processor, the application loading message broadcasted from the first port is automatically discarded, and the application loading message is sent to the application loading processor through the second port of the first bridge of the first server so as to check the application loading message by the application loading processor to verify whether the message is correct or not. Wherein the application loading processor may be implemented by software and/or hardware. The following describes the case of direct bare-metal access to the server 12 in fig. 1 as an example.
When the server 12 accesses the server system, the server 12 automatically installs the operating system through the server 11. In a specific implementation process, after the application loading message is started through the first network card 15 of the server 12, the server 12 sends the application loading message to the gateway device 41, which may be, for example, a switch. After receiving the application loading message, the gateway device 41 sends the application loading message to the server 11 through the first network card of the first server and the second port of the first bridge of the first server.
Step 303, the second port of the first bridge of the first server receives the response message of the application loading message, and sends the response message of the application loading message to the second server through the first network card of the first server.
In this embodiment, after the application loading message is sent to the application loading processor 33 through the second port 22 of the first bridge 17 of the server 11, the application loading processor 33 processes the application loading message to obtain a response message of the application loading message, and sends the response message of the application loading message to the second port 22 of the first bridge 17 of the server 11, and after the second port 22 of the first bridge 17 of the server 11 receives the response message of the application loading message, the response message is sent to the gateway device 41 through the first network card 13 of the server 11, so that the gateway device 41 returns the response message of the application loading message to the second server. After the first network card of the second server receives the response message of the application loading message, it indicates that the application loading message sent by the first network card of the second server is responded, thereby completing the interaction of the application loading message in one period, so that the server 12 can configure the local operating system according to the response message of the application loading message, thereby implementing normal data communication between the first server and the second server, and thus, the first server and the second server can communicate by using any communication protocol as actually required.
It should be noted that, in this embodiment, a first physical channel between two servers is taken as an example of a transmission path of an application loading message, that is, an application loading message is sent through a first network card of a second server and received by the first network card of the first server, similarly, if an application loading message is sent by a second network card on the second server, the application loading message is received through a second network card of the first server and sent to an application loading processor through a second port of a second network bridge of the first server, a response message of the application loading message is received by a second port of the second network bridge of the first server and sent to the second server through the second network card of the first server, that is, a second physical channel between two servers is taken as a transmission path of the application loading message, the specific processing manner is similar to the processing manner in which the first physical channel is used as the transmission path of the application loading message, and is not described here again.
The message processing method provided by the embodiment of the invention comprises the steps of correspondingly arranging a first network bridge on a first network card of a server, correspondingly arranging a second network bridge on a second network card of the server, enabling an interface to exist between a second port of each network bridge and an application loading processor, receiving an application loading message sent by a second server through the first network card of the first server, sending the application loading message to the application loading processor through the second port of the first network bridge of the first server, receiving a response message of the application loading message through the second port of the first network bridge of the first server, sending the response message of the application loading message to the second server through the first network card of the first server, completing data interaction, and achieving the purpose that when network load balance is realized, under the condition that one server cannot bind a plurality of network cards by adopting an IEEE802.3ad protocol, normal data communication can be carried out between the servers.
Fig. 4 is a flowchart illustrating a third embodiment of a message processing method according to the present invention, and this embodiment describes, in detail, an embodiment in which after the interaction of the application loading message is completed, an application access request message is sent to the first server through the first network card of the second server, so that normal data communication is performed between the two servers, and network load balancing is implemented, on the basis of the embodiment illustrated in fig. 3. The structure of the server system applied in this embodiment is similar to that in fig. 1, and is not described herein again, as shown in fig. 4, the method in this embodiment may include:
step 401, receiving an application access request message sent by a second server through a first network card of a first server.
In this embodiment, when the interaction of the application loading message is completed between the first server and the second server, and the first network card of the second server is correspondingly provided with the first network bridge, and the second network card is correspondingly provided with the second network bridge, after the first port of each network bridge is bound to form the aggregation port, the application processor on the second server starts to initiate an application access request, and sends an application access request message to the first server. In practical application, a load balancing policy is further configured on the aggregation port of the second server, and specifically, a binding mode of the aggregation port of the second server may be set as a balance policy balance-xor. The aggregation port of the second server can select whether to send the application access request message to the first server through a first network card of the second server or through a second network card of the second server according to the balance-xor policy. In a specific implementation process, a first Media Access Control (MAC) address of a first network card of a second server and a second MAC address of a second network card of the second server are processed as follows: (the first MAC address is XOR with the second MAC address)% of the number of the network cards in the second server is selected according to the obtained calculation result. For example: in this embodiment, since the number of the network cards in the second server is 2, after performing xor processing on the first MAC address of the first network card of the second server and the second MAC address of the second network card of the second server, if the obtained result is 0, the application access request message is sent to the first server through the first network card of the second server, and if the obtained result is 1, the application access request message is sent to the first server through the second network card of the second server. In this embodiment, an example in which the aggregation port of the second server sends the application access request message to the first server through the first network card of the second server is described.
After the application access request message is sent to the gateway device through the first network card of the second server, the gateway device sends the received application access request message to the first network card of the first server through the first physical channel between the two servers.
Step 402 sends an application access request message to an aggregation port of a first server through a first port of a first bridge of the first server.
In this embodiment, a first network card of the first server is provided with a first bridge, a second network card of the first server is provided with a second bridge, and the first port of each bridge is bound into one aggregation port. And after the first network card of the first server receives the application access request message, the application access request message is sent to the aggregation port of the first server through the first port of the first bridge of the first server.
In step 403, the aggregation port of the first server sends the application access request to the application processor.
In this embodiment, since an interface exists between the aggregation port of the first server and the application processor, after the aggregation port of the first server receives the application access request message, the application access request message is reported to the application processor, where the application processor may be implemented by software and/or hardware. And the application processor processes the received application access request message to obtain a response message of the application access request message.
Step 404, after the aggregation port of the first server receives the response message of the application access request message sent by the application processor, the first network card of the first server or the second network card of the first server is selected to forward the response message of the application access request message to the second server according to the load balancing policy.
In this embodiment, a load balancing policy is configured on the aggregation port of the first server, and after the application processor sends the generated response message of the application access request message to the aggregation port of the first server, the aggregation port of the first server selects, according to the configured load balancing policy, to pass through the first network card of the first server or the second network card of the first server, and sends the response message of the application access request message to the gateway device, so that the gateway device returns the response message of the application access request message to the second server. In a specific implementation process, configuring a load balancing policy on an aggregation port of a first server, which may be implemented by setting a binding mode of the aggregation port of the first server to be a balancing policy balance-xor, and according to the balancing policy, performing the following processing on a first MAC address of a first network card of the first server and a second MAC address of a second network card of the first server: (the first MAC address XOR and the second MAC address)% of the number of the network cards in the first server, and the aggregation port of the first server selects to forward the response message of the application access request message to the second server through the first network card of the first server or the second network card of the first server according to the obtained calculation result. For example: in this embodiment, since the number of the network cards in the first server is 2, after performing exclusive or processing on the first MAC address of the first network card of the first server and the second MAC address of the second network card of the first server, if the obtained result is 0, the response message of the application access request message is forwarded through the first network card of the first server, and if the obtained result is 1, the response message of the application access request message is forwarded through the second network card of the first server.
After the second server receives the response message of the application access request message, it is indicated that the application access request message is responded, that is, the interaction of the application access request message in one period is completed, so that it can be seen that not only normal data communication can be performed between the first server and the second server, but also network load balance between the servers can be realized.
The message processing method provided by the embodiment of the invention receives an application access request message sent by a second server through a first network card of a first server, sends the application access request message to an aggregation port of the first server through a first port of a first bridge of the first server, sends the application access request message to an application processor through the aggregation port of the first server, processes the application access request message by the application processor, sends a response message of the application access request message to the aggregation port of the first server, and the aggregation port of the first server selects the first network card of the first server or a second network card of the first server to forward the response message of the application access request message to the second server according to a load balancing strategy so as to complete data interaction, so that when network load balancing is realized, under the condition that one server cannot bind a plurality of network cards by adopting an IEEE802.3ad protocol, normal data communication can be carried out between the servers, so that the problem of service blockage in the prior art is solved.
Fig. 5 is a flowchart illustrating a fourth embodiment of a message processing method according to the present invention, and this embodiment describes, in detail, an embodiment in which after the interaction of the application loading message is completed, an application access request message is sent to the first server through the second network card of the second server, so that normal data communication is performed between the two servers, and network load balancing is implemented, on the basis of the embodiment illustrated in fig. 3. The structure of the server system applied in this embodiment is similar to that in fig. 1, and is not described herein again, as shown in fig. 5, the method in this embodiment may include:
step 501, receiving an application access request message sent by a second server through a second network card of a first server, and modifying a destination address of the application access request message into an address of the first network card of the first server according to a forwarding flow table configured on a second network bridge of the first server.
In this embodiment, when the interaction of the application loading message is completed between the first server and the second server, and the first network card of the second server is correspondingly provided with the first network bridge, and the second network card is correspondingly provided with the second network bridge, after the first port of each network bridge is bound to form the aggregation port, the application processor on the second server starts to initiate an application access request, and sends an application access request message to the first server. And after carrying out XOR processing on the first MAC address of the first network card of the second server and the second MAC address of the second network card of the second server according to a load balancing strategy configured on the aggregation port of the second server, judging whether the aggregation port of the second server sends the application access request message to the first server through the first network card of the second server or through the second network card of the second server according to a calculation result. The processing method of the load balancing policy is similar to that in the third embodiment, and is not described here again. If the aggregation port of the second server sends the application access request message through the second network card of the second server according to the load balancing policy, at this time, because the MAC address of the aggregation port of the second server is the first MAC address of the first network card of the second server, the application access request message sent by the aggregation port of the second server contains the first MAC address of the first network card of the second server, and when the application access request message is sent through the second network card of the second server, the first MAC address of the first network card of the second server in the application access request message needs to be updated to the second MAC address of the second network card of the second server according to a forwarding flow table configured on the second network bridge of the second server, so that the application access request message is sent to the second network card of the second server. It should be noted that the first MAC address of the first network card of the first server is the same as the first MAC address of the first network card of the second server, and the second MAC address of the second network card of the first server is the same as the second MAC address of the second network card of the second server.
The application access request message is correspondingly received through the second network card of the first server, after the application access request message sent by the second server is received by the second network card of the first server, the application access request message needs to be sent to the aggregation port of the first server through the first port of the second network bridge of the first server, and as the MAC address contained in the application access request message is the second MAC address of the second network card of the second server and the MAC address of the aggregation port of the first server is the first MAC address of the first network card of the first server, the destination address of the application access request message needs to be modified into the first MAC address of the first network card of the first server according to a forwarding flow table configured on the second network bridge of the first server.
Step 502, sending an application access request message to an aggregation port of a first server through a first port of a second bridge of the first server.
In this embodiment, after the destination address of the application access request message is modified to the first MAC address of the first network card of the first server, the application access request message is sent to the aggregation port of the first server through the first port of the second bridge of the first server.
Step 503, the aggregation port of the first server sends the application access request to the application processor.
Step 504, after the aggregation port of the first server receives the response message of the application access request message sent by the application processor, the first network card of the first server or the second network card of the first server is selected to forward the response message of the application access request message to the second server according to the load balancing policy.
Steps 503-504 are similar to steps 403-404 and are not described here.
The message processing method provided by the embodiment of the present invention receives an application access request message sent by a second server through a second network card of a first server, modifies a destination address of the application access request message into an address of a first network card of the first server according to a forwarding flow table configured on a second bridge of the first server, and sends the application access request message to an aggregation port of the first server through a first port of the second bridge of the first server, the aggregation port of the first server sends the application access request to an application processor, after the application processor processes the application access request message, the application processor sends a response message of the application access request message to the aggregation port of the first server, the aggregation port of the first server selects the first network card of the first server or the second network card of the first server to forward the response message of the application access request message to the second server according to a load balancing policy, therefore, data interaction is completed, normal data communication can be performed between servers under the condition that one server cannot adopt an IEEE802.3ad protocol to bind a plurality of network cards when network load balance is realized, and the problem of service blockage in the prior art is solved.
In an implementation fifth of the present invention, as in the foregoing method embodiment, optionally, when the aggregation port of the first server selects the first network card of the first server to forward the response message of the application access request message to the second server, the forwarding step includes:
the aggregation port of the first server sends a response message of the application access request message to a first port of a first bridge of the first server, and the first port of the first bridge of the first server sends the response message of the application access request message to a second server through a first network card of the first server.
In a sixth implementation of the present invention, as in the foregoing method embodiment, optionally, when the aggregation port of the first server selects the second network card of the first server to forward the response message of the application access request message to the second server, the forwarding step includes:
the aggregation port of the first server sends a response message of the application access request message to a first port of a second network bridge of the first server, the first port of the second network bridge of the first server modifies a source address of the response message of the application access request message from an address of a first network card of the first server to an address of a second network card of the first server according to a forwarding flow table configured on the second network bridge of the first server, and sends the response message of the application access request message to the second server through the second network card of the first server.
Specifically, since the source address of the response message of the application access request message is the first MAC address of the first network card of the first server, the source address of the response message of the application access request message is modified from the first MAC address of the first network card of the first server to the second MAC address of the second network card of the first server according to the forwarding flow table configured on the second bridge of the first server, so that the response message of the application access request message is sent to the second server through the second network card of the first server according to the second MAC address of the second network card of the first server in the response message of the application access request message.
It should be noted that, after receiving the response message of the application access request message, the second network card of the second server needs to send the response message to the aggregation port of the second server through the second port of the second bridge of the second server, and the MAC address of the aggregation port of the second server is the first MAC address of the first network card of the second server, so that the source address of the response message of the application access request message needs to be modified from the second MAC address of the second network card of the first server to the first MAC address of the first network card of the second server.
The invention also provides an embodiment of a server, as shown in fig. 1, the server is applied to a server system, the system includes at least two servers, each server includes two network cards, two physical channels are included between each two servers, a first physical channel between each two servers is formed by connecting the first network cards of the two servers, and a second physical channel between each two servers is formed by connecting the second network cards of the two servers;
the method comprises the steps that a first network card of each server is correspondingly provided with a first network bridge, a second network card of each server is correspondingly provided with a second network bridge, each network bridge comprises two ports, the first port of each network bridge is bound into an aggregation port, the address of each aggregation port is set to be the address of the first network card of each server, each aggregation port is connected with an application processor in an interface mode, the second port of each network bridge is connected with an application loading processor in an interface mode, and a forwarding flow table is configured on the second network bridge of each server so that application access request messages received by the second network card of each server can be forwarded to the aggregation port of each server.
In the above embodiment, the first network card of the first server is configured to receive an application loading message sent by the second server; a second port of the first bridge of the first server for sending the application load message to the application load processor; the second port of the first bridge of the first server is further configured to receive a response message of the application loading message, and send the response message of the application loading message to the second server through the first network card of the first server;
the second network card of the first server is used for receiving the application loading message sent by the second server; a second port of a second bridge of the first server for sending the application load message to the application load processor; the second port of the second bridge of the first server is further configured to receive a response message of the application loading message, and send the response message of the application loading message to the second server through the second network card of the first server.
In the above embodiment, the first network card of the first server is further configured to receive an application access request message sent by the second server; a first port of a first bridge of the first server further for sending the application access request message to an aggregation port of the first server; an aggregation port of a first server for sending the application access request to the application processor;
the second network card of the first server is used for receiving an application access request message sent by the second server, and modifying a destination address of the application access request message into an address of the first network card of the first server according to a forwarding flow table configured on a second network bridge of the first server; a first port of a second bridge of the first server further for sending the application access request message to an aggregation port of the first server; the aggregation port of the first server is further configured to send the application access request to the application processor.
In the foregoing embodiment, a load balancing policy is further configured on the aggregation port of the first server, where:
the aggregation port of the first server is further configured to select, after receiving a response message of the application access request message sent by the application processor, the first network card of the first server or the second network card of the first server to forward the response message of the application access request message to the second server according to the load balancing policy.
In the above embodiment, the aggregation port of the first server is further configured to send a response message of the application access request message to the first port of the first bridge of the first server;
the first port of the first bridge of the first server is further configured to send a response message of the application access request message to the second server through the first network card of the first server.
In the above embodiment, the aggregation port of the first server is further configured to send a response message of the application access request message to the first port of the second bridge of the first server;
the first port of the second bridge of the first server is further configured to modify, according to a forwarding flow table configured on the second bridge of the first server, a source address of a response message of the application access request message from an address of the first network card of the first server to an address of the second network card of the first server, and send the response message of the application access request message to the second server through the second network card of the first server.
The above system embodiments may be correspondingly used for implementing the technical solutions of the method embodiments, and the implementation principles and technical effects thereof are similar, and are not described herein again.
The present invention also provides a server system, comprising: a gateway device and a server; the server may be the server provided in the above embodiments, and the specific structure and function thereof are not described herein again.
Fig. 6 is a schematic structural diagram of a first embodiment of a server according to the present invention, and as shown in fig. 6, the system of this embodiment includes a receiver 601, a transmitter 602, and a processor 603.
The receiver 601 is configured to receive an application loading message sent by a second server; a transmitter 602 for transmitting the application load message to the application load processor; the receiver 601 is further configured to receive a response message of the application loading message; the transmitter 602 is configured to send a response message of the application loading message to the second server through the first network card of the first server; the receiver 501 is configured to receive an application loading message sent by a second server; the transmitter 602 is configured to transmit the application load message to the application load processor; the receiver 601 is configured to receive a response message of the application loading message; the transmitter 602 is configured to send a response message of the application loading message to the second server through the second network card of the first server.
In the above embodiment, the receiver 601 is further configured to receive an application access request message sent by a second server; the transmitter 602 is further configured to transmit the application access request message to an aggregation port of the first server; the transmitter 602 is further configured to transmit the application access request to the application processor; the receiver 601 is further configured to receive an application access request message sent by a second server, and the processor 603 is configured to modify a destination address of the application access request message to an address of a first network card of the first server according to a forwarding flow table configured on a second bridge of the first server; the transmitter 602 is further configured to transmit the application access request message to an aggregation port of the first server; the transmitter 602 is further configured to transmit the application access request to the application processor.
In the above embodiment, the transmitter 602 is further configured to select, after the receiver 601 receives the response message of the application access request message sent by the application processor, the first network card of the first server or the second network card of the first server to forward the response message of the application access request message to the second server according to the load balancing policy.
In the above embodiment, the transmitter 602 is further configured to transmit a response message of the application access request message to the first port of the first bridge of the first server;
the transmitter 602 is further configured to send a response message of the application access request message to the second server through the first network card of the first server.
In the above embodiment, the transmitter 602 is further configured to transmit a response message of the application access request message to the first port of the second bridge of the first server;
the processor 603 is further configured to modify, according to a forwarding flow table configured on the second bridge of the first server, a source address of a response message of the application access request message from an address of a first network card of the first server to an address of a second network card of the first server;
the transmitter 602 is further configured to send a response message of the application access request message to the second server through the second network card of the first server.
The above system embodiments may be correspondingly used for implementing the technical solutions of the method embodiments, and the implementation principles and technical effects thereof are similar, and are not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (13)
1. The message processing method is characterized by being applied to a server system, wherein the system comprises at least two servers, each server comprises two network cards, two physical channels are arranged between every two servers, a first physical channel between every two servers is formed by connecting the first network cards of the two servers, and a second physical channel between every two servers is formed by connecting the second network cards of the two servers;
the method comprises the steps that a first network card of each server is correspondingly provided with a first network bridge, a second network card of each server is correspondingly provided with a second network bridge, each network bridge comprises two ports, the first port of each network bridge is bound into an aggregation port, the address of each aggregation port is set to be the address of the first network card of each server, each aggregation port is connected with an application processor in an interface mode, the second port of each network bridge is connected with an application loading processor in an interface mode, and a forwarding flow table is configured on the second network bridge of each server so that application access request messages received by the second network card of each server can be forwarded to the aggregation port of each server.
2. The method of claim 1, further comprising:
receiving an application loading message sent by a second server through a first network card of a first server, sending the application loading message to the application loading processor through a second port of a first bridge of the first server, receiving a response message of the application loading message through a second port of the first bridge of the first server, and sending the response message of the application loading message to the second server through the first network card of the first server;
or,
receiving an application loading message sent by a second server through a second network card of a first server, sending the application loading message to the application loading processor through a second port of a second network bridge of the first server, receiving a response message of the application loading message through a second port of the second network bridge of the first server, and sending the response message of the application loading message to the second server through the second network card of the first server.
3. The method of claim 1, further comprising:
receiving an application access request message sent by a second server through a first network card of a first server, sending the application access request message to an aggregation port of the first server through a first port of a first bridge of the first server, and sending the application access request to the application processor through the aggregation port of the first server;
or,
receiving an application access request message sent by a second server through a second network card of the first server, modifying a destination address of the application access request message into an address of a first network card of the first server according to a forwarding flow table configured on a second bridge of the first server, sending the application access request message to an aggregation port of the first server through a first port of the second bridge of the first server, and sending the application access request to the application processor through the aggregation port of the first server.
4. The method of claim 3, wherein a load balancing policy is further configured on the aggregation port of the first server, and wherein the method further comprises:
after the aggregation port of the first server receives the response message of the application access request message sent by the application processor, the first network card of the first server or the second network card of the first server is selected to forward the response message of the application access request message to the second server according to the load balancing policy.
5. The method according to claim 4, wherein when the aggregation port of the first server selects the first network card of the first server to forward the response message of the application access request message to the second server, the forwarding step comprises:
the aggregation port of the first server sends the response message of the application access request message to the first port of the first bridge of the first server, and the first port of the first bridge of the first server sends the response message of the application access request message to the second server through the first network card of the first server.
6. The method according to claim 4, wherein when the aggregation port of the first server selects the second network card of the first server to forward the response message of the application access request message to the second server, the forwarding step comprises:
the aggregation port of the first server sends a response message of the application access request message to a first port of a second bridge of the first server, the first port of the second bridge of the first server modifies a source address of the response message of the application access request message from an address of a first network card of the first server to an address of a second network card of the first server according to a forwarding flow table configured on the second bridge of the first server, and sends the response message of the application access request message to the second server through the second network card of the first server.
7. A server is characterized in that the server is applied to a server system, the system comprises at least two servers, each server comprises two network cards, two physical channels are arranged between every two servers, a first physical channel between every two servers is formed by connecting the first network cards of the two servers, and a second physical channel between every two servers is formed by connecting the second network cards of the two servers;
the method comprises the steps that a first network card of each server is correspondingly provided with a first network bridge, a second network card of each server is correspondingly provided with a second network bridge, each network bridge comprises two ports, the first port of each network bridge is bound into an aggregation port, the address of each aggregation port is set to be the address of the first network card of each server, each aggregation port is connected with an application processor in an interface mode, the second port of each network bridge is connected with an application loading processor in an interface mode, and a forwarding flow table is configured on the second network bridge of each server so that application access request messages received by the second network card of each server can be forwarded to the aggregation port of each server.
8. The server according to claim 7,
the first network card of the first server is used for receiving the application loading message sent by the second server;
a second port of the first bridge of the first server for sending the application load message to the application load processor;
the second port of the first bridge of the first server is further configured to receive a response message of the application loading message, and send the response message of the application loading message to the second server through the first network card of the first server;
the second network card of the first server is used for receiving the application loading message sent by the second server;
a second port of a second bridge of the first server for sending the application load message to the application load processor;
the second port of the second bridge of the first server is further configured to receive a response message of the application loading message, and send the response message of the application loading message to the second server through the second network card of the first server.
9. The server according to claim 7,
the first network card of the first server is also used for receiving an application access request message sent by the second server;
a first port of a first bridge of a first server, further for sending the application access request message to an aggregation port of the first server;
an aggregation port of a first server for sending the application access request to the application processor;
the second network card of the first server is used for receiving the application access request message sent by the second server, and modifying the destination address of the application access request message into the address of the first network card of the first server according to a forwarding flow table configured on the second network bridge of the first server;
a first port of a second bridge of a first server, further for sending the application access request message to an aggregation port of the first server;
the aggregation port of the first server is further configured to send the application access request to the application processor.
10. The server according to claim 9, wherein a load balancing policy is further configured on the aggregation port of the first server, and wherein:
the aggregation port of the first server is further configured to select, after receiving a response message of the application access request message sent by the application processor, the first network card of the first server or the second network card of the first server to forward the response message of the application access request message to the second server according to the load balancing policy.
11. The server according to claim 10,
the aggregation port of the first server is further used for sending a response message of the application access request message to the first port of the first bridge of the first server;
the first port of the first bridge of the first server is further configured to send a response message of the application access request message to the second server through the first network card of the first server.
12. The server according to claim 10,
the aggregation port of the first server is further used for sending a response message of the application access request message to the first port of the second bridge of the first server;
the first port of the second bridge of the first server is further configured to modify, according to a forwarding flow table configured on the second bridge of the first server, a source address of a response message of the application access request message from an address of the first network card of the first server to an address of the second network card of the first server, and send the response message of the application access request message to the second server through the second network card of the first server.
13. A server system, comprising: a gateway device and a server according to any of claims 7-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410705646.XA CN104468389B (en) | 2014-11-27 | 2014-11-27 | Processing method, server and the server system of message |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410705646.XA CN104468389B (en) | 2014-11-27 | 2014-11-27 | Processing method, server and the server system of message |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104468389A CN104468389A (en) | 2015-03-25 |
CN104468389B true CN104468389B (en) | 2018-02-06 |
Family
ID=52913785
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410705646.XA Active CN104468389B (en) | 2014-11-27 | 2014-11-27 | Processing method, server and the server system of message |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104468389B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106385365B (en) * | 2015-08-07 | 2019-09-06 | 新华三技术有限公司 | The method and apparatus for realizing cloud platform safety based on open flows Openflow table |
CN105491123B (en) * | 2015-12-04 | 2019-02-22 | 北京航空航天大学 | Inter-container communication method and device |
TWI713328B (en) * | 2018-03-19 | 2020-12-11 | 和碩聯合科技股份有限公司 | Network bridge and management method of network |
CN109547368B (en) * | 2018-11-19 | 2021-05-18 | 锐捷网络股份有限公司 | Data center-based de-stacking adaptation method and device |
CN113810200B (en) * | 2021-08-14 | 2023-01-20 | 苏州浪潮智能科技有限公司 | A communication device and data center |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1859417A (en) * | 2006-04-30 | 2006-11-08 | 西安交通大学 | Method for realizing multiple network device link aggregation |
CN101651680A (en) * | 2009-09-14 | 2010-02-17 | 杭州华三通信技术有限公司 | Network safety allocating method and network safety device |
CN101753438A (en) * | 2009-12-08 | 2010-06-23 | 中兴通讯股份有限公司 | Router for realizing passage separation and transmitting method of passage separation thereof |
CN101917337A (en) * | 2010-08-09 | 2010-12-15 | 中兴通讯股份有限公司 | Device and method for interconnecting router cluster middle plates |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100011230A1 (en) * | 2008-07-08 | 2010-01-14 | Olaf Mater | Link aggregation with dynamic bandwidth management to reduce power consumption |
EP2267983B1 (en) * | 2009-06-22 | 2018-08-08 | Citrix Systems, Inc. | System and method for providing link management in a multi-core system |
CN104079424B (en) * | 2013-03-29 | 2017-07-11 | 国际商业机器公司 | For the apparatus and method of asymmetric link polymerization |
-
2014
- 2014-11-27 CN CN201410705646.XA patent/CN104468389B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1859417A (en) * | 2006-04-30 | 2006-11-08 | 西安交通大学 | Method for realizing multiple network device link aggregation |
CN101651680A (en) * | 2009-09-14 | 2010-02-17 | 杭州华三通信技术有限公司 | Network safety allocating method and network safety device |
CN101753438A (en) * | 2009-12-08 | 2010-06-23 | 中兴通讯股份有限公司 | Router for realizing passage separation and transmitting method of passage separation thereof |
CN101917337A (en) * | 2010-08-09 | 2010-12-15 | 中兴通讯股份有限公司 | Device and method for interconnecting router cluster middle plates |
Also Published As
Publication number | Publication date |
---|---|
CN104468389A (en) | 2015-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11539626B2 (en) | Method, apparatus, and system for load balancing of service chain | |
US11218537B2 (en) | Load balancing in distributed computing systems | |
CN107078969B (en) | Realize computer equipment, the system and method for load balancing | |
US20170331862A1 (en) | Method for accessing cloud service and access device | |
CN104468389B (en) | Processing method, server and the server system of message | |
CN110234140B (en) | Communication method, device, entity and storage medium | |
US9668270B2 (en) | System and method for setting wireless message priority | |
EP3331247A1 (en) | Multi-screen control method and device | |
CN106936683B (en) | A kind of method and device for realizing tunnel configuration | |
US11234122B2 (en) | Packet forwarding in a wireless mesh network | |
CN113965521B (en) | Data packet transmission method, server and storage medium | |
CN112929264A (en) | Service flow transmission method, system and network equipment | |
CN115686818A (en) | Configuration method and device of elastic network interface ENI | |
US10171346B2 (en) | Method, apparatus and system for transmitting information | |
US20160174061A1 (en) | Transferring Data Between Mobile Devices Having Heterogeneous Wireless Communication Interfaces | |
JP2024108163A (en) | Cross-card link aggregation method, device, and medium for data processor virtual port | |
CN111107150B (en) | Connection method, gateway device and connection device for client | |
EP2938023A1 (en) | Peer-to-peer service processing method and device | |
CN109587027B (en) | Message forwarding method and device | |
US10404652B2 (en) | Communication device, communication method, and program | |
CN112804719B (en) | Method and device for realizing sequence number consistency | |
CN115801482A (en) | Method, system and medium for realizing eBPF-based multicast in cloud native environment | |
US10362070B1 (en) | Method, system, and apparatus for achieving user space intervention during connection-establishment handshakes | |
WO2025002404A1 (en) | Data forwarding method based on cloud service, and system | |
US9813968B1 (en) | Management of channel status information for LTE redirects |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220214 Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province Patentee after: Huawei Cloud Computing Technologies Co.,Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |
|
TR01 | Transfer of patent right |