Welcome! Log In Create A New Profile

Advanced

Re: nginx can't implement session stickiness with nodeport services, must be clusterip?

Sergey A. Osokin
March 13, 2024 05:04PM
Hi David,

On Fri, Mar 08, 2024 at 11:18:10AM -0800, David Karr wrote:
> I maintain the Java side of a platform that supports a couple of hundred
> services running in a number of k8s clusters. Each pod has a container
> running the Java process, and a container running nginx, as a proxy to the
> Java service. All the k8s service objects are type NodePort, not ClusterIP.
>
> I don't know a lot about nginx, we consider it mostly a blackbox.

How's nginx configured there? Is it L7 or L4 reverse proxy?

> We have one service that unfortunately requires session stickiness.

The "session persistense" feature avaialable with NGINX Plus product,
[1].

> I am being told that we have to change the service type for this service
> to ClusterIP, because, and I quote the person who told me this:
>
> "Nginx needs to be able to read the "endpoint" objects off of the
> service. For some reason, that's not possible with NodePorts, but works
> fine with ClusterIPs."
>
> Does this make sense to anyone here? Can someone explain why this might be?

That's a bit unclear to me, so that needs to get more details
about the current solution.

Thank you.

References
----------
1. https://docs.nginx.com/nginx/admin-guide/load-balancer/http-load-balancer/#enabling-session-persistence

--
Sergey A. Osokin
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx can't implement session stickiness with nodeport services, must be clusterip?

David Karr March 08, 2024 02:20PM

Re: nginx can't implement session stickiness with nodeport services, must be clusterip?

Sergey A. Osokin March 13, 2024 05:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 222
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready