Comparison of calico and flannel

A calico architecture

First, please look at the architecture diagram of calico, as shown below.

 

calico includes the following important components: Felix, etcd, BGP Client, and BGP Route Reflector. These components are described below.

Felix: It is mainly responsible for routing configuration and configuration and distribution of ACLS rules. It exists on each node.

etcd: distributed key-value storage, mainly responsible for network metadata consistency, ensuring the accuracy of Calico network status , and can be shared with kubernetes ;

BGPClient(BIRD), which is mainly responsible for distributing the routing information written by Felix into the kernel to the current Calico network to ensure the effectiveness of communication between workloads;

BGPRoute Reflector (BIRD), used in large-scale deployment, abandons the mesh mode of interconnecting all nodes, and completes centralized route distribution through one or more BGPRoute Reflectors;

Two calico principle

As shown in the figure below, it describes the process of routing from the source container through the source host, through the data center, and then to the destination host and finally assigning it to the destination container.

In the whole process, routing and forwarding are always performed according to iptables rules, and there is no process of encapsulation and unpacking, which is much faster than flannel.

Three flannel principles

Four comparisons

It can be seen from the above principles that the flannel performs the packet unpacking operation on the basis of routing and forwarding, which wastes the computing resources of the CPU. The following figure is a performance comparison of various open source network components found on the Internet. It can be seen that whether it is bandwidth or network delay, the performance of calico and the host is similar.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324388340&siteId=291194637