Method for communication in data center, apparatus, and system
One example method includes receiving network topology information delivered by a topology manager, where the data center includes a plurality of servers, a plurality of electrical switches, and at least one optical cross-connect device. A data flow can be obtained. A routing policy can be configured for the data flow based on the network topology information, where the routing policy includes any one or a combination of the following routing policies: a first routing policy, where the first routing policy indicates to forward the data flow through an optical channel in the at least one optical cross-connect device; a second routing policy, where the second routing policy indicates to split the data flow into at least two sub-data flows for forwarding; or a third routing policy, where the third routing policy indicates to forward the data flow through an electrical switch of the plurality of electrical switches.
1 . A method for communication in a data center, wherein the data center comprises a plurality of servers, a plurality of electrical switches, and at least one optical cross-connect device, and uplink ports of at least two of the plurality of electrical switches are interconnected to the at least one optical cross-connect device, and wherein the method comprises:
receiving network topology information delivered by a topology manager;
obtaining a data flow; and
configuring a routing policy for the data flow based on the network topology information, wherein;
the configuring a routing policy for the data flow based on the network topology information comprises:
identifying feature information carried in packets of the data flow; and if the feature information of the packets matches preset information, determining that the data flow is a tidal elephant flow; or
identifying a quantity of packets of the data flow in a first time period, or an amount of data comprised in packets in a first time period, or a bandwidth required by packets in a first time period; and if the quantity of packets, the amount of data, or the required bandwidth in the first time period is greater than a preset threshold, determining that the data flow is a regular elephant flow; and
the routing policy comprises any one or a combination of the following routing policies:
a first routing policy, wherein the first routing policy indicates to forward the tidal elephant flow through an optical channel in the at least one optical cross-connect device;
a second routing policy, wherein the second routing policy indicates to split the regular elephant flow into at least two sub-data flows for forwarding; and
a third routing policy, wherein the third routing policy indicates to forward the data flow through an electrical switch of the plurality of electrical switches in the data center.
2 . The method according to claim 1 , wherein the configuring a routing policy for the data flow based on the network topology information comprises:
when a first packet of the data flow is received, configuring the third routing policy for the data flow based on address information carried in the data flow and the network topology information.
3 . The method according to claim 2 , wherein the configuring a routing policy for the data flow based on the network topology information further comprises:
identifying a type of the data flow based on the packets of the data flow; and
configuring an updated routing policy for the data flow based on the type of the data flow, wherein the updated routing policy comprises the first routing policy or the second routing policy.
4 . The method according to claim 3 , wherein the configuring an updated routing policy for the data flow based on the type of the data flow comprises:
configuring the first routing policy for a data flow of a first type, wherein the data flow of the first type is the tidal elephant flow.
5 . The method according to claim 4 , wherein the method further comprises:
selecting a target optical cross-connect device from the at least one optical cross-connect device;
indicating the target optical cross-connect device to establish the optical channel;
obtaining first sub-routing information, wherein the first sub-routing information comprises information on routing the data flow of the first type to the target optical cross-connect device; and
forwarding subsequent packets of the data flow of the first type to the target optical cross-connect device based on the first sub-routing information.
6 . The method according to claim 3 , wherein the configuring an updated routing policy for the data flow based on the type of the data flow comprises:
configuring the second routing policy for a data flow of a second type, wherein the data flow of the second type is the regular elephant flow.
7 . The method according to claim 6 , wherein the method further comprises:
obtaining routing information of at least two equal-cost sub-paths based on the second routing policy;
splitting subsequent packets of the data flow of the second type into at least two sub-data flows; and
forwarding the at least two sub-data flows based on the routing information of the at least two equal-cost sub-paths.
8 . A data center, wherein the data center comprises a plurality of servers, a plurality of electrical switches, and at least one optical cross-connect device, and uplink ports of at least two of the plurality of electrical switches are interconnected to the at least one optical cross-connect device, and wherein at least one of the plurality of servers is configured to:
receive network topology information;
obtain a data flow; and
configure a routing policy for the data flow based on the network topology information, wherein:
the configuring a routing policy for the data flow based on the network topology information comprises:
identifying feature information carried in packets of the data flow; and if the feature information of the packets matches preset information, determining that the data flow is a tidal elephant flow; or
identifying a quantity of packets of the data flow in a first time period, or an amount of data comprised in packets in a first time period, or a bandwidth required by packets in a first time period; and if the quantity of packets, the amount of data, or the required bandwidth in the first time period is greater than a preset threshold, determining that the data flow is a regular elephant flow; and
the routing policy comprises any one or a combination of the following routing policies:
a first routing policy, wherein the first routing policy indicates to forward the tidal elephant flow through an optical channel in the at least one optical cross-connect device;
a second routing policy, wherein the second routing policy indicates to split the regular elephant flow into at least two sub-data flows for forwarding; and
a third routing policy, wherein the third routing policy indicates to forward the data flow through an electrical switch of the plurality of electrical switches in the data center.
9 . The data center according to claim 8 , wherein the plurality of servers and the plurality of electrical switches form a plurality of service clusters, wherein a first service cluster comprises at least two servers, at least two access switches, and at least one aggregation switch, first uplink ports of the at least two access switches are interconnected to the at least one optical cross-connect device, and second uplink ports of the at least two access switches are interconnected to the at least one aggregation switch.
10 . The data center according to claim 8 , wherein the plurality of servers and the plurality of electrical switches form a plurality of service clusters, wherein a first service cluster comprises at least two access switches and at least one aggregation switch, a first uplink port of the at least one aggregation switch is interconnected to the at least one optical cross-connect device, and a second uplink port of the at least one aggregation switch is interconnected to a backbone switch.
11 . The data center according to claim 8 , wherein the plurality of servers and the plurality of electrical switches form a plurality of service clusters, wherein a first service cluster comprises at least two servers, at least two access switches, and at least one aggregation switch, first uplink ports of the at least two access switches are interconnected to a first optical cross-connect device in the at least one optical cross-connect device, second uplink ports of the at least two access switches are interconnected to the at least one aggregation switch, a first uplink port of the at least one aggregation switch is interconnected to a second optical cross-connect device in the at least one optical cross-connect device, and a second uplink port of the at least one aggregation switch is interconnected to a backbone switch.
12 . The data center according to claim 8 , wherein the data center further comprises a topology manager, and the topology manager is configured to:
obtain network connection information sent by each device in the data center;
obtain the network topology information based on the network connection information of the device; and
deliver the network topology information to the at least one of the plurality of servers.
13 . The data center according to claim 12 , wherein the at least one server comprises a network interface card, wherein the network interface card obtains the network topology information delivered by the topology manager, and the network interface card configures the routing policy based on the network topology information.
14 . The data center according to claim 13 , wherein in response to receiving a first packet of the data flow, the network interface card configures the third routing policy for the data flow based on address information carried in the data flow and the network topology information.
15 . The data center according to claim 14 , wherein the network interface card identifies a type of the data flow based on the packets of the data flow, and configures an updated routing policy for the data flow based on the type of the data flow, wherein the updated routing policy comprises the first routing policy or the second routing policy.
16 . The data center according to claim 15 , wherein the network interface card configures the first routing policy for a data flow of a first type, wherein the data flow of the first type is the tidal elephant flow, or configures the second routing policy for a data flow of a second type, wherein the data flow of the second type is the regular elephant flow.
17 . The data center according to claim 16 , wherein the network interface card is further configured to:
select a target optical cross-connect device from the at least one optical cross-connect device;
indicate the target optical cross-connect device to establish the optical channel;
obtain first sub-routing information, wherein the first sub-routing information comprises information on routing the data flow of the first type to the target optical cross-connect device; and
forward subsequent packets of the data flow of the first type to the target optical cross-connect device based on the first sub-routing information.
18 . The data center according to claim 16 , wherein the network interface card is further configured to obtain routing information of at least two equal-cost sub-paths based on the third routing policy, and wherein the network interface card is further configured to:
split subsequent packets of the data flow of the second type into at least two sub-data flows; and
forward the at least two sub-data flows based on the routing information of the at least two equal-cost sub-paths.
19 . A server of a data center, wherein the server comprises:
at least one processor; and
one or more memories coupled to the at least one processor and storing programming instructions for execution by the at least one processor to perform operations comprising:
receiving network topology information delivered by a topology manager;
obtaining a data flow; and
configuring a routing policy for the data flow based on the network topology information, wherein;
the configuring a routing policy for the data flow based on the network topology information comprises:
identifying feature information carried in packets of the data flow; and if the feature information of the packets matches preset information, determining that the data flow is a tidal elephant flow; or
identifying a quantity of packets of the data flow in a first time period, or an amount of data comprised in packets in a first time period, or a bandwidth required by packets in a first time period; and if the quantity of packets, the amount of data, or the required bandwidth in the first time period is greater than a preset threshold, determining that the data flow is a regular elephant flow; and
the routing policy comprises any one or a combination of the following routing policies:
a first routing policy, wherein the first routing policy indicates to forward the tidal elephant flow through an optical channel in at least one optical cross-connect device in the data center;
a second routing policy, wherein the second routing policy indicates to split the regular elephant flow into at least two sub-data flows for forwarding; and
a third routing policy, wherein the third routing policy indicates to forward the data flow through an electrical switch of a plurality of electrical switches in the data center, wherein uplink ports of the electrical switches is interconnected to the at least one optical cross-connect device.
20 . A network interface card, wherein the network interface card comprises:
at least one processor; and
one or more memories coupled to the at least one processor and storing programming instructions for execution by the at least one processor to perform operations comprising:
receiving network topology information delivered by a topology manager;
obtaining a data flow; and
configuring a routing policy for the data flow based on the network topology information, wherein:
the configuring a routing policy for the data flow based on the network topology information comprises:
identifying feature information carried in packets of the data flow; and if the feature information of the packets matches preset information, determining that the data flow is a tidal elephant flow; or
identifying a quantity of packets of the data flow in a first time period, or an amount of data comprised in packets in a first time period, or a bandwidth required by packets in a first time period; and if the quantity of packets, the amount of data, or the required bandwidth in the first time period is greater than a preset threshold, determining that the data flow is a regular elephant flow; and
the routing policy comprises any one or a combination of the following routing policies:
a first routing policy, wherein the first routing policy indicates to forward the tidal elephant flow through an optical channel in at least one optical cross-connect device in a data center;
a second routing policy, wherein the second routing policy indicates to split the data flow into at least two sub-data flows for forwarding; and
a third routing policy, wherein the third routing policy indicates to forward the regular elephant flow through an electrical switch of a plurality of electrical switches in the data center, wherein uplink ports of the electrical switches is interconnected to the at least one optical cross-connect device.