Devika Awasthi
September 20, 2018 01:26AM
Many Thanks Maxim,

But we did try to achieve the functionality by using - nginx=1.10.3-r1, we
couldn't get request based session stickiness.
Basically we want the requests with identical query params to hit the same
instance everytime.

By recompiling again with this module and using below config it worked:

upstream load_balancer { hash $scheme$proxy_host$request_uri$is_args$args
consistent; server 127.0.0.1:9003; server 127.0.0.1:9004; } server { listen
8081; server_name localhost; access_log /usr/local/var/log/nginx/access.log;
location / { proxy_pass http://load_balancer }
Do you think we are missing anything here?

Thanks,
Devika

On Wed, Sep 19, 2018 at 11:53 PM Maxim Dounin <mdounin@mdounin.ru> wrote:

> Hello!
>
> On Wed, Sep 19, 2018 at 06:40:11PM +0530, Devika Awasthi wrote:
>
> > I have a question on Nginx open source.
> >
> > So, we have a nginx web server being used as kubernetes pod in
> production
> > as reverse proxy and web layer.
> >
> > We wanted to leverage the upstream hash module for session stickiness. We
> > tried a POC locally by recompiling the Nginx with additional module -
> > http://nginx.org/en/docs/http/ngx_http_upstream_module.html#hash. and it
> > worked well.
> >
> > However for production and other higher environments wanted to know if we
> > have any nginx docker image/container with above http upstream module
> > please which can pulled?
> >
> > I tried searching in docker hub, couldn’t find any.
>
> The ngx_http_upstream_module which provides the "hash" directive
> is compiled in by default, unless explicitly switched off with the
> "--without-http_upstream_hash_module" configure option.
>
> --
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Re: Nginx urgent query

Devika Awasthi September 19, 2018 09:12AM

Re: Nginx urgent query

Maxim Dounin September 19, 2018 02:24PM

Re: Nginx urgent query

Devika Awasthi September 19, 2018 10:14PM

Re: Nginx urgent query

Devika Awasthi September 20, 2018 01:26AM

Re: Nginx urgent query

Maxim Dounin September 20, 2018 09:16AM

Re: Nginx urgent query

itpp2012 September 20, 2018 09:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready