Does `kubectl port-forward` introduce lots of latency?

10/14/2021
  • I am running 3 local VMs with kubernetes cluster on it via Rancher.
  • I have a rabbitmq 3 replicaset cluster as a ClusterIP service.
  • I am running some code that utilizes rabbitmq (python celery).

I was wondering if kubectl port-forard --namespace default svc/celery-rabbitmq 5672:5672 added lots of latency because I have to increase my timeout values from what I want (0.1 or 0.2 seconds to something like 1.0 seconds).

Does kubectl port-forward introduce lots of latency?

Would I get better performance if I ran rabbitmq as a NodePort service without the additional kubectl port-forward command?

related: https://stackoverflow.com/questions/59807419/performance-considerations-for-nodeport-vs-clusterip-vs-headless-service-on-ku but unfortunately this does not talk about kubectl port-forward

-- Trevor Boyd Smith
kubectl
kubernetes
latency
performance
portforwarding

0 Answers