The idea of iptables CLUSTER target and Ethernet switch, iptablescluster
The air on the weekend was sultry, and the thought of it would never rain again. Every weekend, I will sum up all the things of the week, whether at work, in life, or on the way to and from work, or after reading, because it is no longer raining, I decided to have a good sleep on Saturday evening.
When I explained the principles of vswitches and hubs to my colleagues, I thought that HUB is a more efficient choice, what is the difference between iptables's simple CLUSTER target and F5's high Server Load balancer equipment? Isn't it the difference between a HUB and a learning Ethernet switch? Let's take a look at CLUSTER target.
This is simple, as shown in:
The decision-making power of the Processing Package is handed over to each server, rather than the centralized server Load balancer device. This is a typical BMA mode, which corresponds to the bus mode or HUB Mode on the Ethernet. The Ethernet data frame will arrive at each host. Whether the data frame is processed depends on whether the target MAC is local or not, or is it special, such as multicast frames and broadcast frames. In the bus and HUB era, Ethernet is actually the same as CLUSTER target. The central device is simple, the single packet forwarding is efficient, and decisions are evenly distributed to each terminal device, which improves the efficiency a lot. But what are the disadvantages? The disadvantage is that the utilization rate of effective bandwidth is reduced, because all the other packages will be processed and discarded by the terminal. For earlier bus-type Ethernet, the overhead of CSMA/CD cannot be underestimated. The overhead of CSMA/CD greatly exceeds the overhead of the look-up table after the appearance of the switch. It is precisely because of this overhead rather than anything else that causes the emergence of the HUB/switch, after the emergence of a learning-type switch, the full-duplex model only introduces the overhead of Table query.
However, the CLUSTER target does not have this problem, or the bandwidth utilization problem is not obvious. The benefits are obvious. CLUSTER target removes the need for complex operations in the Central Server Load balancer device and spof, resulting in simple deployment, easy maintenance, and high availability.
Indeed, sometimes broadcast is not a bad thing. Precise fixed-point transmission is not necessarily a good thing, and Table query is overhead. In this case, you need to evaluate the efficiency of Table query. In some cases, for example, when a hardware accelerator card is used to query tables, the advantage of efficient bandwidth utilization is offset by the overhead of the table. Soft-implemented Lookup tables are useless in simple cases. Because of this, MAC/Port ing is not implemented in VMWare vswitches, that is, MAC address learning. For a long time, when people talk about Server Load balancer, they always need to contact a device. This device is used for Server Load balancer, just as people have always thought that a device can speed up data streams with TMD (as long as it is a device, it is slowing down. acceleration is a scam and actually uses cache !), For Server Load balancer, there are originally N processing nodes, and the results all need to be TMD aggregated to a so-called Server Load balancer device, which determines the data flow, this centralized control is more to centralize the distribution of processing nodes within a controllable range. Logically speaking, it is a lack of trust in server configurations (how can we make them work together? Don't you need to configure them ?), Physically, a single point of failure (bottleneck and fault) is introduced manually. Economically, one device can be sold. To solve the single point of failure (spof), several more devices can be sold... sell a few more.
The problem of Ethernet broadcast overhead makes distributed frame receiving a central distribution control. However, the CLUSTER target of iptables allows people to see the advantages of distributed distribution. When the bandwidth utilization is low, please first calculate what high bandwidth utilization is for. For senior people who have been poisoned too deeply, they may be dismissive of my opinion. However, I beg not to dislike it.