projectcalico / calico

Cloud native networking and network security
https://docs.tigera.io/calico/latest/about/
Apache License 2.0
5.97k stars 1.32k forks source link

Calico BGP use iptables or IPVS ? How can I choose ? #5849

Closed liuchaowhu closed 2 years ago

liuchaowhu commented 2 years ago

My K8S cluster is calico BGP, there are iptables and ipvs modes to choose from, how can I test their performance, can anyone provide a method?

lwr20 commented 2 years ago

there are iptables and ipvs modes to choose from

Minor point, but kube-proxy supports these modes, not Calico.

how can I test their performance, can anyone provide a method?

Well it all depends what you're trying to test?

Performance dimensions you might want to test include:

For latency, this blog post may be of interest: https://www.tigera.io/blog/comparing-kube-proxy-modes-iptables-or-ipvs/. For that blog we tested using vegeta, but you could use any web load testing framework that reports latency.

For throughput, you might be interested in this blog post: https://medium.com/itnext/benchmark-results-of-kubernetes-network-plugins-cni-over-10gbit-s-network-updated-august-2020-6e1b757b9e49 That blog used scripts from https://github.com/InfraBuilder/k8s-bench-suite to run iperf to test throughput.

lwr20 commented 2 years ago

You didn't ask about this, but for completeness, I'd like to note that Calico supports other dataplanes too - iptables, ebpf and vpp.

This blog post compares calico iptables to calico ebpf: https://www.tigera.io/blog/introducing-the-calico-ebpf-dataplane/

And this compares iptables to vpp: https://www.tigera.io/blog/lightning-fast-kubernetes-networking-with-calico-vpp/