What is the comparison between calico and flannel
What is the comparison between calico and flannel? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
One calico architecture
First, look at the architecture diagram of calico, as shown in the following figure.
Calico includes the following important components: Felix,etcd,BGP Client,BGP Route Reflector. Each of these components is described below.
Felix: mainly responsible for routing configuration and configuration and distribution of ACLS rules, which exists on each node node.
Etcd: distributed key-value storage, mainly responsible for the consistency of network metadata, 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 kernel to the current Calico network to ensure the effectiveness of communication between workload
BGPRoute Reflector (BIRD), used in large-scale deployment, abandons the mesh mode in which all nodes are interconnected, and completes centralized route distribution through one or more BGPRoute Reflector
Two calico principle
As shown in the following figure, it describes the process of routing from the source container to the source host, through the data center, and then to the destination host and finally to the destination container.
In the whole process, routing and forwarding is always carried out according to iptables rules, and there is no packet encapsulation and unpacking process, which is much faster than flannel.
From the above principle, we can see that flannel carries out the operation of packet unpacking on the basis of routing and forwarding, which wastes the computing resources of CPU. The following figure shows the performance comparison of the various open source network components found on the Internet. It can be seen that the performance of calico is similar to that of hosts in terms of bandwidth and network latency.
This is the answer to the question about the comparison between calico and flannel. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.