<p>I have set up an nginx ingres that routes traffic to specific deployments based on host. </p>

<blockquote>
  <p><code>host A --&gt; Service A, host B --&gt; Service B</code></p>
</blockquote>

<p>If I update the config for Deployment A, that update completes in <em>less than 2 seconds</em>. However, my nginx ingress goes down for host A after that and takes <em>5 to 7 seconds</em> to point to Service A with new pod. </p>

<p>How can I reduce this delay? Is there a way to speed up the performance of the nginx ingress so that it points to the new pod as soon as possible ( preferably less than 3 seconds?)</p>

<p>Thank you!</p>

crossvalidator
<p>You can use the <code>nginx.ingress.kubernetes.io/service-upstream</code> annotation to suppress the normal Endpoints behavior and use the Service directly instead. This has better integration with some deployment models but 5-7 seconds is extreme for ingress-nginx to be seeing the Endpoints update. There can be a short gap from when a pod is removed and when ingress-nginx sees the Endpoint removal. You usually fix that with a pre-stop hook that just sleeps for a few seconds to ensure by the time it actually exits, the Endpoint change has been processed everywhere.</p>
