Nginx urgent query

Devika Awasthi awasthi.dvk at gmail.com
Thu Sep 20 05:25:26 UTC 2018


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 at 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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180920/199aaabf/attachment.html>


More information about the nginx mailing list