Source load balancing of data packets
Disclosed is a method for load balancing at the source side rather than the destination side of a network. Destination networks can communicate with source load balancers by transmitting network protocol advertisements such as border gateway protocol (BGP) advertisements. The advertisements can communicate prefixes representing available subnets for load balancing purposes. The source load balancer would then load balance and transmit the network traffic along a path made up at least in part by the prefixes advertised by the network.
1 . A method comprising:
receiving, at a load balancer at a source, an advertisement from a network device at a destination, the advertisement including a prefix representing an available subnet at the destination, wherein the available subnet is advertised as a next-hop subnet usable by the load balancer for forwarding network traffic toward a destination IP address at the destination;
determining, by the load balancer at the source, a distribution of network traffic from the source among a plurality of available subnets represented by prefixes received in one or more of the advertisements;
selecting one of the available subnets as the next-hop subnet for a packet of the network traffic independently of whether the destination IP address is included within IP addresses of the selected available subnet; and
transmitting, by the load balancer at the source, the network traffic to the destination according to the distribution, including for the packet of the network traffic having the destination IP address, wherein, when the destination IP address is not within the selected available subnet, the packet is forwarded from the selected available subnet to a second subnet at the destination.
2 . The method of claim 1 , wherein the advertisement is a border gateway protocol (BGP) advertisement.
3 . The method of claim 1 , further comprising receiving, from the network device at the destination, an indication that IP addresses within the available subnet are capable of receiving the network traffic from the source.
4 . The method of claim 1 , further comprising receiving a second advertisement from the network device, the second advertisement advertising a different pool of IP addresses as the available subnet based on network analysis or user input at the network device at the destination.
5 . The method of claim 1 , further comprising:
determining, by the load balancer at the source, that the selected available subnet includes a destination IP address of the network traffic,
wherein transmitting the network traffic includes transmitting the network traffic to the selected available subnet including the destination IP address.
6 . The method of claim 1 , wherein transmitting, by the load balancer at the source, the network traffic to the destination includes:
transmitting, to a gateway router of the selected available subnet, the network traffic;
providing a destination IP address to the gateway router of the selected available subnet to permit the gateway router to determine whether the destination IP address is included within IP addresses of the selected available subnet; and
providing, within the network traffic, an indication to transmit the network traffic to the destination IP address if the destination IP address is within the selected available subnet, or transmit the network traffic to a second subnet if the destination IP address is not within the selected available subnet.
7 . The method of claim 1 , wherein the destination is at least one of a data center, a server, a cloud computing environment, a virtual machine, a network storage device, a router, a switch, or a firewall.
8 . A load balancer comprising:
a storage configured to store instructions; and
at least one processor configured to execute the instructions and cause the at least one processor to:
receive, at a source, an advertisement from a network device at a destination, the advertisement including a prefix representing an available subnet at the destination, wherein the available subnet is advertised as a next-hop subnet usable by the load balancer for forwarding network traffic toward a destination IP address at the destination;
determine, at the source, a distribution of network traffic from the source among a plurality of available subnets represented by prefixes received in one or more of the advertisements;
select one of the available subnets as the next-hop subnet for a packet of the network traffic independently of whether the destination IP address is included within IP addresses of the selected available subnet; and
transmit, at the source, the network traffic to the destination according to the distribution, including for the packet of the network traffic having the destination IP address, wherein, when the destination IP address is not within the selected available subnet, the packet is forwarded from the selected available subnet to a second subnet at the destination.
9 . The load balancer of claim 8 , wherein the advertisement is a BGP advertisement.
10 . The load balancer of claim 8 , wherein the at least one processor is configured to execute the instructions and further cause the at least one processor to receive, from the network device at the destination, an indication that IP addresses within the available subnet are capable of receiving the network traffic from the source.
11 . The load balancer of claim 8 , wherein the at least one processor is configured to execute the instructions and further cause the at least one processor to receive a second advertisement from the network device, the second advertisement advertising a different pool of IP addresses as the available subnet based on network analysis or user input at the network device at the destination.
12 . The load balancer of claim 8 , wherein the at least one processor is configured to execute the instructions and further cause the at least one processor to:
determine, at the source, that the selected available subnet includes a destination IP address of the network traffic,
wherein transmitting the network traffic includes transmitting the network traffic to the selected available subnet including the destination IP address.
13 . The load balancer of claim 8 , wherein the instructions to transmit, by the load balancer at the source, the network traffic to the destination includes:
transmitting, to a gateway router of the selected available subnet, the network traffic;
providing a destination IP address to the gateway router of the selected available subnet to permit the gateway router to determine whether the network traffic includes the destination IP address included within IP addresses of the selected available subnet; and
providing, within the network traffic, an indication to transmit the network traffic to the destination IP address if the destination IP address is within the selected available subnet, or transmit the network traffic to a second subnet if the destination IP address is not within the selected available subnet.
14 . The load balancer of claim 8 , wherein the destination is at least one of a data center, a server, a cloud computing environment, a virtual machine, a network storage device, a router, a switch, or a firewall.
15 . A non-transitory computer-readable storage medium including instructions that, when executed by at least one processor, cause the at least one processor to:
receive, at a source, an advertisement from a network device at a destination, the advertisement including a prefix representing an available subnet at the destination, wherein the available subnet is advertised as a next-hop subnet usable by the load balancer for forwarding network traffic toward a destination IP address at the destination;
determine, at the source, a distribution of network traffic from the source among a plurality of available subnets represented by prefixes received in one or more of the advertisements;
select one of the available subnets as the next-hop subnet for a packet of the network traffic independently of whether the destination IP address is included within IP addresses of the selected available subnet; and
transmit, at the source, the network traffic to the destination according to the distribution, including for the packet of the network traffic having the destination IP address, wherein, when the destination IP address is not within the selected available subnet, the packet is forwarded from the selected available subnet to a second subnet at the destination.
16 . The non-transitory computer-readable storage medium of claim 15 , wherein the advertisement is a BGP advertisement.
17 . The non-transitory computer-readable storage medium of claim 15 , wherein the at least one processor is configured to execute the instructions and further cause the at least one processor to receive, from the network device at the destination, an indication that IP addresses within the available subnet are capable of receiving the network traffic from the source.
18 . The non-transitory computer-readable storage medium of claim 15 , wherein the at least one processor is configured to execute the instructions and further cause the at least one processor to receive a second advertisement from the network device, the second advertisement advertising a different pool of IP addresses as the available subnet based on network analysis or user input at the network device at the destination.
19 . The non-transitory computer-readable storage medium of claim 15 , wherein the at least one processor is configured to execute the instructions and further cause the at least one processor to:
determine, at the source, that the selected available subnet includes a destination IP address of the network traffic,
wherein transmitting the network traffic includes transmitting the network traffic to the selected available subnet including the destination IP address.
20 . The non-transitory computer-readable storage medium of claim 15 , wherein the instructions to transmit, at the source, the network traffic to the destination includes:
transmitting, to a gateway router of the selected available subnet, the network traffic;
providing a destination IP address to the gateway router of the selected available subnet to permit the gateway router to determine whether the destination IP address is included within IP addresses of the selected available subnet; and
providing, within the network traffic, an indication to transmit the network traffic to the destination IP address if the destination IP address is within the selected available subnet, or transmit the network traffic to a second subnet if the destination IP address is not within the selected available subnet.