Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx-controller re-loads its config when TCP proxied endpoints change #9373

Closed
troodes opened this issue Dec 5, 2022 · 5 comments
Closed
Labels
kind/support Categorizes issue or PR as a support question. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@troodes
Copy link

troodes commented Dec 5, 2022

What happened:
We use the ingress-nginx to proxy several TCP ports, as well as HTTP services. By "TCP proxied ports", I mean this: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md

I'm noticing nginx config reloads happen when endpoints of the proxied TCP services change, but no reloads occur when HTTP proxied endpoints change. Based on https://kubernetes.github.io/ingress-nginx/how-it-works/ I would expect reloads to not happen on endpoints status changes, but that doesn't appear to be the case for the TCP proxied endpoints.

What you expected to happen:

Ideally, no reloads would happen, similar to the way it is handled for HTTP proxied service endpoints.

NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):

NGINX Ingress controller
  Release:       v1.2.0
  Build:         a2514768cd282c41f39ab06bda17efefc4bd233a
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.19.10
-------------------------------------------------------------------------------

Kubernetes version (use kubectl version):
kubectl version: 1.23.7

Environment:

  • baremetal, Red Hat Enterprise Linux release 8.6

  • How was the ingress-nginx-controller installed:
    # helm ls -A | grep -i ingress nginx-ingress default 3 2022-11-30 14:18:32.16446935 -0500 EST deployed ingress-nginx-4.1.2 1.2.0

How to reproduce this issue:
Expose a TCP port, as described here: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md
For a proxied TCP service, restart the pod of the app associated with it
Observe the following in the nginx logs:

I1205 19:23:12.380089       7 controller.go:166] "Configuration changes detected, backend reload required"
I1205 19:23:12.552513       7 controller.go:183] "Backend successfully reloaded"

I'm seeing 2x reloads happen when the TCP endpoint goes down, and then comes back up presumably?
In my case, frequent reloads are leading to OOM problems, but at this point I'm just trying to figure out if re-loads should be expected for TCP proxied ports?

@troodes troodes added the kind/bug Categorizes issue or PR as related to a bug. label Dec 5, 2022
@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority labels Dec 5, 2022
@longwuyuan
Copy link
Contributor

@troodes, the connection from the controller pod to a new endpoint has to be re-established, I am assuming.

/remove-kind bug
/kind support

@k8s-ci-robot k8s-ci-robot added kind/support Categorizes issue or PR as a support question. and removed kind/bug Categorizes issue or PR as related to a bug. labels Dec 6, 2022
@strongjz
Copy link
Member

strongjz commented Dec 8, 2022

/assign @rikatz
/triage accepted
/priority backlog

We need to review if the lua code that is responsible for the hot reload on HTTP but not TCP so we need to investigate that.

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority labels Dec 8, 2022
@k8s-triage-robot
Copy link

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jan 19, 2024
@longwuyuan
Copy link
Contributor

The tcp/udp proxy feature is being deprecated #11666, so this issue can not track any action items hence closing it.

/close

@k8s-ci-robot
Copy link
Contributor

@longwuyuan: Closing this issue.

In response to this:

The tcp/udp proxy feature is being deprecated #11666, so this issue can not track any action items hence closing it.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

6 participants