Load Distribution to Multiple Servers via Switch

Load Distribution

Platform
Napatech SmartNIC
Content Type
User Guide
Capture Software Version
Link™ Capture Software 12.8

Load distribution using the Action command

Received traffic can be distributed to the host as well as multiple servers using the Action command in combination with the Assign command. The following NTPL example shows how to configure the SmartNIC to distribute frames to the host as well as to another server at the same time.
HashMode[Priority = 1; Layer3Type=IP] = Hash2TupleSorted
HashMode[Priority = 0; Layer3Type=IP; Layer4Type=TCP,UDP,SCTP] = Hash5TupleSorted

Action[Tag=example; Width=24]={Index=0..11; StreamID=0..11},{Index=12..23; DestinationPort=1}
Assign[Action=example]=Port==0
The Width parameter specifies the number of indices which are used for dividing the received traffic. The load distribution is configured by associating indices to streams in the host and associating indices to physical ports. In this NTPL example, the first 12 out of 24 indices are associated to streams in the host, and the last 12 indices are associated to port 1.

The frame indexing is controlled by a "table" with 4,096 entries in the SmartNIC. The following figure shows how the Action command is operated in the index table. The indexing table contains information including stream ID, port number and VLAN tag.


Page-1 Sheet.1 Sheet.2 Sheet.3 Sheet.4 Sheet.5 Sheet.6 Sheet.7 Sheet.8 Sheet.9 Sheet.10 Sheet.11 Sheet.12 Sheet.13 Sheet.14 Sheet.15 HW table HW table Sheet.17 Action[Tag=Test1, Width=8] = {Index=0..3; StreamId=1}, {Index... Action[Tag=Test1, Width=8] = {Index=0..3; StreamId=1}, {Index=4..7; StreamId=2}, {Index=0..7; DestinationPort=1; Vlan=101..108}Assign[Action=Test1] = Port == 0 And Layer3Protocol == IP Sheet.18 Sheet.19 Width Width Sheet.22 Sheet.23 Sheet.24 Sheet.25 StreamId StreamId Sheet.27 1 1 Sheet.28 1 1 Sheet.29 1 1 Sheet.30 1 1 Sheet.31 2 2 Sheet.32 2 2 Sheet.33 2 2 Sheet.34 2 2 Sheet.35 Sheet.36 VLAN VLAN Sheet.37 101 101 Sheet.38 102 102 Sheet.39 103 103 Sheet.40 104 104 Sheet.41 105 105 Sheet.42 106 106 Sheet.43 107 107 Sheet.44 108 108 Sheet.45 Port Port Sheet.46 1 1 Sheet.47 1 1 Sheet.48 1 1 Sheet.49 1 1 Sheet.50 1 1 Sheet.51 1 1 Sheet.52 1 1 Sheet.53 1 1 Sheet.54 . . . . . . Sheet.55 . . . . . . Sheet.56 . . . . . . Sheet.57 . . . . . . Sheet.70 . . . . . . Sheet.71

The following figure shows that the load balance module controls distributing received frames to multiple streams in the host as well as retransmitting on physical ports.


Page-1 Sheet.3 SmartNIC SmartNIC Sheet.1 Port 0 Port 0 Sheet.4 Hash Hash Sheet.9 Sheet.10 Sheet.5 Sheet.11 VLAN Tag VLAN Tag Sheet.12 Sheet.13 Sheet.14 Load Balancer Load Balancer Sheet.15 Buffer Buffer Sheet.16 Sheet.17 Sheet.18 Sheet.21 Stream 0 Stream 0 Sheet.25 Sheet.28 Sheet.29 Sheet.30 Sheet.32 Sheet.33 ... ... Sheet.34 Port 1 Port 1 Sheet.35 Stream 1 Stream 1 Sheet.36 Stream 2 Stream 2 Sheet.37 Stream n Stream n

Load distribution to external servers using VLAN tagging

Traffic can be distributed to multiple servers with a standard NIC via a VLAN-aware switch as shown in the figure below.


Page-1 Sheet.27 Round Corner Rectangle SmartNIC SmartNIC Round Corner Rectangle.24 Round Corner Rectangle.25 Round Corner Rectangle.26 Round Corner Rectangle.27 Round Corner Rectangle.28 Round Corner Rectangle.29 Round Corner Rectangle.30 Round Corner Rectangle.31 L Shape Round Corner Rectangle.33 Round Corner Rectangle.34 L Shape.38 Cloud.23 Sheet.42 Rectangle.140 VLAN-aware Switch VLAN-aware Switch Sheet.46 Sheet.52 VLAN 101 VLAN 101 Cloud.53 Sheet.54 Dynamic connector.55 Hard drive Dynamic connector.138 Dynamic connector.144 Dynamic connector.145 Dynamic connector.187 Hard drive.188 Dynamic connector.189 Hard drive.190 Sheet.191 VLAN 102 VLAN 102 Sheet.192 VLAN 103 VLAN 103 Sheet.195 Sheet.196 Sheet.197 Sheet.198 Database Database.203 Database.204 Database.205

In the figure, all received frames are distributed to the host and 3 other servers. All received frames will obtain 3 VLAN tags (101, 102 and 103) and will be transmitted on port 1. See an NTPL example below.
HashMode[Priority = 1; Layer3Type=IP] = Hash2TupleSorted
HashMode[Priority = 0; Layer3Type=IP; Layer4Type=TCP,UDP,SCTP] = Hash5TupleSorted

Action[Tag=vlan_example; Width=16] = {Index=0..3; StreamId=0..3}, {Index=4..15; DestinationPort=1; Vlan=101..103} 
Assign[Action=vlan_example] = All
In this NTPL example, The first 4 out of 16 indices are associated to 4 streams in the host, and the last 12 indices are associated to port 1.
Frames can be distributed to multiple servers based on the VLAN ranges as shown in the following figure.
Page-1 Sheet.1 Round Corner Rectangle SmartNIC SmartNIC Round Corner Rectangle.24 Round Corner Rectangle.25 Round Corner Rectangle.26 Round Corner Rectangle.27 Round Corner Rectangle.28 Round Corner Rectangle.29 Round Corner Rectangle.30 Round Corner Rectangle.31 L Shape Round Corner Rectangle.33 Round Corner Rectangle.34 L Shape.38 Rectangle.140 VLAN-aware Switch VLAN-aware Switch Sheet.16 Sheet.17 VLAN range 100-104 VLAN range 100-104 Cloud.53 Sheet.19 Dynamic connector.55 Hard drive Dynamic connector.138 Dynamic connector.144 Dynamic connector.145 Dynamic connector.187 Hard drive.188 Sheet.33 VLAN range 105-108 VLAN range 105-108 Cloud.23 Sheet.35 Sheet.36 VLAN tagging VLAN tagging Sheet.37 Sheet.38 Sheet.39 Sheet.40 Database Database.203 Database.204 Database.205

The received frames in each server can be distributed and processed in multiple CPU cores using VLAN tags if the networking device capable of receive side scaling (RSS) is used in the system, for example. See an NTPL example below.
HashMode[Priority = 1; Layer3Type=IP] = Hash2TupleSorted
HashMode[Priority = 0; Layer3Type=IP; Layer4Type=TCP,UDP,SCTP] = Hash5TupleSorted

Action[Tag=vlan_example; Width=12] = {Index=0..3; StreamId=0..3}, {Index=4..11; DestinationPort=1; Vlan=101..108} 
Assign[Action=vlan_example] = All
Adding VLAN TPIDs is supported in addition to adding VLAN tags. The following NTPL example shows how to add a VLAN TPID.
HashMode[Priority = 1; Layer3Type=IP] = Hash2TupleSorted
HashMode[Priority = 0; Layer3Type=IP; Layer4Type=TCP,UDP,SCTP] = Hash5TupleSorted

Action[Tag=vlan_example; VlanTpid=0x9100; Width=8] = {Index=0..7; StreamId=0..3}, \\
{Index=0..7; DestinationPort=1; Vlan=101..108}
Assign[Action=vlan_example] = All
Note: TPID 0x8100, 0x88A8 and 0x9100 are supported. Default is 0x8100 if not specified.
Note: The VLAN tagging feature of the locally retransmitted frames is supported on the following SmartNICs:
  • NT200A02 SmartNICs running on a capture/replay image
  • NT100A01 SmartNICs running on a test and measurement image