Nginx ingress slows occasionally?

Hi there!

I’ve recently started trying out Rancher 2.0 and notice some strange behavior with hostname ingress. In my experiment, I tried deploying two replicas of tutum/hello-world image that’s linked to a service that’s then exposed by host-based ingress. In this configuration, I noticed

  • The round-robin load balancing never kicked in
  • If one of the replica pod is killed a 504 from nginx ingress is thrown for a few seconds
  • There’s about a 50/50 chance that a request is delayed for 5 seconds for no apparent reasons

Is this an issue for anyone else? How do you go around this? I don’t mind using nodePort and setup an external load balancer as well (NodePort doesn’t work for me at all too)

Any help is appreciated.

Edit: More info on this issue
This problem doesn’t occur when replica=1 and upon inspecting nginx-ingress-controller’s log I found upstream timed out errrors

It seems that the loadbalancer couldn’t only reach one pod at a time causing the delay. All nodes are on the same network

Issue Opened: https://github.com/rancher/rancher/issues/13618